Mercurial > pidgin.yaz
changeset 12464:2b08a27c2342
[gaim-migrate @ 14774]
SF Patch #1374808 from Sadrul
'This patch allows to change the accel-keys for the
plugin-action menu items using the standard
"select-keypress" thing.'
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 12 Dec 2005 08:05:03 +0000 |
parents | b1717befbb26 |
children | ae4ae98bca20 |
files | src/gtkblist.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Mon Dec 12 07:35:43 2005 +0000 +++ b/src/gtkblist.c Mon Dec 12 08:05:03 2005 +0000 @@ -5570,6 +5570,7 @@ GtkWidget *menuitem, *submenu; GaimPlugin *plugin = NULL; GList *l; + GtkAccelGroup *accel_group; GtkWidget *pluginmenu = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools")); @@ -5597,8 +5598,11 @@ g_list_free(plugin_submenus); plugin_submenus = NULL; + accel_group = gtk_menu_get_accel_group(GTK_MENU(pluginmenu)); + /* Add a submenu for each plugin with custom actions */ for (l = gaim_plugins_get_loaded(); l; l = l->next) { + char *path; plugin = (GaimPlugin *) l->data; @@ -5617,6 +5621,11 @@ submenu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); gtk_widget_show(submenu); + + gtk_menu_set_accel_group(GTK_MENU(submenu), accel_group); + path = g_strdup_printf("%s/Tools/%s", gtkblist->ift->path, plugin->info->name); + gtk_menu_set_accel_path(GTK_MENU(submenu), path); + g_free(path); build_plugin_actions(submenu, plugin); }