Skip to content

Commit

Permalink
Ctrl+F focuses search instead of toggle Fixes issue getting-things-gn…
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanV committed Oct 11, 2023
1 parent 77fe226 commit e03fe3f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion GTG/gtk/browser/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _set_actions(self):
('expand_all_tasks', self.on_expand_all_tasks, None),
('change_tags', self.on_modify_tags, ('win.change_tags', ['<ctrl>T'])),
('focus_sidebar', self.focus_sidebar, ('win.focus_sidebar', ['<ctrl>B'])),
('search', self.toggle_search, ('win.search', ['<ctrl>F'])),
('search', self.set_search_on, ('win.search', ['<ctrl>F'])),
('focus_quickentry', self.focus_quickentry, ('win.focus_quickentry', ['<ctrl>L'])),
('delete_task', self.on_delete_tasks, ('win.delete_task', ['<ctrl>Delete'])),
('help_overlay', None, ('win.show-help-overlay', ['<ctrl>question'])),
Expand Down Expand Up @@ -472,6 +472,11 @@ def on_search_toggled(self, widget=None):
self.searchbar.set_search_mode(True)
self.search_entry.grab_focus()

def set_search_on(self, action, param):
self.search_button.set_active(True)
self.searchbar.set_search_mode(True)
self.search_entry.grab_focus()

def _try_filter_by_query(self, query, refresh: bool = True):
log.debug("Searching for %r", query)
vtree = self.get_selected_tree()
Expand Down

0 comments on commit e03fe3f

Please sign in to comment.