diff --git a/GTG/gtk/browser/main_window.py b/GTG/gtk/browser/main_window.py index b37f4e3a0..864a0c276 100644 --- a/GTG/gtk/browser/main_window.py +++ b/GTG/gtk/browser/main_window.py @@ -131,7 +131,7 @@ def __init__(self, app): # YOU CAN DEFINE YOUR INTERNAL MECHANICS VARIABLES BELOW # Setup GTG icon theme self._init_icon_theme() - + # Init Actions self._set_actions() @@ -198,6 +198,22 @@ def _init_context_menus(self): self.panes['active'].sort_btn.set_popover(self.sort_menu) + def switch_tab_open(self, t=None , a = None): + """switch tab 'open_view'.""" + stack = self.stack_switcher.get_stack() + stack.set_visible_child_name('open_view') + + def switch_tab_actionable(self, t=None , a = None): + """switch tab 'actionable_view'.""" + stack = self.stack_switcher.get_stack() + stack.set_visible_child_name('actionable_view') + + def switch_tab_closed(self, t=None , a = None): + """switch tab 'closed_view'.""" + stack = self.stack_switcher.get_stack() + stack.set_visible_child_name('closed_view') + + def _set_actions(self): """Setup actions.""" @@ -213,6 +229,9 @@ def _set_actions(self): ('focus_quickentry', self.focus_quickentry, ('win.focus_quickentry', ['L'])), ('delete_task', self.on_delete_tasks, ('win.delete_task', ['Delete'])), ('help_overlay', None, ('win.show-help-overlay', ['question'])), + ('switch_tab_open' , self.switch_tab_open, ('win.switch_tab_open' , ['1'])), + ('switch_tab_actionable' , self.switch_tab_actionable, ('win.switch_tab_actionable' , ['2'])), + ('switch_tab_closed' , self.switch_tab_closed, ('win.switch_tab_closed' , ['3'])), ('mark_as_started', self.on_mark_as_started, None), ('start_today', self.on_start_for_today, None), ('start_tomorrow', self.on_start_for_tomorrow, None),