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 <miika.turkia@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2013-02-20 15:47:22 +02:00 committed by Dirk Hohndel
parent b406dbe1c0
commit 57e8349b87

View file

@ -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;