[gnome-tweak-tool/wip/pwood/app-chooser: 2/9] AppChooser: Add a default response
- From: Phillip Wood <pwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool/wip/pwood/app-chooser: 2/9] AppChooser: Add a default response
- Date: Tue, 28 Apr 2015 13:01:21 +0000 (UTC)
commit 93601ca5a0cd0f7980f659ea7e508b3fbb00f354
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Fri Mar 27 11:04:00 2015 +0000
AppChooser: Add a default response
Adding a default response improves the keyboard navigation as the user
can select an application by pressing ‘Enter’. It also changes the style
of the ‘Add Application’ button.
https://bugzilla.gnome.org/show_bug.cgi?id=747983
gtweak/tweaks/tweak_group_startup.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py
index e897374..2862ee3 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -40,6 +40,7 @@ class _AppChooser(Gtk.Dialog):
self.entry = Gtk.SearchEntry(
placeholder_text=_("Search Applications..."))
self.entry.set_width_chars(30)
+ self.entry.props.activates_default=True
self.searchbar = Gtk.SearchBar()
self.searchbar.add(self.entry)
@@ -72,6 +73,7 @@ class _AppChooser(Gtk.Dialog):
self.add_button(_("_Close"), Gtk.ResponseType.CLOSE)
self.add_button(_("Add Application"), Gtk.ResponseType.OK)
+ self.set_default_response(Gtk.ResponseType.OK)
self.get_content_area().pack_start(self.searchbar, False, False, 0)
self.get_content_area().pack_start(sw, True, True, 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]