From ce40060e0d3734045344667401539d7523f66eb8 Mon Sep 17 00:00:00 2001 From: Diego Garcia Gangl Date: Sun, 24 Jul 2022 20:16:37 -0300 Subject: [PATCH] W fix initial selections --- GTG/gtk/browser/sidebar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GTG/gtk/browser/sidebar.py b/GTG/gtk/browser/sidebar.py index 23fa039944..a921236e03 100644 --- a/GTG/gtk/browser/sidebar.py +++ b/GTG/gtk/browser/sidebar.py @@ -76,7 +76,6 @@ def __init__(self, app, ds: Datastore2): self.general_box = Gtk.ListBox() self.general_box.get_style_context().add_class('navigation-sidebar') - self.box_handle = self.general_box.connect('row-selected', self.on_general_box_selected) all_count = str(ds.task_count['open']['all']) untag_count = str(ds.task_count['open']['untagged']) @@ -91,6 +90,9 @@ def __init__(self, app, ds: Datastore2): separator = Gtk.Separator() separator.set_sensitive(False) wrap_box.append(separator) + + self.general_box.select_row(self.general_box.get_row_at_index(0)) + self.box_handle = self.general_box.connect('row-selected', self.on_general_box_selected) # ------------------------------------------------------------------------------- # Saved Searches Section @@ -115,6 +117,7 @@ def __init__(self, app, ds: Datastore2): self.searches_selection = Gtk.SingleSelection.new(ds.saved_searches.model) self.searches_selection.set_can_unselect(True) + self.searches_selection.unselect_item(0) self.search_handle = self.searches_selection.connect('selection-changed', self.on_search_selected) searches_signals = Gtk.SignalListItemFactory()