# HG changeset patch # User Richard Laager # Date 1134374703 0 # Node ID 2b08a27c2342ec059a93631b68e008e93f79e9c7 # Parent b1717befbb26f7f639282cfb0163d5a45884bcca [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 diff -r b1717befbb26 -r 2b08a27c2342 src/gtkblist.c --- 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); }