[evolution-patches] widgets, patch to close Settings dialog by ESC key



Hi,

Attached is a patch to fix the bug that the Settings dialog of
Evolution can't be closed be ESC key. This problem is caused by 
e-multi-config-dialog. 

   Since e-multi-config-dialog is derived from GtkDialog, it will 
do nothing when pressing ESC key on this dialog, because the 
e-multi-config-dialog doesn't have an action widget with GTK_RESPONSE_CANCEL
as its response ID. By changing the response ID of "Close" button from 
GTK_RESPONSE_CLOSE to GTK_RESPONSE_CANCEL, the ESC key can work.

   I have tested this patch on my box, please help review, thanks!

Changelog:
        * e-multi-config-dialog.c: (init): change the response id of
        "CLOSE" button from GTK_RESPONSE_CLOSE to GTK_RESPONSE_CANCEL,
        so that this kind of dialog can be closed by ESC key.

-- 
Eric Zhao <eric zhao sun com>
Index: e-multi-config-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-multi-config-dialog.c,v
retrieving revision 1.27
diff -u -r1.27 e-multi-config-dialog.c
--- e-multi-config-dialog.c	11 Feb 2004 18:30:32 -0000	1.27
+++ e-multi-config-dialog.c	19 Feb 2004 14:20:58 -0000
@@ -428,7 +428,7 @@
 	gtk_dialog_add_buttons (GTK_DIALOG (multi_config_dialog),
 				GTK_STOCK_HELP, GTK_RESPONSE_HELP,
 				GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
-				GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+				GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
 				GTK_STOCK_OK, GTK_RESPONSE_OK,
 				NULL);
 	gtk_dialog_set_default_response (GTK_DIALOG (multi_config_dialog), GTK_RESPONSE_OK);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]