[gnome-tweak-tool/wip/pwood/app-chooser: 4/9] AppChooser : Rationalize ‘Escape’ handling
- From: Phillip Wood <pwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool/wip/pwood/app-chooser: 4/9] AppChooser : Rationalize ‘Escape’ handling
- Date: Tue, 28 Apr 2015 13:01:31 +0000 (UTC)
commit 8ad677f20f7e619438c1057a108b87fa0dff527f
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Tue Apr 14 12:35:06 2015 +0100
AppChooser: Rationalize ‘Escape’ handling
Pressing ‘Escape’ when the search-bar is visible should close it, if the
search-bar is not visible it should close the dialog.
https://bugzilla.gnome.org/show_bug.cgi?id=747983
gtweak/tweaks/tweak_group_startup.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py
index 634612f..01f7a3a 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -158,13 +158,10 @@ class _AppChooser(Gtk.Dialog):
def _on_key_press(self, widget, event):
keyname = Gdk.keyval_name(event.keyval)
if keyname == 'Escape':
- if self.entry.is_focus():
+ if self.searchbar.get_search_mode():
self.searchbar.set_search_mode(False)
return True
- elif self.searchbar.get_search_mode():
- self.entry.grab_focus()
- return True
- elif keyname not in ['Escape', 'Up', 'Down']:
+ elif keyname not in ['Up', 'Down']:
if not self.entry.is_focus() and self.searchbar.get_search_mode():
if self.entry.im_context_filter_keypress(event):
self.entry.grab_focus()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]