#101293, again



Hi,

Please see http://bugzilla.gnome.org/show_bug.cgi?id=101293

(and weep).

People are used to hitting Esc to close dialog boxes.  GNOME 1.x sucked
in this respect, we fixed it with GTK+ 2.0, then broke it again.

There is an ambiguous (ir)rationale that says "but there is a difference
between Cancel and Close, and Esc should refer to Cancel only".

It is very likely that dialogs that have a Close button rather than a
Cancel one are either

* instant-apply, in which case there's no explicit way to revert the
changes unless you have a Revert button, or

* transient windows that should not be dialog boxes, *or* things like
Find dialogs which you really really want to close if you hit Esc ---
how many times have you hit C-f, expecting the cursor to move forward,
and gotten a impossible-to-close Find dialog instead?

Even in the case of instant-apply dialogs, I'm sure there is no harm in
closing them when you hit Escape.

As yet another example of how super-annoying this is, hit Help/About on
a random app.  GnomeAbout has a Close button with GTK_RESPONSE_CLOSE, so
you can't dismiss the @#$% About dialog with Escape.

We can do this easily:

1. Remove dialog_has_cancel() from gtkdialog.c

2. Bind Escape to the "close" signal.

3. Make the default handler for "close" just close the window with the
existing code that synthesizes a GDK_DELETE event.  "close" is already a
G_SIGNAL_RUN_LAST signal, so recalcitrant windows which really don't
want to be closed with Escape can easily connect to the signal and stop
the emission.

May I do all of these?

Pretty please, with sugar on top?

  Federico




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