home · contact · privacy
In browser, grab focus on sort orderer when navigating it.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 12 Sep 2024 18:54:59 +0000 (20:54 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 12 Sep 2024 18:54:59 +0000 (20:54 +0200)
browser.py

index d95eb10a46cb3c6ba7cf54a62847dc5f0149aee5..7b9e389cefab1d68c2597467842dce328e751933 100755 (executable)
@@ -179,6 +179,10 @@ class MainWindow(Gtk.Window):
                 self.sort_order.reverse()
             self.sort_store = Gio.ListStore(item_type=SortLabelItem)
             self.sort_selection = Gtk.SingleSelection.new(self.sort_store)
+            self.sort_selection.connect(
+                    'selection-changed',
+                    lambda a, b, c: self.sort_selection.props.selected_item.box
+                    .props.child.get_parent().grab_focus())
             factory = Gtk.SignalListItemFactory()
 
             def setup_sort_order_item(_, item):