[dconf] editor: Cancel search on escape
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] editor: Cancel search on escape
- Date: Thu, 9 May 2013 22:39:24 +0000 (UTC)
commit 85a64f42a40485304d4c6cccc58a9e249f524e89
Author: Robert Ancell <robert ancell canonical com>
Date: Fri May 10 10:37:42 2013 +1200
editor: Cancel search on escape
editor/dconf-editor.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala
index 5d61b0c..d93074c 100644
--- a/editor/dconf-editor.vala
+++ b/editor/dconf-editor.vala
@@ -104,6 +104,15 @@ class ConfigurationEditor : Gtk.Application
set_default_action.activate.connect(set_default_cb);
search_box = ui.get_object("search_box") as Gtk.Box;
+ search_box.key_press_event.connect ((event) =>
+ {
+ if (event.keyval == Gdk.Key.Escape)
+ {
+ search_box.hide();
+ return true;
+ }
+ return false;
+ });
search_entry = ui.get_object("search_entry") as Gtk.Entry;
search_label = ui.get_object("search_label") as Gtk.Label;
search_entry.activate.connect(find_next_cb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]