GNOME Bugzilla – Bug 581151
Ability to close note window with Escape key
Last modified: 2009-05-04 06:54:17 UTC
Currently it's not possible to close the notes window with the Escape key. This is not only an interesting feature, but it was mentioned by Corbet on LWN.net[1] as one of his minor annoyances with gnotes, so it would be nice to have it fixed ;-). [1] http://lwn.net/Articles/331187/
Created attachment 133837 [details] [review] proposed fix Disclaimer: I've never coded in C++ before, I'm sorry in advance if it's bogus - but at least it seems to work.
Comment on attachment 133837 [details] [review] proposed fix >From 9571c61c640d4fb376b92898bf6eda5335c61589 Mon Sep 17 00:00:00 2001 >From: Yves Junqueira <yves@cetico.org> >Date: Sun, 3 May 2009 05:52:29 +0200 >Subject: [PATCH] option dialog for closing on Escape > >--- > src/preferencesdialog.cpp | 9 ++++++++- > 1 files changed, 8 insertions(+), 1 deletions(-) > >diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp >index 1c6a257..43ac020 100644 >--- a/src/preferencesdialog.cpp >+++ b/src/preferencesdialog.cpp >@@ -167,7 +167,7 @@ namespace gnote { > Gtk::Label *label; > Gtk::CheckButton *check; > Gtk::Alignment *align; >- sharp::PropertyEditorBool *peditor, *font_peditor,* bullet_peditor; >+ sharp::PropertyEditorBool *peditor, *font_peditor, *bullet_peditor, *escape_peditor; > > Gtk::VBox *options_list = manage(new Gtk::VBox(false, 12)); > options_list->set_border_width(12); >@@ -217,6 +217,13 @@ namespace gnote { > *check); > bullet_peditor->setup(); > >+ // Close on Escape >+ check = manage(make_check_button (_("Escape key closes the note window."))); >+ options_list->pack_start (*check, false, false, 0); >+ escape_peditor = new sharp::PropertyEditorBool(Preferences::ENABLE_CLOSE_NOTE_ON_ESCAPE, >+ *check); >+ escape_peditor->setup(); >+ > // Custom font... > > check = manage(make_check_button (_("Use custom _font"))); >-- >1.6.0.4 >
Changed the option caption a bit in the patch ("Escape key closes the note window.")
Gnote 0.3.0 already does the right thing. Corbet is running a earlier version from Rawhide. I have built the latest version but it is not in the repo yet due to the development freeze. Anyway, I don't think a preference setting is really needed for this.
Sorry for the confusion then, but I was almost sure this didn't work for me right away. Maybe the gconf option was set to disabled by default when I tried it? I used 0.3.0 by the way.
If you installed the gconf schema it should on by default. If you didn't install the gconf schemas then that is your bug.
works for me. see comment #6