[gnome-tweak-tool/wip/pwood/app-chooser: 9/11] StartUpTwe ak: Add a ‘row-activated’ handler



commit 7fa21a9b4b05a20265f09aef054dc0a0cbd9c0d6
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Fri Mar 27 10:59:07 2015 +0000

    StartUpTweak: Add a ‘row-activated’ handler
    
    Add a ‘row-activated’ handler to the startup group so that the ‘+’
    button is activated with the row. Without this the user needs navigate
    to the row containing the ‘+’ button and the has to press ‘Tab’ to move
    the focus from the list box row to the ‘+’ button before they can
    activate it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747986

 gtweak/tweaks/tweak_group_startup.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py
index 58c2d5f..1a5b51b 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -290,6 +290,7 @@ class AutostartListBoxTweakGroup(ListBoxTweakGroup):
             *tweaks,
             css_class='tweak-group-startup')
         self.set_header_func(_list_header_func, None)
+        self.connect("row-activated", lambda b, row: add.btn.activate() if row == add else None)
 
     def _on_remove_clicked(self, btn, widget, df):
         self.remove(widget)


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