From 57e8349b87642691671e274348e07772c7d7d584 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 20 Feb 2013 15:47:22 +0200 Subject: [PATCH] Preserve keyboard focus when changing sorting order in the divelist When the user changes the dive list sorting order via clicking on different column titles, using gtk_widget_grab_focus() gives keyboard focus back to the list itself (not staying on the column titles), which gives a hint that the list itself has focus index of 0 and is reset each time the widget receives this type of "initial" focus. Acked-by: Miika Turkia Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- divelist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/divelist.c b/divelist.c index 0951194b3..bf9d18c6e 100644 --- a/divelist.c +++ b/divelist.c @@ -2316,6 +2316,7 @@ static void sort_column_change_cb(GtkTreeSortable *treeview, gpointer data) GtkSortType order; GtkTreeStore *currentmodel = dive_list.model; + gtk_widget_grab_focus(dive_list.tree_view); if (second_call) return;