gimp r26389 - in branches/soc-2008-tagging: . app/widgets



Author: aurisj
Date: Tue Aug  5 17:08:28 2008
New Revision: 26389
URL: http://svn.gnome.org/viewvc/gimp?rev=26389&view=rev

Log:
2008-08-05  Aurimas JuÅka  <aurisj svn gnome org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_try_select_jellybean):
	when selecting with mouse at the end of tag entry, don't try to select
	jellybean, but allow appending tags.



Modified:
   branches/soc-2008-tagging/ChangeLog
   branches/soc-2008-tagging/app/widgets/gimptagentry.c

Modified: branches/soc-2008-tagging/app/widgets/gimptagentry.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimptagentry.c	(original)
+++ branches/soc-2008-tagging/app/widgets/gimptagentry.c	Tue Aug  5 17:08:28 2008
@@ -1018,6 +1018,13 @@
 static gboolean
 gimp_tag_entry_try_select_jellybean (GimpTagEntry      *tag_entry)
 {
+  gint selection_pos = gtk_editable_get_position (GTK_EDITABLE (tag_entry));
+  gint char_count = g_utf8_strlen (gtk_entry_get_text (GTK_ENTRY (tag_entry)), -1);
+  if (selection_pos == char_count)
+    {
+      return FALSE;
+    }
+
   gimp_tag_entry_select_jellybean (tag_entry);
   return FALSE;
 }
@@ -1044,7 +1051,7 @@
 }
 
 static gboolean
-gimp_tag_entry_select_jellybean (GimpTagEntry             *entry)
+gimp_tag_entry_select_jellybean (GimpTagEntry          *entry)
 {
   gchar        *original_string;
   gchar        *jellybean_start;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]