forked from AuroraMiddleware/gtk
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:
parent
53b07bc822
commit
69a5a5ac59
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user