summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2005-04-08 14:49:01 +0000
committerDan Winship <danw@src.gnome.org>2005-04-08 14:49:01 +0000
commit82c8ca4588ee91c11a0f7709175b0f0d2948225d (patch)
tree8fa48fb296521121651c5f09062d58610f8c4520 /src
parent7d9d9f52cd1278cfd22531711e2ba49745ad2e5f (diff)
downloadmetacity-82c8ca4588ee91c11a0f7709175b0f0d2948225d.tar.gz
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)
Diffstat (limited to 'src')
-rw-r--r--src/metacity-dialog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/metacity-dialog.c b/src/metacity-dialog.c
index 3d83ced5..ccd17901 100644
--- a/src/metacity-dialog.c
+++ b/src/metacity-dialog.c
@@ -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 ();