Commit 0b117343 authored by Philipp Hörist's avatar Philipp Hörist

MessageWindow: Bring back switching tab via <Alt>1-9

parent 7c375a2b
Pipeline #4023 passed with stages
in 2 minutes and 58 seconds
......@@ -120,6 +120,13 @@
<property name="title" translatable="yes">Switch to the next tab</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Alt&gt;1...9</property>
<property name="title" translatable="yes">Switch to the first - ninth tab</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
......
......@@ -173,6 +173,15 @@ class MessageWindow:
'<Control>Page_Down']),
('switch-next-unread-tab-left', ['<Control>ISO_Left_Tab',
'<Control>Page_Up']),
('switch-tab-1', ['<Alt>1', '<Alt>KP_1']),
('switch-tab-2', ['<Alt>2', '<Alt>KP_2']),
('switch-tab-3', ['<Alt>3', '<Alt>KP_3']),
('switch-tab-4', ['<Alt>4', '<Alt>KP_4']),
('switch-tab-5', ['<Alt>5', '<Alt>KP_5']),
('switch-tab-6', ['<Alt>6', '<Alt>KP_6']),
('switch-tab-7', ['<Alt>7', '<Alt>KP_7']),
('switch-tab-8', ['<Alt>8', '<Alt>KP_8']),
('switch-tab-9', ['<Alt>9', '<Alt>KP_9']),
]
disabled_for_emacs = (
......@@ -254,6 +263,11 @@ class MessageWindow:
self.move_to_next_unread_tab(False)
return
if action.startswith('switch-tab-'):
number = int(action[-1])
self.notebook.set_current_page(number - 1)
return
def change_account_name(self, old_name, new_name):
if old_name in self._controls:
self._controls[new_name] = self._controls[old_name]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment