[PATCH 1/2] Preserve keyboard focus when changing sorting order in the divelist

Miika Turkia miika.turkia at gmail.com
Wed Feb 20 06:30:33 PST 2013


Works for me

Acked-by: Miika Turkia <miika.turkia at gmail.com>

miika

On Wed, Feb 20, 2013 at 7:17 PM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> 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
>
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface


More information about the subsurface mailing list