[gtk+/gtk-2-22] Part of bgo#613728 - [GtkTreeView] Focus the list, not the headers, when Tab-focusing



commit 2d643ac8a981487903fd3a5d4ce7549419680928
Author: Federico Mena Quintero <federico novell com>
Date:   Thu Oct 14 13:17:46 2010 -0500

    Part of bgo#613728 - [GtkTreeView] Focus the list, not the headers, when Tab-focusing
    
    The idea is that it is way more common to want to manipulate the
    actual list, rather than the headers.  Once you Tab into the treeview
    (and the list part gets the focus), you can use Shift-Tab to focus
    the headers.
    
    This means that some hysteresis is added to the focus chain, but
    it makes the treeview a lot more convenient to focus with the keyboard.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 gtk/gtktreeview.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index dca4756..16c4356 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -8037,8 +8037,7 @@ gtk_tree_view_focus (GtkWidget        *widget,
   /* Case 2. We don't have focus at all. */
   if (!gtk_widget_has_focus (widget))
     {
-      if (!gtk_tree_view_header_focus (tree_view, direction, FALSE))
-	gtk_widget_grab_focus (widget);
+      gtk_widget_grab_focus (widget);
       return TRUE;
     }
 



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