# HG changeset patch # User Elliott Sales de Andrade # Date 1248749320 0 # Node ID f55f8592986c85535059d4d25bb438df1f4ca232 # Parent c8e05a81428f06b358217bc104352b43214eb22c Don't get account and plugin actions confused by using the same action name for both of them. diff -r c8e05a81428f -r f55f8592986c pidgin/gtkblist.c --- a/pidgin/gtkblist.c Tue Jul 28 02:41:18 2009 +0000 +++ b/pidgin/gtkblist.c Tue Jul 28 02:48:40 2009 +0000 @@ -8091,7 +8091,7 @@ #if GTK_CHECK_VERSION(2,4,0) static void -build_plugin_actions(GtkActionGroup *action_group, GString *ui, int parent, +build_plugin_actions(GtkActionGroup *action_group, GString *ui, char *parent, PurplePlugin *plugin, gpointer context) { GtkAction *menuaction; @@ -8108,7 +8108,7 @@ action->plugin = plugin; action->context = context; - name = g_strdup_printf("plugin-%d-action-%d", parent, count++); + name = g_strdup_printf("%s-action-%d", parent, count++); menuaction = gtk_action_new(name, action->label, NULL, NULL); gtk_action_group_add_action(action_group, menuaction); g_string_append_printf(ui, "", name); @@ -8263,7 +8263,9 @@ gc = purple_account_get_connection(account); plugin = gc && PURPLE_CONNECTION_IS_CONNECTED(gc) ? gc->prpl : NULL; if (plugin && PURPLE_PLUGIN_HAS_ACTIONS(plugin)) { - build_plugin_actions(accounts_action_group, accounts_ui, count, plugin, gc); + name = g_strdup_printf("account%d", count); + build_plugin_actions(accounts_action_group, accounts_ui, name, plugin, gc); + g_free(name); } else { g_string_append(accounts_ui, ""); } @@ -8481,12 +8483,13 @@ action = gtk_action_new(name, plugin->info->name, NULL, NULL); gtk_action_group_add_action(plugins_action_group, action); g_string_append_printf(plugins_ui, "", name); - g_free(name); - - build_plugin_actions(plugins_action_group, plugins_ui, count, plugin, NULL); + + build_plugin_actions(plugins_action_group, plugins_ui, name, plugin, NULL); g_string_append(plugins_ui, ""); count++; + + g_free(name); } ui_string = g_strconcat("",