--- a/pidgin/pidginapplication.c Sun Dec 31 23:24:05 2023 -0600
+++ b/pidgin/pidginapplication.c Tue Jan 02 00:33:16 2024 -0600
@@ -580,6 +580,37 @@
/******************************************************************************
+ *****************************************************************************/ +pidgin_application_add_shortcut(PidginApplication *application, + const char *accelerator) + const char *accels[] = {accelerator, NULL}; + gtk_application_set_accels_for_action(GTK_APPLICATION(application), +pidgin_application_add_shortcuts(PidginApplication *application) { + pidgin_application_add_shortcut(application, "app.file-transfers", + pidgin_application_add_shortcut(application, "app.get-user-info", + pidgin_application_add_shortcut(application, "app.manage-accounts", + pidgin_application_add_shortcut(application, "app.manage-plugins", + pidgin_application_add_shortcut(application, "app.new-message", + pidgin_application_add_shortcut(application, "app.preferences", + pidgin_application_add_shortcut(application, "app.quit", "<Primary>Q"); +/****************************************************************************** * Purple Signal Callbacks
*****************************************************************************/
@@ -943,6 +974,8 @@
g_action_map_add_action_entries(G_ACTION_MAP(application), app_entries,
G_N_ELEMENTS(app_entries), application);
+ pidgin_application_add_shortcuts(application); /* Set the default state for our actions to match our online state. */
online = purple_connections_is_online();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/resources/gtk/help-overlay.ui Tue Jan 02 00:33:16 2024 -0600
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?> +Pidgin - Internet Messenger +Copyright (C) Pidgin Developers <devel@pidgin.im> +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, see <https://www.gnu.org/licenses/>. + <requires lib="gtk" version="4.0"/> + <!-- interface-license-type gplv2 --> + <!-- interface-name Pidgin --> + <!-- interface-description Internet Messenger --> + <!-- interface-copyright Pidgin Developers <devel@pidgin.im> --> + <object class="GtkShortcutsWindow" id="help_overlay"> + <property name="modal">no</property> + <object class="GtkShortcutsSection"> + <property name="section-name">shortcuts</property> + <property name="max-height">12</property> + <object class="GtkShortcutsGroup"> + <property name="title" translatable="yes" context="shortcut window">Application Wide</property> + <object class="GtkShortcutsShortcut"> + <property name="action-name">app.new-message</property> + <property name="title" translatable="yes" context="shortcut window">Open the new message dialog</property> + <object class="GtkShortcutsShortcut"> + <property name="action-name">app.manage-accounts</property> + <property name="title" translatable="yes" context="shortcut window">Open the account manager</property> + <object class="GtkShortcutsShortcut"> + <property name="action-name">app.get-user-info</property> + <property name="title" translatable="yes" context="shortcut window">Open the get user info dialog</property> + <object class="GtkShortcutsShortcut"> + <property name="action-name">app.manage-plugins</property> + <property name="title" translatable="yes" context="shortcut window">Open the plugin manager</property> + <object class="GtkShortcutsShortcut"> + <property name="action-name">app.file-transfers</property> + <property name="title" translatable="yes" context="shortcut window">Open the file transfer manager</property> + <object class="GtkShortcutsShortcut"> + <property name="action-name">app.preferences</property> + <property name="title" translatable="yes" context="shortcut window">Show preferences</property> + <object class="GtkShortcutsShortcut"> + <property name="action-name">win.show-help-overlay</property> + <property name="title" translatable="yes" context="shortcut window">Show keyboard shortcuts</property> + <object class="GtkShortcutsShortcut"> + <property name="action-name">app.quit</property> + <property name="title" translatable="yes" context="shortcut window">Quit the application</property> --- a/pidgin/resources/gtk/menus.ui Sun Dec 31 23:24:05 2023 -0600
+++ b/pidgin/resources/gtk/menus.ui Tue Jan 02 00:33:16 2024 -0600
@@ -31,7 +31,6 @@
<attribute name="label" translatable="yes">New Instant _Message</attribute>
<attribute name="action">app.new-message</attribute>
- <attribute name="accel"><Primary>M</attribute>
<attribute name="label" translatable="yes">Join Channel</attribute>
@@ -42,14 +41,12 @@
<attribute name="label" translatable="yes">Get User _Info...</attribute>
<attribute name="action">app.get-user-info</attribute>
- <attribute name="accel"><Primary>I</attribute>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
- <attribute name="accel"><Primary>Q</attribute>
@@ -61,7 +58,6 @@
<attribute name="label" translatable="yes">Account _Manager</attribute>
<attribute name="action">app.manage-accounts</attribute>
- <attribute name="accel"><Primary>A</attribute>
<attribute name="label" translatable="yes">_Enable Account</attribute>
@@ -78,7 +74,6 @@
<attribute name="label" translatable="yes">Pr_eferences</attribute>
<attribute name="action">app.preferences</attribute>
- <attribute name="accel"><Primary>P</attribute>
@@ -86,7 +81,6 @@
<attribute name="label" translatable="yes">_File Transfers</attribute>
<attribute name="action">app.file-transfers</attribute>
- <attribute name="accel"><Primary>T</attribute>
<attribute name="label" translatable="yes">R_oom List</attribute>
@@ -108,7 +102,6 @@
<attribute name="label" translatable="yes">Manage Plu_gins</attribute>
<attribute name="action">app.manage-plugins</attribute>
- <attribute name="accel"><Primary>U</attribute>
<section id="plugins-menu"/>
@@ -122,6 +115,10 @@
<attribute name="action">app.online-help</attribute>
+ <attribute name="label" translatable="yes">Keyboard _Shortcuts</attribute> + <attribute name="action">win.show-help-overlay</attribute> <attribute name="label" translatable="yes">_Donate</attribute>
<attribute name="action">app.donate</attribute>
--- a/pidgin/resources/pidgin.gresource.xml Sun Dec 31 23:24:05 2023 -0600
+++ b/pidgin/resources/pidgin.gresource.xml Tue Jan 02 00:33:16 2024 -0600
@@ -37,6 +37,7 @@
<file compressed="true" preprocess="xml-stripblanks">Roomlist/roomlist.ui</file>
<file compressed="true" preprocess="xml-stripblanks">Whiteboard/whiteboard.ui</file>
<file compressed="true" preprocess="xml-stripblanks">Xfer/xfer.ui</file>
+ <file compressed="true" preprocess="xml-stripblanks">gtk/help-overlay.ui</file> <file compressed="true" preprocess="xml-stripblanks">gtk/menus.ui</file>
<file compressed="true" preprocess="xml-stripblanks">account-row.ui</file>
<file compressed="true" preprocess="xml-stripblanks">channeljoindialog.ui</file>