Put initial focus on Close button (#337261).

2006-10-26  Christian Persch  <chpe@cvs.gnome.org>

	* gtk/gtkaboutdialog.c: Put initial focus on Close button (#337261).
This commit is contained in:
Christian Persch 2006-10-26 12:21:41 +00:00 committed by Christian Persch
parent 53b07bc822
commit 69a5a5ac59
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2006-10-26 Christian Persch <chpe@cvs.gnome.org>
* gtk/gtkaboutdialog.c: Put initial focus on Close button (#337261).
2006-10-25 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtk.symbols: Add missing symbols to so make check can pass

View File

@ -429,7 +429,7 @@ static void
gtk_about_dialog_init (GtkAboutDialog *about)
{
GtkAboutDialogPrivate *priv;
GtkWidget *vbox, *hbox, *button, *image;
GtkWidget *vbox, *hbox, *button, *close_button, *image;
/* Data */
priv = GTK_ABOUT_DIALOG_GET_PRIVATE (about);
@ -494,7 +494,8 @@ gtk_about_dialog_init (GtkAboutDialog *about)
gtk_widget_show (hbox);
/* Add the OK button */
gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL);
close_button = gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_CLOSE,
GTK_RESPONSE_CANCEL);
gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_CANCEL);
/* Add the credits button */
@ -525,6 +526,9 @@ gtk_about_dialog_init (GtkAboutDialog *about)
gtk_widget_pop_composite_child ();
gtk_widget_grab_default (close_button);
gtk_widget_grab_focus (close_button);
/* force defaults */
gtk_about_dialog_set_name (about, NULL);
gtk_about_dialog_set_logo (about, NULL);