[gtk+/gtk-2-16] Bug 528283 - Problems when using PageUp & PageDown to navigate...



commit f638cf711ea0454bac332e6bb4e8ac999ed4865b
Author: Kristian Rietveld <kris gtk org>
Date:   Sun Aug 23 12:21:53 2009 +0200

    Bug 528283 - Problems when using PageUp & PageDown to navigate...
    
    Patch from Jonathan Matthew to make focus grabbing of page up/down,
    home/end and left/right movements consistent with up/down.

 gtk/gtktreeview.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 955d4ec..87a660c 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -9857,6 +9857,8 @@ gtk_tree_view_move_cursor_page_up_down (GtkTreeView *tree_view,
   if (!gtk_tree_path_compare (old_cursor_path, cursor_path))
     gtk_widget_error_bell (GTK_WIDGET (tree_view));
 
+  gtk_widget_grab_focus (GTK_WIDGET (tree_view));
+
 cleanup:
   gtk_tree_path_free (old_cursor_path);
   gtk_tree_path_free (cursor_path);
@@ -9951,6 +9953,7 @@ gtk_tree_view_move_cursor_left_right (GtkTreeView *tree_view,
 				        cursor_node,
 				        NULL);
       g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
+      gtk_widget_grab_focus (GTK_WIDGET (tree_view));
     }
   else
     {
@@ -10016,6 +10019,7 @@ gtk_tree_view_move_cursor_start_end (GtkTreeView *tree_view,
   if (gtk_tree_path_compare (old_path, path))
     {
       gtk_tree_view_real_set_cursor (tree_view, path, TRUE, TRUE);
+      gtk_widget_grab_focus (GTK_WIDGET (tree_view));
     }
   else
     {



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