diff --git a/ChangeLog b/ChangeLog index fff77d86c..c953f339c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-02-16 MatthiasClasen + + Bug 572041 – Focus should change when advancing forward in GtkAssistant + + * gtk/gtkassistant.c (set_current_page): Set focus when the current + page changes. Pointed out by Eitan Isaacson + +2009-02-16 MatthiasClasen + + * configure.in: Require GLib 2.19.7 for GMountOperation::aborted. + + * gtk/gtkmountoperation.c: Implement GMountOperation::aborted. + 2009-02-16 Sven Neumann * gdk/gdk.symbols diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c index f2b731560..45748b695 100644 --- a/gtk/gtkassistant.c +++ b/gtk/gtkassistant.c @@ -559,6 +559,28 @@ set_current_page (GtkAssistant *assistant, gtk_widget_unmap (old_page->title); } + if (!gtk_widget_child_focus (priv->current_page->page, GTK_DIR_TAB_FORWARD)) + { + GtkWidget *button[6]; + gint i; + + /* find the best button to focus */ + button[0] = assistant->apply; + button[1] = assistant->close; + button[2] = assistant->forward; + button[3] = assistant->back; + button[4] = assistant->cancel; + button[5] = assistant->last; + for (i = 0; i < 6; i++) + { + if (GTK_WIDGET_VISIBLE (button[i]) && GTK_WIDGET_SENSITIVE (button[i])) + { + gtk_widget_grab_focus (button[i]); + break; + } + } + } + gtk_widget_queue_resize (GTK_WIDGET (assistant)); }