GNOME Bugzilla – Bug 340539
Hitting Escape should close the document properties window
Last modified: 2006-05-09 08:18:09 UTC
The summary says it all.
Just for the record: Esc closes only dialogs that have a Cancel button (and the properties window has only a Close button) (see here for a recent thread where this came up: http://mail.gnome.org/archives/usability/2005-December/msg00032.html where it's also pointed out, that SUSE patches this behavior, and some applications override it as well) Being in lazy backseat coder mode, I won't take a side here ;-)
Since the Properties dialog has no input elements, Close is effectively the same as Cancel. There's no risk of saving/discarding user entered data without the user telling the application to do so (as is the case for input/preferences dialogs).
You'll get your wish since the gtk+ developers have unilaterally decided to screw us all and do away with the HIG, see bug 101293 :(
That means there is no patch needed and this bug can be closed, since gtk+ handles this.
Reopening, since this only happens for GTK+ 2.9 and up. I will attach a patch that changes the response to GTK_RESPONSE_CANCEL, so that this works for older gtk+ versions too.
Created attachment 64964 [details] [review] Proposed fix. Change the properties dialog response to GTK_RESPONSE_CANCEL instead of GTK_RESPONSE_CLOSE. This will make the dialog go away when the user presses enter. With gtk+ >= 2.9 this will happen anyway, but for older gtk+ versions only GTK_RESPONSE_CANCEL is bound to escape by default. Fixes bug #340539. See also bug #101293 for the gtk+ part.
Nickolay, let me know if I can commit this.
GTK_RESPONSE_CANCEL is better than RESPONSE_ACCEPT anyhow, so please commit this patch without comment (I don't think it's a good thing to leave such references in the code, that's what CVS is used for).
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.