gimp r28095 - in trunk: . app/widgets



Author: mitch
Date: Mon Mar  2 22:16:40 2009
New Revision: 28095
URL: http://svn.gnome.org/viewvc/gimp?rev=28095&view=rev

Log:
2009-03-02  Michael Natterer  <mitch gimp org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_key_press): allow to
	leave the widget with Ctrl+Tab. Handle GDK_KP_Tab and
	GDK_ISO_Left_Tab.



Modified:
   trunk/ChangeLog
   trunk/app/widgets/gimptagentry.c

Modified: trunk/app/widgets/gimptagentry.c
==============================================================================
--- trunk/app/widgets/gimptagentry.c	(original)
+++ trunk/app/widgets/gimptagentry.c	Mon Mar  2 22:16:40 2009
@@ -1288,9 +1288,22 @@
   switch (event->keyval)
     {
     case GDK_Tab:
-      entry->tab_completion_index++;
-      entry->suppress_tag_query++;
-      g_idle_add ((GSourceFunc) gimp_tag_entry_auto_complete, entry);
+    case GDK_KP_Tab:
+    case GDK_ISO_Left_Tab:
+      /*  allow to leave the widget with Ctrl+Tab  */
+      if (! (event->state & GDK_CONTROL_MASK))
+        {
+          entry->tab_completion_index++;
+          entry->suppress_tag_query++;
+          g_idle_add ((GSourceFunc) gimp_tag_entry_auto_complete, entry);
+        }
+      else
+        {
+          gimp_tag_entry_commit_tags (entry);
+          g_signal_emit_by_name (widget, "move-focus",
+                                 (event->state & GDK_SHIFT_MASK) ?
+                                 GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD);
+        }
       return TRUE;
 
     case GDK_Return:



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