# HG changeset patch
# Node ID b241f196dc00
# Parent  bcfc2c9e5213
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -399,6 +399,9 @@
 		* purple_certificate_get_fingerprint_sha256
 		* Purple Cipher API (PurpleCipherContext and friends).
 		  Use GLib's GHmac or GChecksum instead.
+		* PurpleCommandsUiOps
+		* purple_cmds_get_ui_ops
+		* purple_cmds_set_ui_ops
 		* PURPLE_CMD_FUNC
 		* purple_connection_error_reason
 		* PURPLE_CONNECTION_FLAG_ALLOW_CUSTOM_SMILEY
diff --git a/libpurple/cmds.h b/libpurple/cmds.h
--- a/libpurple/cmds.h
+++ b/libpurple/cmds.h
@@ -141,36 +141,6 @@
 	PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS = 0x08
 } PurpleCmdFlag;
 
-/**
- * PurpleCommandsUiOps:
- * @register_command: If implemented, the UI is responsible for handling
- *		commands. See @purple_cmd_register for the argument values.
- * @unregister_command: Should be implemented if register_command is
- *		implemented. @name and @prpl_id will have the same value
- *		that were used for the register_command call.
- *
- * Command UI operations;  UIs should implement this if they want to handle
- * commands themselves, rather than relying on the core.
- *
- * See <link linkend="chapter-ui-ops">List of <literal>UiOps</literal>
- * Structures</link>
- *
- * Since: 2.11.0
- */
-typedef struct {
-	void (*register_command)(const gchar *name, PurpleCmdPriority priority,
-				 PurpleCmdFlag flags, const gchar *prpl_id,
-				 const gchar *help, PurpleCmdId id);
-
-	void (*unregister_command)(const gchar *name, const gchar *prpl_id);
-
-	/*< private >*/
-	void (*_purple_reserved1)(void);
-	void (*_purple_reserved2)(void);
-	void (*_purple_reserved3)(void);
-	void (*_purple_reserved4)(void);
-} PurpleCommandsUiOps;
-
 G_BEGIN_DECLS
 
 /**************************************************************************/
@@ -327,26 +297,6 @@
 gpointer purple_cmds_get_handle(void);
 
 /**
- * purple_cmds_set_ui_ops:
- * @ops: The UI operations structure.
- *
- * Sets the UI operations structure to be used when registering and
- * unregistering commands.  The UI operations need only be set if the
- * UI wants to handle the commands itself; otherwise, leave it as NULL.
- */
-void purple_cmds_set_ui_ops(PurpleCommandsUiOps *ops);
-
-/**
- * purple_cmds_get_ui_ops:
- *
- * Returns the UI operations structure to be used when registering and
- * unregistering commands.
- *
- * Returns: (transfer none): The UI operations structure.
- */
-PurpleCommandsUiOps *purple_cmds_get_ui_ops(void);
-
-/**
  * purple_cmds_init:
  *
  * Initialize the commands subsystem.
diff --git a/libpurple/cmds.c b/libpurple/cmds.c
--- a/libpurple/cmds.c
+++ b/libpurple/cmds.c
@@ -20,7 +20,6 @@
 #include "purplemarkup.h"
 #include "cmds.h"
 
-static PurpleCommandsUiOps *cmds_ui_ops = NULL;
 static GList *cmds = NULL;
 static guint next_id = 1;
 
@@ -49,7 +48,6 @@
 {
 	PurpleCmdId id;
 	PurpleCmd *c;
-	PurpleCommandsUiOps *ops;
 
 	g_return_val_if_fail(cmd != NULL && *cmd != '\0', 0);
 	g_return_val_if_fail(args != NULL, 0);
@@ -70,10 +68,6 @@
 
 	cmds = g_list_insert_sorted(cmds, c, (GCompareFunc)cmds_compare_func);
 
-	ops = purple_cmds_get_ui_ops();
-	if (ops && ops->register_command)
-		ops->register_command(cmd, p, f, protocol_id, helpstr, c->id);
-
 	purple_signal_emit(purple_cmds_get_handle(), "cmd-added", cmd, p, f);
 
 	return id;
@@ -98,7 +92,6 @@
 {
 	PurpleCmd *c;
 	GList *l;
-	PurpleCommandsUiOps *ops;
 
 	l = g_list_find_custom(cmds, GUINT_TO_POINTER(id), purple_cmd_cmp_id);
 	if (!l) {
@@ -107,11 +100,6 @@
 
 	c = l->data;
 
-	ops = purple_cmds_get_ui_ops();
-	if (ops && ops->unregister_command) {
-		ops->unregister_command(c->cmd, c->protocol_id);
-	}
-
 	cmds = g_list_delete_link(cmds, l);
 	purple_signal_emit(purple_cmds_get_handle(), "cmd-removed", c->cmd);
 	purple_cmd_free(c);
@@ -388,21 +376,6 @@
 	return &handle;
 }
 
-void
-purple_cmds_set_ui_ops(PurpleCommandsUiOps *ops)
-{
-	cmds_ui_ops = ops;
-}
-
-PurpleCommandsUiOps *
-purple_cmds_get_ui_ops(void)
-{
-	/* It is perfectly acceptable for cmds_ui_ops to be NULL; this just
-	 * means that the default libpurple implementation will be used.
-	 */
-	return cmds_ui_ops;
-}
-
 void purple_cmds_init(void)
 {
 	gpointer handle = purple_cmds_get_handle();
