After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 449262 - Escape key doesn't work in Power Management Preferences
Escape key doesn't work in Power Management Preferences
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-preferences
unspecified
Other Linux
: Normal trivial
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2007-06-19 20:39 UTC by Josselin Mouette
Modified: 2009-03-04 15:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Enable Escape key (1.21 KB, patch)
2008-10-31 08:37 UTC, Michael Kanis
none Details | Review

Description Josselin Mouette 2007-06-19 20:39:34 UTC
[ forwarded from http://bugs.debian.org/429395 by Olaf van der Spek

The Escape key doesn't work in the Power Management Preferences window, while this is the case for other capplets.
Comment 1 Richard Hughes 2007-06-19 20:46:26 UTC
Any idea how to fix this?
Comment 2 Josselin Mouette 2007-06-19 21:12:20 UTC
GtkDialog achieves this with the GtkBinding API:

  binding_set = gtk_binding_set_by_class (class);  
  gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
                                "close", 0);

For GpmPrefs that would be the "action-close" signal, I suppose.

Of course the clean way to do would be to make g-p-preferences directly use GtkDialog :)
Comment 3 Richard Hughes 2007-06-25 22:12:08 UTC
(In reply to comment #2)
> GtkDialog achieves this with the GtkBinding API:
> 
>   binding_set = gtk_binding_set_by_class (class);  
>   gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
>                                 "close", 0);

Hmm. I can't get this to work:

Gtk-CRITICAL **: gtk_binding_set_by_class: assertion `GTK_IS_OBJECT_CLASS (class)' failed

> For GpmPrefs that would be the "action-close" signal, I suppose.

Yes, agree.

> Of course the clean way to do would be to make g-p-preferences directly use
> GtkDialog :)

Sure, I'm open for this if this is the long term plan. Patches (or example code) gladly accepted. Thanks.

Richard,
Comment 4 Michael Kanis 2008-10-31 08:37:19 UTC
Created attachment 121720 [details] [review]
Enable Escape key

Did this a bit different. Works nonetheless.
Comment 5 Richard Hughes 2008-10-31 09:52:25 UTC
Michael, can you apply that please.
Comment 6 Michael Kanis 2008-12-21 19:15:51 UTC
The problem is, I do not have a SVN account.
Sorry for the delay, but I didn't understand you the first time I read your comment, I thought you mean some other gpm developer named Michael. :)
Comment 7 Richard Hughes 2009-03-04 15:24:50 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.