Make sure the "Close" button has the focus, not the table. (#172703)

* src/metacity-dialog.c (warn_about_no_sm_support): Make sure the
        "Close" button has the focus, not the table. (#172703)
This commit is contained in:
Dan Winship 2005-04-08 14:49:01 +00:00
parent 7d9d9f52cd
commit 82c8ca4588
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-04-05 Dan Winship <danw@novell.com>
* src/metacity-dialog.c (warn_about_no_sm_support): Make sure the
"Close" button has the focus, not the table. (#172703)
2005-04-05 Pawan Chitrakar <pawan@nplinux.org>
* configure.in: Added ne in ALL_LINGUAS

View File

@ -254,11 +254,12 @@ warn_about_no_sm_support (char **lame_apps,
GtkWidget *dialog;
GtkWidget *list;
GtkWidget *sw;
GtkWidget *button;
dialog = gtk_message_dialog_new (NULL,
0,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_CLOSE,
GTK_BUTTONS_NONE,
_("These windows do not support \"save current setup\" and will have to be restarted manually next time you log in."));
g_signal_connect (G_OBJECT (dialog),
@ -269,6 +270,7 @@ warn_about_no_sm_support (char **lame_apps,
/* Wait 4 minutes then force quit, so we don't wait around all night */
g_timeout_add (4 * 60 * 1000, (GSourceFunc) gtk_main_quit, NULL);
button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
list = create_lame_apps_list (lame_apps);
@ -301,6 +303,7 @@ warn_about_no_sm_support (char **lame_apps,
gtk_widget_realize (dialog);
copy_of_gdk_x11_window_set_user_time (dialog->window, timestamp);
gtk_widget_grab_focus (button);
gtk_widget_show_all (dialog);
gtk_main ();