[gtk+/gtk-2-24] entry: Don't try to handle Tab in entry completions



commit 71b20bd105bb8a84478b2c3b5a5baa3744928183
Author: Benjamin Otte <otte redhat com>
Date:   Thu Nov 3 22:03:22 2011 +0100

    entry: Don't try to handle Tab in entry completions
    
    Instead, fall through to the default handler after closing the
    completion. This has the advantage of letting the file chooser entry
    capture the tab key properly, so one can't accidentally move out of the
    entry by pressing tab while the completion is popped up.
    
    I also suspect it fixes bugs with weird tab keys and shift/ctrl
    oddities. But who knows...
    
    Conflicts:
        gtk/gtkentry.c

 gtk/gtkentry.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index f2a6328..b2fdf9c 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -9518,18 +9518,13 @@ keypress_completion_out:
           event->keyval == GDK_KP_Tab ||
           event->keyval == GDK_ISO_Left_Tab) 
     {
-      GtkDirectionType dir = event->keyval == GDK_ISO_Left_Tab ? 
-       GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
-      
       _gtk_entry_reset_im_context (GTK_ENTRY (widget));
       _gtk_entry_completion_popdown (completion);
 
       g_free (completion->priv->completion_prefix);
       completion->priv->completion_prefix = NULL;
 
-      gtk_widget_child_focus (gtk_widget_get_toplevel (widget), dir);
-
-      return TRUE;
+      return FALSE;
     }
   else if (event->keyval == GDK_ISO_Enter ||
            event->keyval == GDK_KP_Enter ||


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