--- a/ChangeLog.API Mon Sep 12 22:10:30 2022 -0500
+++ b/ChangeLog.API Mon Sep 12 22:18:06 2022 -0500
@@ -26,7 +26,6 @@
* purple_plugin_is_internal
- * 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.
@@ -506,11 +503,15 @@
* purple_notify_searchresults_row_get
* PURPLE_PLUGIN_INIT, use GPLUGIN_NATIVE_PLUGIN_DECLARE
* PurplePluginProtocolInfo
+ * purple_plugin_action_new + * purple_plugin_action_free * purple_plugin_is_unloadable
--- a/finch/gntblist.c Mon Sep 12 22:10:30 2022 -0500
+++ b/finch/gntblist.c Mon Sep 12 22:18:06 2022 -0500
@@ -2227,14 +2227,19 @@
plugin_action(GntMenuItem *item, gpointer data)
+ /* TODO: Convert to GAction/GMenu. */ PurplePluginAction *action = data;
if (action && action->callback)
action->callback(action);
build_plugin_actions(GntMenuItem *item, PurplePlugin *plugin)
+ /* TODO: port to GAction/GMenu. */ GntWidget *sub = gnt_menu_new(GNT_MENU_POPUP);
PurplePluginActionsCb actions_cb;
@@ -2257,6 +2262,7 @@
action, (GDestroyNotify)purple_plugin_action_free);
@@ -2359,6 +2365,8 @@
sub = gnt_menu_new(GNT_MENU_POPUP);
gnt_menuitem_set_submenu(plg, GNT_MENU(sub));
+ /* TODO: port to GAction/GMenu. */ for (iter = purple_plugins_get_loaded(); iter; iter = iter->next) {
PurplePlugin *plugin = iter->data;
PurplePluginInfo *info = purple_plugin_get_info(plugin);
@@ -2372,6 +2380,7 @@
gnt_menu_add_item(GNT_MENU(sub), item);
build_plugin_actions(item, plugin);
--- a/libpurple/plugins.c Mon Sep 12 22:10:30 2022 -0500
+++ b/libpurple/plugins.c Mon Sep 12 22:18:06 2022 -0500
@@ -256,44 +256,6 @@
/**************************************************************************
- **************************************************************************/
-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;
-purple_plugin_action_free(PurplePluginAction *action)
- g_return_if_fail(action != NULL);
-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)
-/**************************************************************************
**************************************************************************/
--- a/libpurple/plugins.h Mon Sep 12 22:10:30 2022 -0500
+++ b/libpurple/plugins.h Mon Sep 12 22:18:06 2022 -0500
@@ -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);
- * @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 {
- PurplePluginActionCb callback;
/**************************************************************************/
@@ -178,37 +145,6 @@
GSList *purple_plugin_get_dependent_plugins(PurplePlugin *plugin);
/**************************************************************************/
-/**************************************************************************/
- * 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
- * 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);
-/**************************************************************************/
/**************************************************************************/
--- a/libpurple/purpleplugininfo.c Mon Sep 12 22:10:30 2022 -0500
+++ b/libpurple/purpleplugininfo.c Mon Sep 12 22:18:06 2022 -0500
@@ -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 @@
@@ -113,9 +109,6 @@
priv = purple_plugin_info_get_instance_private(info);
- priv->actions_cb = g_value_get_pointer(value);
priv->pref_frame_cb = g_value_get_pointer(value);
@@ -146,10 +139,6 @@
PurplePluginInfo *info = PURPLE_PLUGIN_INFO(obj);
- g_value_set_pointer(value,
- purple_plugin_info_get_actions_cb(info));
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);
-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;
purple_plugin_info_get_pref_frame_cb(PurplePluginInfo *info) {
PurplePluginInfoPrivate *priv = NULL;
--- a/libpurple/purpleplugininfo.h Mon Sep 12 22:10:30 2022 -0500
+++ b/libpurple/purpleplugininfo.h Mon Sep 12 22:18:06 2022 -0500
@@ -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><entry><literal>"actions-cb"</literal></entry>
- * <entry>(#PurplePluginActionsCb) Callback that returns a list of
- * actions the plugin can perform.</entry>
* <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
- * Returns: The callback that returns a list of #PurplePluginAction
- * instances corresponding to the actions a plugin can perform.
-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.