Philipp Hörist pushed to branch master at gajim / gajim


Commits:
e48f6887 by Philipp Hörist at 2019-08-10T19:04:51Z
Reorder some account menu items

- - - - -
7c375a2b by Philipp Hörist at 2019-08-10T19:08:38Z
Groupchat: Only allow nickname/subject change on groupchat page

- - - - -
0b117343 by Philipp Hörist at 2019-08-10T21:05:03Z
MessageWindow: Bring back switching tab via <Alt>1-9

- - - - -


4 changed files:

- gajim/data/gui/shortcuts_window.ui
- gajim/groupchat_control.py
- gajim/gui_menu_builder.py
- gajim/message_window.py


Changes:

=====================================
gajim/data/gui/shortcuts_window.ui
=====================================
@@ -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>


=====================================
gajim/groupchat_control.py
=====================================
@@ -2898,7 +2898,7 @@ class GroupchatControl(ChatControlBase):
             self.xml.close_button.grab_default()
 
     def _on_change_nick(self, _action, _param):
-        if self._get_current_page() == 'nickname':
+        if self._get_current_page() != 'groupchat':
             return
         self.xml.nickname_entry.set_text(self.nick)
         self.xml.nickname_entry.grab_focus()
@@ -2924,7 +2924,7 @@ class GroupchatControl(ChatControlBase):
         self._show_page('groupchat')
 
     def _on_change_subject(self, _action, _param):
-        if self._get_current_page() == 'subject':
+        if self._get_current_page() != 'groupchat':
             return
         self.xml.subject_textview.get_buffer().set_text(self.subject)
         self.xml.subject_textview.grab_focus()


=====================================
gajim/gui_menu_builder.py
=====================================
@@ -671,8 +671,9 @@ def get_account_menu(account):
     account_menu = [
         ('-add-contact', _('Add Contact…')),
         ('-profile', _('Profile')),
-        ('-services', _('Discover Services')),
         ('-start-single-chat', _('Send Single Message…')),
+        ('-services', _('Discover Services')),
+        ('-server-info', _('Server Info')),
         (_('Advanced'), [
             ('-archive', _('Archiving Preferences')),
             ('-blocking', _('Blocking List')),
@@ -680,7 +681,7 @@ def get_account_menu(account):
             ('-pep-config', _('PEP Configuration')),
             ('-sync-history', _('Synchronise History')),
             ('-privacylists', _('Privacy Lists')),
-            ('-server-info', _('Server Info')),
+
             ('-xml-console', _('XML Console'))
         ]),
         (_('Admin'), [


=====================================
gajim/message_window.py
=====================================
@@ -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]



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/922b11484bcddc548e7ba304b392c86dfeeef683...0b11734386e4f57320d21dcc1c3021848575d02e

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/922b11484bcddc548e7ba304b392c86dfeeef683...0b11734386e4f57320d21dcc1c3021848575d02e
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to