# HG changeset patch
# Node ID 5bcd72c48b3bf290ac86f730bf50847019380e09
# Parent  6e07afd9ac3f13f081f3f4554d79af995af39120
diff --git a/libpurple/meson.build b/libpurple/meson.build
--- a/libpurple/meson.build
+++ b/libpurple/meson.build
@@ -52,7 +52,6 @@
 	'purplepresence.c',
 	'purplepresencemanager.c',
 	'purpleprotocol.c',
-	'purpleprotocolactions.c',
 	'purpleprotocolcontacts.c',
 	'purpleprotocolconversation.c',
 	'purpleprotocolfiletransfer.c',
@@ -141,7 +140,6 @@
 	'purplepresence.h',
 	'purplepresencemanager.h',
 	'purpleprotocol.h',
-	'purpleprotocolactions.h',
 	'purpleprotocolcontacts.h',
 	'purpleprotocolconversation.h',
 	'purpleprotocolfiletransfer.h',
diff --git a/libpurple/purpleprotocolactions.h b/libpurple/purpleprotocolactions.h
deleted file mode 100644
--- a/libpurple/purpleprotocolactions.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Purple - Internet Messaging Library
- * Copyright (C) Pidgin Developers <devel@pidgin.im>
- *
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
-# error "only <purple.h> may be included directly"
-#endif
-
-#ifndef PURPLE_PROTOCOL_ACTIONS_H
-#define PURPLE_PROTOCOL_ACTIONS_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include "connection.h"
-#include "purpleprotocol.h"
-#include "purpleversion.h"
-
-#define PURPLE_TYPE_PROTOCOL_ACTIONS (purple_protocol_actions_get_type())
-
-PURPLE_AVAILABLE_IN_3_0
-G_DECLARE_INTERFACE(PurpleProtocolActions, purple_protocol_actions, PURPLE,
-                    PROTOCOL_ACTIONS, PurpleProtocol)
-
-/**
- * PurpleProtocolActions:
- *
- * The #PurpleProtocolActions interface defines the behavior of a protocol's
- * actions interface.
- *
- * Since: 3.0
- */
-
-struct _PurpleProtocolActionsInterface {
-	/*< private >*/
-	GTypeInterface parent;
-
-	/*< public >*/
-	const gchar *(*get_prefix)(PurpleProtocolActions *actions);
-
-	GActionGroup *(*get_action_group)(PurpleProtocolActions *actions, PurpleConnection *connection);
-
-	GMenu *(*get_menu)(PurpleProtocolActions *actions, PurpleConnection *connection);
-
-	/*< private >*/
-	gpointer reserved[4];
-};
-
-G_BEGIN_DECLS
-
-/**
- * purple_protocol_actions_get_prefix:
- * @actions: The PurpleProtocolActions instance.
- *
- * The prefix that should be used when inserting the action group into widgets.
- *
- * Returns: Gets the prefix for the name of the actions in @actions.
- *
- * Since: 3.0
- */
-PURPLE_AVAILABLE_IN_3_0
-const gchar *purple_protocol_actions_get_prefix(PurpleProtocolActions *actions);
-
-/**
- * purple_protocol_actions_get_action_group:
- * @actions: The PurpleProtocolActions instance.
- * @connection: The [class@Connection] instance.
- *
- * Gets a group of actions for @connection.
- *
- * Returns: (transfer full): The group of actions for @connection.
- *
- * Since: 3.0
- */
-PURPLE_AVAILABLE_IN_3_0
-GActionGroup *purple_protocol_actions_get_action_group(PurpleProtocolActions *actions, PurpleConnection *connection);
-
-/**
- * purple_protocol_actions_get_menu:
- * @actions: The [iface@ProtocolActions] instance.
- * @connection: (nullable): The [class@Connection] instance.
- *
- * Gets the menu used to display the protocol actions for @connection.
- *
- * Returns: (transfer full): The menu to display or %NULL.
- *
- * Since: 3.0
- */
-PURPLE_AVAILABLE_IN_3_0
-GMenu *purple_protocol_actions_get_menu(PurpleProtocolActions *actions, PurpleConnection *connection);
-
-/**
- * purple_protocol_actions_changed:
- * @actions: The instance.
- * @account: The [class@Account] whose actions changed.
- *
- * Emits the [signal@ProtocolActions::actions-changed] signal. This is meant to
- * be called by [iface@ProtocolActions] implementations when actions have
- * changed.
- *
- * Since: 3.0
- */
-PURPLE_AVAILABLE_IN_3_0
-void purple_protocol_actions_changed(PurpleProtocolActions *actions, PurpleAccount *account);
-
-G_END_DECLS
-
-#endif /* PURPLE_PROTOCOL_ACTIONS_H */
diff --git a/libpurple/purpleprotocolactions.c b/libpurple/purpleprotocolactions.c
deleted file mode 100644
--- a/libpurple/purpleprotocolactions.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Purple - Internet Messaging Library
- * Copyright (C) Pidgin Developers <devel@pidgin.im>
- *
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include "purpleprotocolactions.h"
-
-enum {
-	SIG_ACTIONS_CHANGED,
-	N_SIGNALS,
-};
-static guint signals[N_SIGNALS] = {0, };
-
-/******************************************************************************
- * GObject Implementation
- *****************************************************************************/
-G_DEFINE_INTERFACE(PurpleProtocolActions, purple_protocol_actions,
-                   PURPLE_TYPE_PROTOCOL)
-
-static void
-purple_protocol_actions_default_init(PurpleProtocolActionsInterface *iface) {
-	/**
-	 * PurpleProtocolActions::actions-changed:
-	 * @self: The instance.
-	 * @account: The [class@Account] whose actions changed.
-	 *
-	 * A signal that is emitted to tell interested parties that the actions
-	 * have changed.
-	 *
-	 * Since: 3.0
-	 */
-	signals[SIG_ACTIONS_CHANGED] = g_signal_new_class_handler(
-		"actions-changed",
-		G_TYPE_FROM_INTERFACE(iface),
-		G_SIGNAL_RUN_LAST,
-		NULL,
-		NULL,
-		NULL,
-		NULL,
-		G_TYPE_NONE,
-		1,
-		PURPLE_TYPE_ACCOUNT);
-}
-
-/******************************************************************************
- * Public API
- *****************************************************************************/
-const gchar *
-purple_protocol_actions_get_prefix(PurpleProtocolActions *actions) {
-	PurpleProtocolActionsInterface *iface = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_PROTOCOL_ACTIONS(actions), NULL);
-
-	iface = PURPLE_PROTOCOL_ACTIONS_GET_IFACE(actions);
-	if(iface != NULL) {
-		if(iface->get_prefix != NULL) {
-			return iface->get_prefix(actions);
-		} else {
-			return purple_protocol_get_id(PURPLE_PROTOCOL(actions));
-		}
-	}
-
-	return NULL;
-}
-
-GActionGroup *
-purple_protocol_actions_get_action_group(PurpleProtocolActions *actions,
-                                         PurpleConnection *connection)
-{
-	PurpleProtocolActionsInterface *iface = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_PROTOCOL_ACTIONS(actions), NULL);
-	g_return_val_if_fail(PURPLE_IS_CONNECTION(connection), NULL);
-
-	iface = PURPLE_PROTOCOL_ACTIONS_GET_IFACE(actions);
-	if(iface != NULL && iface->get_action_group != NULL) {
-		return iface->get_action_group(actions, connection);
-	}
-
-	return NULL;
-}
-
-GMenu *
-purple_protocol_actions_get_menu(PurpleProtocolActions *actions,
-                                 PurpleConnection *connection)
-{
-	PurpleProtocolActionsInterface *iface = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_PROTOCOL_ACTIONS(actions), NULL);
-
-	iface = PURPLE_PROTOCOL_ACTIONS_GET_IFACE(actions);
-	if(iface != NULL && iface->get_menu != NULL) {
-		return iface->get_menu(actions, connection);
-	}
-
-	return NULL;
-}
-
-void
-purple_protocol_actions_changed(PurpleProtocolActions *actions,
-                                PurpleAccount *account)
-{
-	g_return_if_fail(PURPLE_IS_PROTOCOL_ACTIONS(actions));
-	g_return_if_fail(PURPLE_IS_ACCOUNT(account));
-
-	g_signal_emit(actions, signals[SIG_ACTIONS_CHANGED], 0, account);
-}
diff --git a/libpurple/purpleprotocolcontacts.h b/libpurple/purpleprotocolcontacts.h
--- a/libpurple/purpleprotocolcontacts.h
+++ b/libpurple/purpleprotocolcontacts.h
@@ -208,9 +208,6 @@
  *
  * Gets a [class@Gio.MenuModel] for @info.
  *
- * This menu will have at least the action groups from [iface@ProtocolActions]
- * and [iface@ProtocolContacts] available to it.
- *
  * Returns: (transfer full): The menu model or %NULL.
  *
  * Since: 3.0
diff --git a/libpurple/purpleprotocolmanager.c b/libpurple/purpleprotocolmanager.c
--- a/libpurple/purpleprotocolmanager.c
+++ b/libpurple/purpleprotocolmanager.c
@@ -25,8 +25,6 @@
 #include "purpleprotocolmanager.h"
 #include "purpleprivate.h"
 
-#include "purpleprotocolactions.h"
-
 enum {
 	PROP_0,
 	PROP_ITEM_TYPE,
@@ -38,7 +36,6 @@
 enum {
 	SIG_REGISTERED,
 	SIG_UNREGISTERED,
-	SIG_ACCOUNT_ACTIONS_CHANGED,
 	N_SIGNALS,
 };
 static guint signals[N_SIGNALS] = {0, };
@@ -53,19 +50,6 @@
 static PurpleProtocolManager *default_manager = NULL;
 
 /******************************************************************************
- * Callbacks
- *****************************************************************************/
-static void
-purple_protocol_manager_actions_changed_cb(PurpleProtocolActions *actions,
-                                           PurpleAccount *account,
-                                           gpointer data)
-{
-	/* Propagate the actions-changed signal. */
-	g_signal_emit(data, signals[SIG_ACCOUNT_ACTIONS_CHANGED], 0, actions,
-	              account);
-}
-
-/******************************************************************************
  * GListModel Implementation
  *****************************************************************************/
 static GType
@@ -223,31 +207,6 @@
 		G_TYPE_NONE,
 		1,
 		PURPLE_TYPE_PROTOCOL);
-
-	/**
-	 * PurpleProtocolManager::account-actions-changed:
-	 * @manager: The instance.
-	 * @protocol: The [class@Protocol] whose actions changed.
-	 * @account: The [class@Account] whose actions changed.
-	 *
-	 * This is a propagation of the [signal@ProtocolActions::actions-changed]
-	 * signal and will only be emitted for protocols that implement
-	 * [iface@ProtocolActions].
-	 *
-	 * Since: 3.0
-	 */
-	signals[SIG_ACCOUNT_ACTIONS_CHANGED] = g_signal_new_class_handler(
-		"account-actions-changed",
-		G_OBJECT_CLASS_TYPE(klass),
-		G_SIGNAL_RUN_LAST,
-		NULL,
-		NULL,
-		NULL,
-		NULL,
-		G_TYPE_NONE,
-		2,
-		PURPLE_TYPE_PROTOCOL,
-		PURPLE_TYPE_ACCOUNT);
 }
 
 /******************************************************************************
@@ -297,13 +256,6 @@
 
 	g_signal_emit(G_OBJECT(manager), signals[SIG_REGISTERED], 0, protocol);
 
-	/* Connect the signals we want to propagate. */
-	if(PURPLE_IS_PROTOCOL_ACTIONS(protocol)) {
-		g_signal_connect_object(protocol, "actions-changed",
-		                        G_CALLBACK(purple_protocol_manager_actions_changed_cb),
-		                        manager, 0);
-	}
-
 	return TRUE;
 }
 
@@ -332,15 +284,6 @@
 		if(g_ptr_array_find(manager->list, protocol, &position)) {
 			g_ptr_array_remove_index(manager->list, position);
 			g_list_model_items_changed(G_LIST_MODEL(manager), position, 1, 0);
-
-			/* Disconnect our signal handlers for tracking changes if this is a
-			 * PurpleProtocolActions implementation.
-			 */
-			if(PURPLE_IS_PROTOCOL_ACTIONS(protocol)) {
-				g_signal_handlers_disconnect_by_func(protocol,
-				                                     purple_protocol_manager_actions_changed_cb,
-				                                     manager);
-			}
 		}
 
 		g_signal_emit(G_OBJECT(manager), signals[SIG_UNREGISTERED], 0,
