GtkNotebook: Fix reverse tab order
authorMatthias Clasen <mclasen@redhat.com>
Sat, 23 Jun 2012 16:20:54 +0000 (12:20 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 23 Jun 2012 16:37:20 +0000 (12:37 -0400)
When using Shift-Tab to move the focus out of page content onto
the tab label, we end up in a situation where both Tab and Shift-Tab
move focus back into the page, which is not really what is expected
when the notebook is part of a dialog.

Instead, arrange things so that using Shift-Tab with focus on a
tab label moves the focus out of the notebook.

http://bugzilla.gnome.org/show_bug.cgi?id=669986

gtk/gtknotebook.c

index 214af5668dd814d20bccdcdabde7a3999ce4d06c..cf077c8e79606b3eff1cff0e5abede0de9468f83 100644 (file)
@@ -4149,7 +4149,7 @@ focus_tabs_in (GtkNotebook *notebook)
   if (priv->show_tabs && priv->cur_page)
     {
       gtk_widget_grab_focus (GTK_WIDGET (notebook));
-
+      gtk_notebook_set_focus_child (notebook, NULL);
       gtk_notebook_switch_focus_tab (notebook,
                                      g_list_find (priv->children,
                                                   priv->cur_page));