[PATCH 1/2] Preserve keyboard focus when changing sorting order in the divelist
Lubomir I. Ivanov
neolit123 at gmail.com
Wed Feb 20 05:47:22 PST 2013
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
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.
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
divelist.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/divelist.c b/divelist.c
index 0951194..bf9d18c 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;
--
1.7.11.msysgit.0
More information about the subsurface
mailing list