# HG changeset patch
# Node ID 763ac9218d62
# Parent  1a53026013e4
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -817,7 +817,10 @@
 		* gtk_imhtml_image_scale
 		* pidgin_accounts_window_hide
 		* pidgin_accounts_window_show, use pidgin_account_manager_new instead.
+		* pidgin_append_blist_node_extended_menu
 		* pidgin_append_blist_node_privacy_menu
+		* pidgin_append_blist_node_proto_menu
+		* pidgin_append_menu_action
 		* pidgin_blist_draw_tooltip
 		* pidgin_blist_get_theme
 		* pidgin_blist_layout_get_type
@@ -961,6 +964,7 @@
 		* pidgin_make_pretty_arrows
 		* pidgin_menu_position_func_helper
 		* pidgin_mini_dialog_links_supported
+		* pidgin_new_check_item
 		* pidgin_notify_emails_pending
 		* pidgin_notify_emails_present
 		* pidgin_parse_x_im_contact
@@ -977,6 +981,7 @@
 		* pidgin_protocol_option_menu_get_selected
 		* pidgin_save_accels
 		* pidgin_save_accels_cb
+		* pidgin_separator
 		* pidgin_set_cursor
 		* pidgin_set_custom_buddy_icon
 		* pidgin_set_sensitive_if_input
diff --git a/pidgin/gtkblist.h b/pidgin/gtkblist.h
--- a/pidgin/gtkblist.h
+++ b/pidgin/gtkblist.h
@@ -258,22 +258,6 @@
 void pidgin_blist_joinchat_show(void);
 
 /**
- * pidgin_append_blist_node_proto_menu:
- *
- * Appends the protocol specific menu items for a PurpleBlistNode
- */
-/* TODO Rename these. */
-void pidgin_append_blist_node_proto_menu (GtkWidget *menu, PurpleConnection *gc, PurpleBlistNode *node);
-
-/**
- * pidgin_append_blist_node_extended_menu:
- *
- * Appends the extended menu items for a PurpleBlistNode
- */
-/* TODO Rename these. */
-void pidgin_append_blist_node_extended_menu(GtkWidget *menu, PurpleBlistNode *node);
-
-/**
  * pidgin_blist_get_name_markup:
  * @buddy: The buddy to return markup from
  * @selected:  Whether this buddy is selected. If TRUE, the markup will not change the color.
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -1461,25 +1461,6 @@
 	}
 }
 
-void
-pidgin_append_blist_node_proto_menu(GtkWidget *menu, PurpleConnection *gc,
-                                      PurpleBlistNode *node)
-{
-	GList *l, *ll;
-	PurpleProtocol *protocol = purple_connection_get_protocol(gc);
-
-	if(!PURPLE_IS_PROTOCOL_CLIENT(protocol)) {
-		return;
-	}
-
-	ll = purple_protocol_client_blist_node_menu(PURPLE_PROTOCOL_CLIENT(protocol), node);
-	for(l = ll; l; l = l->next) {
-		PurpleActionMenu *act = (PurpleActionMenu *) l->data;
-		pidgin_append_menu_action(menu, act, node);
-	}
-	g_list_free(ll);
-}
-
 static gboolean
 pidgin_blist_key_press_cb(G_GNUC_UNUSED GtkEventControllerKey *controller,
                           guint keyval, G_GNUC_UNUSED guint keycode,
@@ -1580,18 +1561,6 @@
 	return FALSE;
 }
 
-void
-pidgin_append_blist_node_extended_menu(GtkWidget *menu, PurpleBlistNode *node)
-{
-	GList *l, *ll;
-
-	for(l = ll = purple_blist_node_get_extended_menu(node); l; l = l->next) {
-		PurpleActionMenu *act = (PurpleActionMenu *) l->data;
-		pidgin_append_menu_action(menu, act, node);
-	}
-	g_list_free(ll);
-}
-
 static gboolean
 pidgin_blist_show_context_menu(GtkWidget *tv, PurpleBlistNode *node, GdkEventButton *event)
 {
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -758,15 +758,6 @@
 			g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free);
 	}
 
-	if (buddy != NULL)
-	{
-		if (purple_account_is_connected(account))
-			pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(account),
-												  (PurpleBlistNode *)buddy);
-		pidgin_append_blist_node_extended_menu(menu, (PurpleBlistNode *)buddy);
-		gtk_widget_show_all(menu);
-	}
-
 	return menu;
 }
 
diff --git a/pidgin/gtkutils.h b/pidgin/gtkutils.h
--- a/pidgin/gtkutils.h
+++ b/pidgin/gtkutils.h
@@ -55,31 +55,6 @@
 G_BEGIN_DECLS
 
 /**
- * pidgin_separator:
- * @menu: The menu to add a separator to.
- *
- * Adds a separator to a menu.
- *
- * Returns: (transfer full): The separator.
- */
-GtkWidget *pidgin_separator(GtkWidget *menu);
-
-/**
- * pidgin_new_check_item:
- * @menu: The menu to which to append the check menu item.
- * @str: The title to use for the newly created menu item.
- * @cb: (scope call): A function to call when the menu item is activated.
- * @data: Data to pass to the signal function.
- * @checked: The initial state of the check item
- *
- * Creates a check menu item.
- *
- * Returns: (transfer full): The newly created menu item.
- */
-GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str,
-		GCallback cb, gpointer data, gboolean checked);
-
-/**
  * pidgin_new_menu_item:
  * @menu:       The menu to which to append the menu item.
  * @mnemonic:   The title for the menu item.
@@ -230,19 +205,6 @@
 GdkPixbuf *pidgin_create_icon_from_protocol(PurpleProtocol *protocol, PidginProtocolIconSize size, PurpleAccount *account);
 
 /**
- * pidgin_append_menu_action:
- * @menu:    The menu to append to.
- * @act:     The PurpleActionMenu to append.
- * @gobject: The object to be passed to the action callback.
- *
- * Append a PurpleActionMenu to a menu.
- *
- * Returns: (transfer full): The menuitem added.
- */
-GtkWidget *pidgin_append_menu_action(GtkWidget *menu, PurpleActionMenu *act,
-                                 gpointer gobject);
-
-/**
  * pidgin_buddy_icon_chooser_new:
  * @parent:      The parent window
  * @callback:    The callback to call when the window is closed. If the user chose an icon, the char* argument will point to its path
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -101,35 +101,6 @@
  * Code
  *****************************************************************************/
 
-GtkWidget *pidgin_separator(GtkWidget *menu)
-{
-	GtkWidget *menuitem;
-
-	menuitem = gtk_separator_menu_item_new();
-	gtk_widget_show(menuitem);
-	gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-	return menuitem;
-}
-
-GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str,
-		GCallback cb, gpointer data, gboolean checked)
-{
-	GtkWidget *menuitem;
-	menuitem = gtk_check_menu_item_new_with_mnemonic(str);
-
-	if (menu)
-		gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-
-	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), checked);
-
-	if (cb)
-		g_signal_connect(G_OBJECT(menuitem), "activate", cb, data);
-
-	gtk_widget_show_all(menuitem);
-
-	return menuitem;
-}
-
 GtkWidget *pidgin_new_menu_item(GtkWidget *menu, const char *mnemonic,
                 const char *icon, GCallback cb, gpointer data)
 {
@@ -408,93 +379,6 @@
 	return pidgin_create_icon_from_protocol(protocol, size, account);
 }
 
-static void
-menu_action_cb(GtkMenuItem *item, gpointer object)
-{
-	gpointer data;
-	void (*callback)(gpointer, gpointer);
-
-	callback = g_object_get_data(G_OBJECT(item), "purplecallback");
-	data = g_object_get_data(G_OBJECT(item), "purplecallbackdata");
-
-	if (callback)
-		callback(object, data);
-}
-
-static GtkWidget *
-do_pidgin_append_menu_action(GtkWidget *menu, PurpleActionMenu *act,
-				    gpointer object)
-{
-	GtkWidget *menuitem;
-	GList *list;
-
-	if (act == NULL) {
-		return pidgin_separator(menu);
-	}
-
-	menuitem = gtk_menu_item_new_with_mnemonic(
-	        purple_action_menu_get_label(act));
-
-	list = purple_action_menu_get_children(act);
-
-	if (list == NULL) {
-		GCallback callback;
-
-		callback = purple_action_menu_get_callback(act);
-
-		if (callback != NULL) {
-			g_object_set_data(G_OBJECT(menuitem),
-							  "purplecallback",
-							  callback);
-			g_object_set_data(G_OBJECT(menuitem),
-							  "purplecallbackdata",
-							  purple_action_menu_get_data(act));
-			g_signal_connect(G_OBJECT(menuitem), "activate",
-							 G_CALLBACK(menu_action_cb),
-							 object);
-		} else {
-			gtk_widget_set_sensitive(menuitem, FALSE);
-		}
-
-		gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-	} else {
-		GList *l = NULL;
-		GtkWidget *submenu = NULL;
-		GtkAccelGroup *group;
-
-		gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-
-		submenu = gtk_menu_new();
-		gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu);
-
-		group = gtk_menu_get_accel_group(GTK_MENU(menu));
-		if (group) {
-			char *path = g_strdup_printf("%s/%s",
-				gtk_menu_item_get_accel_path(GTK_MENU_ITEM(menuitem)),
-				purple_action_menu_get_label(act));
-			gtk_menu_set_accel_path(GTK_MENU(submenu), path);
-			g_free(path);
-			gtk_menu_set_accel_group(GTK_MENU(submenu), group);
-		}
-
-		for (l = list; l; l = l->next) {
-			PurpleActionMenu *act = (PurpleActionMenu *)l->data;
-
-			do_pidgin_append_menu_action(submenu, act, object);
-		}
-	}
-	return menuitem;
-}
-
-GtkWidget *
-pidgin_append_menu_action(GtkWidget *menu, PurpleActionMenu *act,
-                            gpointer object)
-{
-	GtkWidget *menuitem = do_pidgin_append_menu_action(menu, act, object);
-	purple_action_menu_free(act);
-	return menuitem;
-}
-
 static gboolean buddyname_completion_match_func(GtkEntryCompletion *completion,
 		const gchar *key, GtkTreeIter *iter, gpointer user_data)
 {
