Skip to content

Commit

Permalink
W fix initial selections
Browse files Browse the repository at this point in the history
  • Loading branch information
diegogangl committed Jul 24, 2022
1 parent ce62f95 commit ce40060
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GTG/gtk/browser/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand All @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit ce40060

Please sign in to comment.