Philipp Hörist pushed to branch master at gajim / gajim
Commits: e9575b51 by lovetox at 2020-09-19T19:02:52+02:00 GroupChatControl: Handle show-contact-info action
- - - - - 269d57a0 by lovetox at 2020-09-19T19:16:03+02:00 Application: Change some Shortcuts
We should not use the <Alt> modifier, because it is used for mnemonics
change-subject -> <Primary><Shift>S
show-emoji-chooser -> <Primary><Shift>M
- - - - - 7ef818f7 by lovetox at 2020-09-19T20:28:33+02:00 Shortcuts: Use <Primary> instead of <Control>
- - - - - e8d8c242 by lovetox at 2020-09-19T20:29:10+02:00 Update Shortcut Help
- Use primary instead of ctrl - Add missing shortcuts
- - - - -
3 changed files:
- gajim/application.py - gajim/data/gui/shortcuts_window.ui - gajim/groupchat_control.py
Changes:
===================================== gajim/application.py ===================================== @@ -548,22 +548,22 @@ class GajimApplication(Gtk.Application): 'win.show-roster': ['<Primary>R'], 'win.show-offline': ['<Primary>O'], 'win.show-active': ['<Primary>Y'], - 'win.change-nickname': ['<Control><Shift>n'], - 'win.change-subject': ['<Alt>t'], + 'win.change-nickname': ['<Primary><Shift>N'], + 'win.change-subject': ['<Primary><Shift>S'], 'win.escape': ['Escape'], - 'win.browse-history': ['<Control>h'], - 'win.send-file': ['<Control>f'], - 'win.show-contact-info': ['<Control>i'], - 'win.show-emoji-chooser': ['<Alt>m'], - 'win.clear-chat': ['<Control>l'], - 'win.delete-line': ['<Control>u'], - 'win.close-tab': ['<Control>w'], - 'win.move-tab-up': ['<Control><Shift>Page_Up'], - 'win.move-tab-down': ['<Control><Shift>Page_Down'], - 'win.switch-next-tab': ['<Control>Page_Down'], - 'win.switch-prev-tab': ['<Control>Page_Up'], - 'win.switch-next-unread-tab-right': ['<Control>Tab'], - 'win.switch-next-unread-tab-left': ['<Control>ISO_Left_Tab'], + 'win.browse-history': ['<Primary>H'], + 'win.send-file': ['<Primary>F'], + 'win.show-contact-info': ['<Primary>I'], + 'win.show-emoji-chooser': ['<Primary><Shift>M'], + 'win.clear-chat': ['<Primary>L'], + 'win.delete-line': ['<Primary>U'], + 'win.close-tab': ['<Primary>W'], + 'win.move-tab-up': ['<Primary><Shift>Page_Up'], + 'win.move-tab-down': ['<Primary><Shift>Page_Down'], + 'win.switch-next-tab': ['<Primary>Page_Down'], + 'win.switch-prev-tab': ['<Primary>Page_Up'], + 'win.switch-next-unread-tab-right': ['<Primary>Tab'], + 'win.switch-next-unread-tab-left': ['<Primary>ISO_Left_Tab'], 'win.switch-tab-1': ['<Alt>1', '<Alt>KP_1'], 'win.switch-tab-2': ['<Alt>2', '<Alt>KP_2'], 'win.switch-tab-3': ['<Alt>3', '<Alt>KP_3'],
===================================== gajim/data/gui/shortcuts_window.ui ===================================== @@ -4,73 +4,66 @@ <child> <object class="GtkShortcutsSection"> <property name="visible">1</property> - <property name="section-name">chat</property> - <property name="title" translatable="yes">Chat Shortcuts</property> + <property name="section-name">roster</property> + <property name="title" translatable="yes">Contact List</property> <child> <object class="GtkShortcutsGroup"> <property name="visible">1</property> - <property name="title" translatable="yes">Message composition</property> - <child> - <object class="GtkShortcutsShortcut"> - <property name="visible">1</property> - <property name="accelerator">Return</property> - <property name="title" translatable="yes">Send the message</property> - </object> - </child> + <property name="title" translatable="yes">General</property> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><shift>Return <ctrl>Return</property> - <property name="title" translatable="yes">Add new line</property> + <property name="accelerator"><primary>n</property> + <property name="title" translatable="yes">Start a new chat</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><alt>m</property> - <property name="title" translatable="yes">Select an emoji</property> + <property name="accelerator"><primary>g</property> + <property name="title" translatable="yes">Create new group chat</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator">Tab</property> - <property name="title" translatable="yes">Complete a command or a nickname</property> + <property name="accelerator"><primary>p</property> + <property name="title" translatable="yes">Preferences</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>Up</property> - <property name="title" translatable="yes">Previously sent message</property> + <property name="accelerator"><primary>e</property> + <property name="title" translatable="yes">Plugins</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>Down</property> - <property name="title" translatable="yes">Next sent messages</property> + <property name="accelerator"><primary>t</property> + <property name="title" translatable="yes">File transfers</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl><alt>Up</property> - <property name="title" translatable="yes">Quote previous message</property> + <property name="accelerator"><primary>s</property> + <property name="title" translatable="yes">Set the status message</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl><alt>Down</property> - <property name="title" translatable="yes">Quote next message</property> + <property name="accelerator"><primary><shift>x</property> + <property name="title" translatable="yes">Show XML console</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>u</property> - <property name="title" translatable="yes">Clear message entry</property> + <property name="accelerator"><primary>q</property> + <property name="title" translatable="yes">Quit Gajim</property> </object> </child> </object> @@ -78,33 +71,33 @@ <child> <object class="GtkShortcutsGroup"> <property name="visible">1</property> - <property name="title" translatable="yes">Recent history</property> + <property name="title" translatable="yes">Appearance</property> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><shift>Page_Up</property> - <property name="title" translatable="yes">Scroll up</property> + <property name="accelerator"><primary>o</property> + <property name="title" translatable="yes">Show offline contacts</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><shift>Page_Down</property> - <property name="title" translatable="yes">Scroll down</property> + <property name="accelerator"><primary>y</property> + <property name="title" translatable="yes">Show only active contacts</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>l</property> - <property name="title" translatable="yes">Clear chat window</property> + <property name="accelerator"><primary>k</property> + <property name="title" translatable="yes">Enable contact list filtering</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>h</property> - <property name="title" translatable="yes">Show chat history</property> + <property name="accelerator"><primary>r</property> + <property name="title" translatable="yes">Show / hide contact list</property> </object> </child> </object> @@ -112,130 +105,136 @@ <child> <object class="GtkShortcutsGroup"> <property name="visible">1</property> - <property name="title" translatable="yes">Tabs</property> + <property name="title" translatable="yes">Contacts</property> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>Page_Up</property> - <property name="title" translatable="yes">Switch to the previous tab</property> + <property name="accelerator"><primary>i</property> + <property name="title" translatable="yes">Contact information</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>Page_Down</property> - <property name="title" translatable="yes">Switch to the next tab</property> + <property name="accelerator">F2</property> + <property name="title" translatable="yes">Rename contact</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><Alt>1...9</property> - <property name="title" translatable="yes">Switch to the first - ninth tab</property> + <property name="accelerator">Delete</property> + <property name="title" translatable="yes">Delete contact</property> </object> </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkShortcutsSection"> + <property name="visible">1</property> + <property name="section-name">chat</property> + <property name="title" translatable="yes">Chat</property> + <child> + <object class="GtkShortcutsGroup"> + <property name="visible">1</property> + <property name="title" translatable="yes">Message composition</property> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl><shift>Tab</property> - <property name="title" translatable="yes">Switch to the previous unread tab</property> + <property name="accelerator">Return</property> + <property name="title" translatable="yes">Send the message</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>Tab</property> - <property name="title" translatable="yes">Switch to the next unread tab</property> + <property name="accelerator"><shift>Return <primary>Return</property> + <property name="title" translatable="yes">Add new line</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl><shift>Page_Up</property> - <property name="title" translatable="yes">Move tab to the left</property> + <property name="accelerator"><primary><shift>m</property> + <property name="title" translatable="yes">Select an emoji</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl><shift>Page_Down</property> - <property name="title" translatable="yes">Move tab to the right</property> + <property name="accelerator">Tab</property> + <property name="title" translatable="yes">Complete a command or a nickname</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>w</property> - <property name="title" translatable="yes">Close chat</property> + <property name="accelerator"><primary>Up</property> + <property name="title" translatable="yes">Previously sent message</property> </object> </child> - </object> - </child> - </object> - </child> - <child> - <object class="GtkShortcutsSection"> - <property name="visible">1</property> - <property name="section-name">roster</property> - <property name="title" translatable="yes">Contact List Shortcuts</property> - <child> - <object class="GtkShortcutsGroup"> - <property name="visible">1</property> - <property name="title" translatable="yes">General</property> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>n</property> - <property name="title" translatable="yes">Start a new chat</property> + <property name="accelerator"><primary>Down</property> + <property name="title" translatable="yes">Next sent messages</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>g</property> - <property name="title" translatable="yes">Create new group chat</property> + <property name="accelerator"><primary><alt>Up</property> + <property name="title" translatable="yes">Quote previous message</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>p</property> - <property name="title" translatable="yes">Preferences</property> + <property name="accelerator"><primary><alt>Down</property> + <property name="title" translatable="yes">Quote next message</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>e</property> - <property name="title" translatable="yes">Plugins</property> + <property name="accelerator"><primary>u</property> + <property name="title" translatable="yes">Clear message entry</property> </object> </child> + </object> + </child> + <child> + <object class="GtkShortcutsGroup"> + <property name="visible">1</property> + <property name="title" translatable="yes">Recent history</property> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>t</property> - <property name="title" translatable="yes">File transfers</property> + <property name="accelerator"><shift>Page_Up</property> + <property name="title" translatable="yes">Scroll up</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>s</property> - <property name="title" translatable="yes">Set the status message</property> + <property name="accelerator"><shift>Page_Down</property> + <property name="title" translatable="yes">Scroll down</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl><shift>x</property> - <property name="title" translatable="yes">Show XML console</property> + <property name="accelerator"><primary>l</property> + <property name="title" translatable="yes">Clear chat window</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>q</property> - <property name="title" translatable="yes">Quit Gajim</property> + <property name="accelerator"><primary>h</property> + <property name="title" translatable="yes">Show chat history</property> </object> </child> </object> @@ -243,60 +242,81 @@ <child> <object class="GtkShortcutsGroup"> <property name="visible">1</property> - <property name="title" translatable="yes">Appearance</property> + <property name="title" translatable="yes">Tabs</property> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>o</property> - <property name="title" translatable="yes">Show offline contacts</property> + <property name="accelerator"><primary>Page_Up</property> + <property name="title" translatable="yes">Switch to the previous tab</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>y</property> - <property name="title" translatable="yes">Show only active contacts</property> + <property name="accelerator"><primary>Page_Down</property> + <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"><ctrl>k</property> - <property name="title" translatable="yes">Enable contact list filtering</property> + <property name="accelerator"><Alt>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> - <property name="accelerator"><ctrl>r</property> - <property name="title" translatable="yes">Show / hide contact list</property> + <property name="accelerator"><primary><shift>Tab</property> + <property name="title" translatable="yes">Switch to the previous unread tab</property> </object> </child> - </object> - </child> - <child> - <object class="GtkShortcutsGroup"> - <property name="visible">1</property> - <property name="title" translatable="yes">Contacts</property> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator"><ctrl>i</property> - <property name="title" translatable="yes">Contact information</property> + <property name="accelerator"><primary>Tab</property> + <property name="title" translatable="yes">Switch to the next unread tab</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator">F2</property> - <property name="title" translatable="yes">Rename contact</property> + <property name="accelerator"><primary><shift>Page_Up</property> + <property name="title" translatable="yes">Move tab to the left</property> </object> </child> <child> <object class="GtkShortcutsShortcut"> <property name="visible">1</property> - <property name="accelerator">Delete</property> - <property name="title" translatable="yes">Delete contact</property> + <property name="accelerator"><primary><shift>Page_Down</property> + <property name="title" translatable="yes">Move tab to the right</property> + </object> + </child> + <child> + <object class="GtkShortcutsShortcut"> + <property name="visible">1</property> + <property name="accelerator"><primary>w</property> + <property name="title" translatable="yes">Close chat</property> + </object> + </child> + </object> + </child> + <child> + <object class="GtkShortcutsGroup"> + <property name="visible">1</property> + <property name="title" translatable="yes">Group Chat</property> + <child> + <object class="GtkShortcutsShortcut"> + <property name="visible">1</property> + <property name="accelerator"><primary><shift>n</property> + <property name="title" translatable="yes">Change Nickname</property> + </object> + </child> + <child> + <object class="GtkShortcutsShortcut"> + <property name="visible">1</property> + <property name="accelerator"><primary><shift>s</property> + <property name="title" translatable="yes">Change Subject</property> </object> </child> </object>
===================================== gajim/groupchat_control.py ===================================== @@ -1945,6 +1945,11 @@ class GroupchatControl(ChatControlBase): self.parent_win.window.lookup_action(control_action).activate() return Gdk.EVENT_STOP
+ if action == 'show-contact-info': + self.parent_win.window.lookup_action( + 'information-%s' % self.control_id).activate() + return Gdk.EVENT_STOP + return Gdk.EVENT_PROPAGATE
def focus(self):
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/ba079322a2fc0e1940efd03c791b1478...