# HG changeset patch
# Node ID 25cb5377b2ef
# Parent  d57c56146156
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -26,7 +26,6 @@
 		* purple_plugin_is_internal
 		* purple_plugin_info_new
 		* purple_plugin_get_info
-		* purple_plugin_info_get_actions_cb
 		* purple_plugin_info_get_error
 		* purple_plugin_info_get_extra_cb
 		* purple_plugin_info_get_pref_frame_cb
@@ -206,8 +205,6 @@
 		  the documentation for details.
 		* PurplePluginInfo is now a GObject, inherits GPluginPluginInfo. Please
 		  see the documentation for details.
-		* PurplePluginAction no longer has a context field. Use
-		  PurpleProtocolAction for protocol actions.
 		* PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) is now
 		  PURPLE_PLUGIN_INIT(pluginname, query_func, load_func, unload_func).
 		  See "C Plugins tutorial" (tut_c_plugins.xml) for an example.
@@ -505,11 +502,15 @@
 		* purple_notify_searchresults_row_get
 		* purple_ntlm_*
 		* PURPLE_PLUGIN_INIT, use GPLUGIN_NATIVE_PLUGIN_DECLARE
-		* PurplePluginType
-		* PurplePluginPriority
+		* PurplePluginAction
+		* PurplePluginActionCb
 		* PurplePluginLoaderInfo
+		* PurplePluginPriority
 		* PurplePluginProtocolInfo
+		* PurplePluginType
 		* PurplePluginUiInfo
+		* purple_plugin_action_new
+		* purple_plugin_action_free
 		* purple_plugin_ipc_*
 		* purple_plugin_is_unloadable
 		* purple_plugin_new
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -2227,14 +2227,19 @@
 static void
 plugin_action(GntMenuItem *item, gpointer data)
 {
+	/* TODO: Convert to GAction/GMenu. */
+#if 0
 	PurplePluginAction *action = data;
 	if (action && action->callback)
 		action->callback(action);
+#endif
 }
 
 static void
 build_plugin_actions(GntMenuItem *item, PurplePlugin *plugin)
 {
+	/* TODO: port to GAction/GMenu. */
+#if 0
 	GntWidget *sub = gnt_menu_new(GNT_MENU_POPUP);
 	PurplePluginActionsCb actions_cb;
 	GList *actions;
@@ -2257,6 +2262,7 @@
 								   action, (GDestroyNotify)purple_plugin_action_free);
 		}
 	}
+#endif
 }
 
 static void
@@ -2356,6 +2362,8 @@
 	sub = gnt_menu_new(GNT_MENU_POPUP);
 	gnt_menuitem_set_submenu(plg, GNT_MENU(sub));
 
+	/* TODO: port to GAction/GMenu. */
+#if 0
 	for (iter = purple_plugins_get_loaded(); iter; iter = iter->next) {
 		PurplePlugin *plugin = iter->data;
 		PurplePluginInfo *info = purple_plugin_get_info(plugin);
@@ -2369,6 +2377,7 @@
 		gnt_menu_add_item(GNT_MENU(sub), item);
 		build_plugin_actions(item, plugin);
 	}
+#endif
 }
 
 static void
diff --git a/libpurple/plugins.h b/libpurple/plugins.h
--- a/libpurple/plugins.h
+++ b/libpurple/plugins.h
@@ -50,39 +50,6 @@
 
 #include "purpleplugininfo.h"
 
-/**
- * PURPLE_TYPE_PLUGIN_ACTION:
- *
- * The standard _get_type macro for #PurplePluginAction.
- */
-#define PURPLE_TYPE_PLUGIN_ACTION (purple_plugin_action_get_type())
-typedef struct _PurplePluginAction PurplePluginAction;
-
-/**
- * PurplePluginActionCb:
- * @action: the action information.
- *
- * A function called when the related Action Menu is activated.
- */
-typedef void (*PurplePluginActionCb)(PurplePluginAction *action);
-
-/**
- * PurplePluginAction:
- * @label: The label to display in the user interface.
- * @callback: The function to call when the user wants to perform this action.
- * @plugin: The plugin that this action belongs to.
- * @user_data: User data to pass to @callback.
- *
- * Represents an action that the plugin can perform. This shows up in the Tools
- * menu, under a submenu with the name of the plugin.
- */
-struct _PurplePluginAction {
-	char *label;
-	PurplePluginActionCb callback;
-	PurplePlugin *plugin;
-	gpointer user_data;
-};
-
 G_BEGIN_DECLS
 
 /**************************************************************************/
@@ -178,37 +145,6 @@
 GSList *purple_plugin_get_dependent_plugins(PurplePlugin *plugin);
 
 /**************************************************************************/
-/* PluginAction API                                                       */
-/**************************************************************************/
-
-/**
- * purple_plugin_action_get_type:
- *
- * Returns: The #GType for the #PurplePluginAction boxed structure.
- */
-GType purple_plugin_action_get_type(void);
-
-/**
- * purple_plugin_action_new:
- * @label:    The description of the action to show to the user.
- * @callback: (scope call): The callback to call when the user selects this
- *            action.
- *
- * Allocates and returns a new PurplePluginAction. Use this to add actions in a
- * list in the "actions-cb" callback for your plugin.
- */
-PurplePluginAction *purple_plugin_action_new(const char* label,
-		PurplePluginActionCb callback);
-
-/**
- * purple_plugin_action_free:
- * @action: The PurplePluginAction to free.
- *
- * Frees a PurplePluginAction
- */
-void purple_plugin_action_free(PurplePluginAction *action);
-
-/**************************************************************************/
 /* Plugins API                                                            */
 /**************************************************************************/
 
diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -256,44 +256,6 @@
 }
 
 /**************************************************************************
- * PluginAction API
- **************************************************************************/
-PurplePluginAction *
-purple_plugin_action_new(const char* label, PurplePluginActionCb callback)
-{
-	PurplePluginAction *action;
-
-	g_return_val_if_fail(label != NULL && callback != NULL, NULL);
-
-	action = g_new0(PurplePluginAction, 1);
-
-	action->label    = g_strdup(label);
-	action->callback = callback;
-
-	return action;
-}
-
-void
-purple_plugin_action_free(PurplePluginAction *action)
-{
-	g_return_if_fail(action != NULL);
-
-	g_free(action->label);
-	g_free(action);
-}
-
-static PurplePluginAction *
-purple_plugin_action_copy(PurplePluginAction *action)
-{
-	g_return_val_if_fail(action != NULL, NULL);
-
-	return purple_plugin_action_new(action->label, action->callback);
-}
-
-G_DEFINE_BOXED_TYPE(PurplePluginAction, purple_plugin_action,
-                    purple_plugin_action_copy, purple_plugin_action_free)
-
-/**************************************************************************
  * Plugins API
  **************************************************************************/
 GList *
diff --git a/libpurple/purpleplugininfo.h b/libpurple/purpleplugininfo.h
--- a/libpurple/purpleplugininfo.h
+++ b/libpurple/purpleplugininfo.h
@@ -79,16 +79,6 @@
 };
 
 /**
- * PurplePluginActionsCb:
- * @plugin: the plugin associated with this callback.
- *
- * Returns a list of actions the plugin can perform.
- *
- * Returns: (transfer none): A list of actions the plugin can perform.
- */
-typedef GList *(*PurplePluginActionsCb)(PurplePlugin *plugin);
-
-/**
  * PurplePluginPrefFrameCb:
  * @plugin: the plugin associated with this callback.
  *
@@ -240,10 +230,6 @@
  *     <entry>(<type>const gchar * const *</type>) A %NULL-terminated list of
  *       plugin IDs required by the plugin.</entry>
  *   </row>
- *   <row><entry><literal>"actions-cb"</literal></entry>
- *     <entry>(#PurplePluginActionsCb) Callback that returns a list of
- *       actions the plugin can perform.</entry>
- *   </row>
  *   <row><entry><literal>"pref-frame-cb"</literal></entry>
  *     <entry>(#PurplePluginPrefFrameCb) Callback that returns a
  *       preferences frame for the plugin.</entry>
@@ -268,20 +254,6 @@
 GPluginPluginInfo *purple_plugin_info_new(const char *first_property, ...) G_GNUC_NULL_TERMINATED;
 
 /**
- * purple_plugin_info_get_actions_cb:
- * @info: The plugin info to get the callback from.
- *
- * Returns the callback that retrieves the list of actions a plugin can perform
- * at that moment.
- *
- * Returns: The callback that returns a list of #PurplePluginAction
- *          instances corresponding to the actions a plugin can perform.
- *
- * Since: 3.0.0
- */
-PurplePluginActionsCb purple_plugin_info_get_actions_cb(PurplePluginInfo *info);
-
-/**
  * purple_plugin_info_get_pref_frame_cb:
  * @info: The plugin info to get the callback from.
  *
diff --git a/libpurple/purpleplugininfo.c b/libpurple/purpleplugininfo.c
--- a/libpurple/purpleplugininfo.c
+++ b/libpurple/purpleplugininfo.c
@@ -31,9 +31,6 @@
 
 	PurplePluginInfoFlags flags; /* Flags for the plugin */
 
-	/* Callback that returns a list of actions the plugin can perform */
-	PurplePluginActionsCb actions_cb;
-
 	/* Callback that returns a preferences frame for a plugin */
 	PurplePluginPrefFrameCb pref_frame_cb;
 
@@ -50,7 +47,6 @@
 
 enum {
 	PROP_0,
-	PROP_ACTIONS_CB,
 	PROP_PREF_FRAME_CB,
 	PROP_PREF_REQUEST_CB,
 	PROP_FLAGS,
@@ -113,9 +109,6 @@
 	priv = purple_plugin_info_get_instance_private(info);
 
 	switch (param_id) {
-		case PROP_ACTIONS_CB:
-			priv->actions_cb = g_value_get_pointer(value);
-			break;
 		case PROP_PREF_FRAME_CB:
 			priv->pref_frame_cb = g_value_get_pointer(value);
 			break;
@@ -146,10 +139,6 @@
 	PurplePluginInfo *info = PURPLE_PLUGIN_INFO(obj);
 
 	switch (param_id) {
-		case PROP_ACTIONS_CB:
-			g_value_set_pointer(value,
-					purple_plugin_info_get_actions_cb(info));
-			break;
 		case PROP_PREF_FRAME_CB:
 			g_value_set_pointer(value,
 					purple_plugin_info_get_pref_frame_cb(info));
@@ -231,11 +220,6 @@
 	obj_class->get_property = purple_plugin_info_get_property;
 	obj_class->set_property = purple_plugin_info_set_property;
 
-	properties[PROP_ACTIONS_CB] = g_param_spec_pointer(
-		"actions-cb", "Plugin actions",
-		"Callback that returns list of plugin's actions",
-		G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
-
 	properties[PROP_PREF_FRAME_CB] = g_param_spec_pointer(
 		"pref-frame-cb", "Preferences frame callback",
 		"The callback that returns the preferences frame",
@@ -303,17 +287,6 @@
 	return GPLUGIN_PLUGIN_INFO(info);
 }
 
-PurplePluginActionsCb
-purple_plugin_info_get_actions_cb(PurplePluginInfo *info) {
-	PurplePluginInfoPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_PLUGIN_INFO(info), NULL);
-
-	priv = purple_plugin_info_get_instance_private(info);
-
-	return priv->actions_cb;
-}
-
 PurplePluginPrefFrameCb
 purple_plugin_info_get_pref_frame_cb(PurplePluginInfo *info) {
 	PurplePluginInfoPrivate *priv = NULL;
