[gnome-tweak-tool/wip/pwood/app-chooser: 6/11] AppChooser: Select app when row is activated



commit 3ed0cff88697b3c7eed962a807c1fb44694fe112
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Wed Apr 1 18:35:12 2015 +0100

    AppChooser: Select app when row is activated
    
    This allows the user to select a startup application by double clicking
    on it rather than having to select it and then click on 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 3dc803d..92be3c8 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -51,10 +51,12 @@ class _AppChooser(Gtk.Dialog):
 
         lb = Gtk.ListBox()
         lb.props.margin = 5
+        lb.props.activate_on_single_click = False
         lb.set_sort_func(self._sort_apps, None)
         lb.set_header_func(_list_header_func, None)
         lb.set_filter_func(self._list_filter_func, None)
         self.entry.connect("search-changed", lambda e: lb.invalidate_filter())
+        lb.connect("row-activated", lambda b, r: self.response(Gtk.ResponseType.OK))
 
         lb.connect("row-selected", self._on_row_selected)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]