From a36406449b19e9836e75fbe8706cf763fbc7800c Mon Sep 17 00:00:00 2001 From: Jordi Mallach Date: Sat, 30 Aug 2003 21:52:07 +0000 Subject: [PATCH] Activate the Cancel button when Esc is pressed. (connectdialog_button): MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2003-08-30 Jordi Mallach * src/dialogs.c (teamdialog_new): Activate the Cancel button when Esc is pressed. (connectdialog_button): Likewise. (connectdialog_new): Likewise. (prefdialog_new): Don't make the Close button the default action. Patches from Dagfinn Ilmari Mannsåker. Thanks! --- ChangeLog | 9 +++++++++ src/dialogs.c | 7 +++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70c292f..2fb0501 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-08-30 Jordi Mallach + + * src/dialogs.c (teamdialog_new): Activate the Cancel button when + Esc is pressed. + (connectdialog_button): Likewise. + (connectdialog_new): Likewise. + (prefdialog_new): Don't make the Close button the default action. + Patches from Dagfinn Ilmari Mannsåker. Thanks! + 2003-08-29 Dani Carbonell * src/gtetrinet.c (keypress): fixing the key press signal handling diff --git a/src/dialogs.c b/src/dialogs.c index 3eb2f14..94ad6bf 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -156,7 +156,7 @@ void teamdialog_new (void) team_dialog = gtk_dialog_new_with_buttons (_("Change team"), GTK_WINDOW (app), GTK_DIALOG_NO_SEPARATOR, - GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_window_set_skip_taskbar_hint (GTK_WINDOW (team_dialog), TRUE); @@ -269,7 +269,7 @@ void connectdialog_button (GtkDialog *dialog, gint button) g_free (team_utf8); g_free (nick); break; - case GTK_RESPONSE_CLOSE: + case GTK_RESPONSE_CANCEL: gamemode = oldgamemode; gtk_widget_destroy (connectdialog); break; @@ -335,7 +335,7 @@ void connectdialog_new (void) connectdialog = gtk_dialog_new_with_buttons (_("Connect to server"), GTK_WINDOW (app), GTK_DIALOG_NO_SEPARATOR, - GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (GTK_DIALOG (connectdialog), GTK_RESPONSE_OK); @@ -847,7 +847,6 @@ void prefdialog_new (void) GTK_STOCK_HELP, GTK_RESPONSE_HELP, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); - gtk_dialog_set_default_response (GTK_DIALOG (prefdialog), GTK_RESPONSE_CLOSE); notebook = gtk_notebook_new (); gtk_window_set_resizable (GTK_WINDOW (prefdialog), FALSE); -- 2.50.1