# HG changeset patch
# Node ID 4c5887e3323cdd52097dee7e68773f119e23535f
# Parent  02efd429f4b378cc7bd46aa32531b9f5d59a3c4c
diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -33,7 +33,6 @@
 #include "purpleconversationmanager.h"
 #include "purplecredentialmanager.h"
 #include "purpleenums.h"
-#include "signals.h"
 #include "util.h"
 
 static guint    save_timer = 0;
@@ -514,14 +513,6 @@
 	                                               g_object_ref(account));
 }
 
-void *
-purple_accounts_get_handle(void)
-{
-	static int handle;
-
-	return &handle;
-}
-
 void
 purple_accounts_init(void)
 {
@@ -535,11 +526,8 @@
 void
 purple_accounts_uninit(void)
 {
-	gpointer handle = purple_accounts_get_handle();
 	if(save_timer != 0) {
 		g_clear_handle_id(&save_timer, g_source_remove);
 		sync_accounts();
 	}
-
-	purple_signals_disconnect_by_handle(handle);
 }
diff --git a/libpurple/accounts.h b/libpurple/accounts.h
--- a/libpurple/accounts.h
+++ b/libpurple/accounts.h
@@ -56,18 +56,6 @@
 /**************************************************************************/
 
 /**
- * purple_accounts_get_handle:
- *
- * Returns the accounts subsystem handle.
- *
- * Returns: The accounts subsystem handle.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void *purple_accounts_get_handle(void);
-
-/**
  * purple_accounts_init:
  *
  * Initializes the accounts subsystem.
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -30,7 +30,6 @@
 #include "purpleaccount.h"
 #include "purpleenums.h"
 #include "request.h"
-#include "signals.h"
 #include "util.h"
 
 typedef struct {
diff --git a/libpurple/core.c b/libpurple/core.c
--- a/libpurple/core.c
+++ b/libpurple/core.c
@@ -49,7 +49,6 @@
 #include "purplepresencemanagerprivate.h"
 #include "purpleprotocolmanagerprivate.h"
 #include "purplewhiteboardmanagerprivate.h"
-#include "signals.h"
 #include "util.h"
 #ifdef _WIN32
 #include "win32/win32dep.h"
@@ -113,9 +112,6 @@
 	core->ui = ui;
 	core->reserved = NULL;
 
-	/* The signals subsystem is important and should be first. */
-	purple_signals_init();
-
 	purple_util_init();
 
 	purple_core_print_version();
@@ -239,8 +235,6 @@
 	 */
 	purple_util_uninit();
 
-	purple_signals_uninit();
-
 	g_clear_object(&core->ui);
 	g_free(core);
 
diff --git a/libpurple/meson.build b/libpurple/meson.build
--- a/libpurple/meson.build
+++ b/libpurple/meson.build
@@ -87,7 +87,6 @@
 	'request/purplerequestfieldstring.c',
 	'request/purplerequestgroup.c',
 	'request/purplerequestpage.c',
-	'signals.c',
 	'util.c',
 	'xmlnode.c'
 ]
@@ -172,7 +171,6 @@
 	'purplewhiteboardops.h',
 	'purplewhiteboarduiops.h',
 	'request.h',
-	'signals.h',
 	'util.h',
 	'xmlnode.h',
 ]
diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -32,7 +32,6 @@
 #include "purplenotification.h"
 #include "purplenotificationmanager.h"
 #include "request.h"
-#include "signals.h"
 #include "util.h"
 #ifdef _WIN32
 #include "win32/win32dep.h"
@@ -131,9 +130,6 @@
 	/* cancel any pending dialogs the plugin has */
 	purple_request_close_with_handle(plugin);
 
-	purple_signals_disconnect_by_handle(plugin);
-	purple_signals_unregister_by_instance(plugin);
-
 	purple_plugin_info_set_unloaded(info, TRUE);
 
 	loaded_plugins     = g_list_remove(loaded_plugins, plugin);
diff --git a/libpurple/purpleaccount.c b/libpurple/purpleaccount.c
--- a/libpurple/purpleaccount.c
+++ b/libpurple/purpleaccount.c
@@ -40,7 +40,6 @@
 #include "request.h"
 #include "request/purplerequestfieldbool.h"
 #include "request/purplerequestfieldstring.h"
-#include "signals.h"
 #include "util.h"
 
 typedef struct {
diff --git a/libpurple/purpleconversation.c b/libpurple/purpleconversation.c
--- a/libpurple/purpleconversation.c
+++ b/libpurple/purpleconversation.c
@@ -33,7 +33,6 @@
 #include "purpleprotocolconversation.h"
 #include "purpletags.h"
 #include "request.h"
-#include "signals.h"
 #include "util.h"
 
 struct _PurpleConversation {
diff --git a/libpurple/purplecredentialmanager.c b/libpurple/purplecredentialmanager.c
--- a/libpurple/purplecredentialmanager.c
+++ b/libpurple/purplecredentialmanager.c
@@ -32,7 +32,6 @@
 #include "purplenoopcredentialprovider.h"
 #include "purplenotification.h"
 #include "purplenotificationmanager.h"
-#include "signals.h"
 #include "util.h"
 
 enum {
diff --git a/libpurple/purpleprotocol.c b/libpurple/purpleprotocol.c
--- a/libpurple/purpleprotocol.c
+++ b/libpurple/purpleprotocol.c
@@ -26,7 +26,6 @@
 #include "purpleaccountmanager.h"
 #include "purpleenums.h"
 #include "request.h"
-#include "signals.h"
 
 enum {
 	PROP_0,
diff --git a/libpurple/signals.c b/libpurple/signals.c
deleted file mode 100644
--- a/libpurple/signals.c
+++ /dev/null
@@ -1,584 +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 "debug.h"
-#include "signals.h"
-
-/* must include this to use G_VA_COPY */
-#include <string.h>
-
-typedef struct
-{
-	void *instance;
-
-	GHashTable *signals;
-	size_t signal_count;
-
-	gulong next_signal_id;
-
-} PurpleInstanceData;
-
-typedef struct
-{
-	gulong id;
-
-	PurpleSignalMarshalFunc marshal;
-
-	int num_values;
-	GType *value_types;
-	GType ret_type;
-
-	GList *handlers;
-	size_t handler_count;
-
-	gulong next_handler_id;
-} PurpleSignalData;
-
-typedef struct
-{
-	gulong id;
-	GCallback cb;
-	void *handle;
-	void *data;
-	gboolean use_vargs;
-	int priority;
-
-} PurpleSignalHandlerData;
-
-static GHashTable *instance_table = NULL;
-
-static void
-destroy_instance_data(PurpleInstanceData *instance_data)
-{
-	g_hash_table_destroy(instance_data->signals);
-
-	g_free(instance_data);
-}
-
-static void
-destroy_signal_data(PurpleSignalData *signal_data)
-{
-	g_list_free_full(signal_data->handlers, g_free);
-	g_free(signal_data->value_types);
-	g_free(signal_data);
-}
-
-gulong
-purple_signal_register(void *instance, const char *signal,
-					 PurpleSignalMarshalFunc marshal,
-					 GType ret_type, int num_values, ...)
-{
-	PurpleInstanceData *instance_data;
-	PurpleSignalData *signal_data;
-	va_list args;
-
-	g_return_val_if_fail(instance != NULL, 0);
-	g_return_val_if_fail(signal   != NULL, 0);
-	g_return_val_if_fail(marshal  != NULL, 0);
-
-	instance_data =
-		(PurpleInstanceData *)g_hash_table_lookup(instance_table, instance);
-
-	if (instance_data == NULL)
-	{
-		instance_data = g_new0(PurpleInstanceData, 1);
-
-		instance_data->instance = instance;
-		instance_data->next_signal_id = 1;
-
-		instance_data->signals =
-			g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
-								  (GDestroyNotify)destroy_signal_data);
-
-		g_hash_table_insert(instance_table, instance, instance_data);
-	}
-
-	signal_data = g_new0(PurpleSignalData, 1);
-	signal_data->id              = instance_data->next_signal_id;
-	signal_data->marshal         = marshal;
-	signal_data->next_handler_id = 1;
-	signal_data->ret_type        = ret_type;
-	signal_data->num_values      = num_values;
-
-	if (num_values > 0)
-	{
-		int i;
-
-		signal_data->value_types = g_new0(GType, num_values);
-
-		va_start(args, num_values);
-
-		for (i = 0; i < num_values; i++)
-			signal_data->value_types[i] = va_arg(args, GType);
-
-		va_end(args);
-	}
-
-	g_hash_table_insert(instance_data->signals,
-						g_strdup(signal), signal_data);
-
-	instance_data->next_signal_id++;
-	instance_data->signal_count++;
-
-	return signal_data->id;
-}
-
-void
-purple_signal_unregister(void *instance, const char *signal)
-{
-	PurpleInstanceData *instance_data;
-
-	g_return_if_fail(instance != NULL);
-	g_return_if_fail(signal   != NULL);
-
-	instance_data =
-		(PurpleInstanceData *)g_hash_table_lookup(instance_table, instance);
-
-	g_return_if_fail(instance_data != NULL);
-
-	g_hash_table_remove(instance_data->signals, signal);
-
-	instance_data->signal_count--;
-
-	if (instance_data->signal_count == 0)
-	{
-		/* Unregister the instance. */
-		g_hash_table_remove(instance_table, instance);
-	}
-}
-
-void
-purple_signals_unregister_by_instance(void *instance)
-{
-	g_return_if_fail(instance != NULL);
-
-	g_hash_table_remove(instance_table, instance);
-
-	/*
-	 * Makes things easier (more annoying?) for developers who don't have
-	 * things registering and unregistering in the right order :)
-	 */
-	/* g_return_if_fail(found); */
-}
-
-static gint handler_priority(void * a, void * b) {
-	PurpleSignalHandlerData *ah = (PurpleSignalHandlerData*)a;
-	PurpleSignalHandlerData *bh = (PurpleSignalHandlerData*)b;
-	if (ah->priority > bh->priority) return 1;
-	if (ah->priority < bh->priority) return -1;
-	return 0;
-}
-
-static gulong
-signal_connect_common(void *instance, const char *signal, void *handle,
-					  GCallback func, void *data, int priority, gboolean use_vargs)
-{
-	PurpleInstanceData *instance_data;
-	PurpleSignalData *signal_data;
-	PurpleSignalHandlerData *handler_data;
-
-	g_return_val_if_fail(instance != NULL, 0);
-	g_return_val_if_fail(signal   != NULL, 0);
-	g_return_val_if_fail(handle   != NULL, 0);
-	g_return_val_if_fail(func     != NULL, 0);
-
-	/* Get the instance data */
-	instance_data =
-		(PurpleInstanceData *)g_hash_table_lookup(instance_table, instance);
-
-	if (instance_data == NULL)
-	{
-		purple_debug_warning("signals", "Something tried to register a callback "
-				"for the '%s' signal, but we do not have any signals "
-				"registered with the given handle\n", signal);
-		g_return_val_if_reached(0);
-	}
-
-	/* Get the signal data */
-	signal_data =
-		(PurpleSignalData *)g_hash_table_lookup(instance_data->signals, signal);
-
-	if (signal_data == NULL) {
-		purple_debug_error("signals", "Signal data for %s not found!", signal);
-		return 0;
-	}
-
-	/* Create the signal handler data */
-	handler_data = g_new0(PurpleSignalHandlerData, 1);
-	handler_data->id        = signal_data->next_handler_id;
-	handler_data->cb        = func;
-	handler_data->handle    = handle;
-	handler_data->data      = data;
-	handler_data->use_vargs = use_vargs;
-	handler_data->priority = priority;
-
-	signal_data->handlers = g_list_insert_sorted(signal_data->handlers, handler_data, (GCompareFunc)handler_priority);
-	signal_data->handler_count++;
-	signal_data->next_handler_id++;
-
-	return handler_data->id;
-}
-
-gulong
-purple_signal_connect_priority(void *instance, const char *signal, void *handle,
-					GCallback func, void *data, int priority)
-{
-	return signal_connect_common(instance, signal, handle, func, data, priority, FALSE);
-}
-
-gulong
-purple_signal_connect(void *instance, const char *signal, void *handle,
-					GCallback func, void *data)
-{
-	return signal_connect_common(instance, signal, handle, func, data, PURPLE_SIGNAL_PRIORITY_DEFAULT, FALSE);
-}
-
-void
-purple_signal_disconnect(void *instance, const char *signal,
-					   void *handle, GCallback func)
-{
-	PurpleInstanceData *instance_data;
-	PurpleSignalData *signal_data;
-	PurpleSignalHandlerData *handler_data;
-	GList *l;
-	gboolean found = FALSE;
-
-	g_return_if_fail(instance != NULL);
-	g_return_if_fail(signal   != NULL);
-	g_return_if_fail(handle   != NULL);
-	g_return_if_fail(func     != NULL);
-
-	/* Get the instance data */
-	instance_data =
-		(PurpleInstanceData *)g_hash_table_lookup(instance_table, instance);
-
-	g_return_if_fail(instance_data != NULL);
-
-	/* Get the signal data */
-	signal_data =
-		(PurpleSignalData *)g_hash_table_lookup(instance_data->signals, signal);
-
-	if (signal_data == NULL) {
-		purple_debug_error("signals", "Signal data for %s not found!", signal);
-		return;
-	}
-
-	/* Find the handler data. */
-	for (l = signal_data->handlers; l != NULL; l = l->next)
-	{
-		handler_data = (PurpleSignalHandlerData *)l->data;
-
-		if (handler_data->handle == handle && handler_data->cb == func)
-		{
-			g_free(handler_data);
-
-			signal_data->handlers = g_list_delete_link(signal_data->handlers,
-												       l);
-			signal_data->handler_count--;
-
-			found = TRUE;
-
-			break;
-		}
-	}
-
-	/* See note somewhere about this actually helping developers.. */
-	g_return_if_fail(found);
-}
-
-/*
- * TODO: Make this all more efficient by storing a list of handlers, keyed
- *       to a handle.
- */
-static void
-disconnect_handle_from_signals(G_GNUC_UNUSED const char *signal,
-							   PurpleSignalData *signal_data, void *handle)
-{
-	GList *l, *l_next;
-	PurpleSignalHandlerData *handler_data;
-
-	for (l = signal_data->handlers; l != NULL; l = l_next)
-	{
-		handler_data = (PurpleSignalHandlerData *)l->data;
-		l_next = l->next;
-
-		if (handler_data->handle == handle)
-		{
-			g_free(handler_data);
-
-			signal_data->handler_count--;
-			signal_data->handlers = g_list_delete_link(signal_data->handlers,
-			                                           l);
-		}
-	}
-}
-
-static void
-disconnect_handle_from_instance(G_GNUC_UNUSED gpointer instance,
-								PurpleInstanceData *instance_data,
-								void *handle)
-{
-	g_hash_table_foreach(instance_data->signals,
-						 (GHFunc)disconnect_handle_from_signals, handle);
-}
-
-void
-purple_signals_disconnect_by_handle(void *handle)
-{
-	g_return_if_fail(handle != NULL);
-
-	g_hash_table_foreach(instance_table,
-						 (GHFunc)disconnect_handle_from_instance, handle);
-}
-
-void
-purple_signal_emit(void *instance, const char *signal, ...)
-{
-	PurpleInstanceData *instance_data;
-	PurpleSignalData *signal_data;
-	PurpleSignalHandlerData *handler_data;
-	GList *l, *l_next;
-	va_list args;
-	va_list tmp;
-
-	g_return_if_fail(instance != NULL);
-	g_return_if_fail(signal   != NULL);
-
-	instance_data =
-		(PurpleInstanceData *)g_hash_table_lookup(instance_table, instance);
-
-	g_return_if_fail(instance_data != NULL);
-
-	signal_data =
-		(PurpleSignalData *)g_hash_table_lookup(instance_data->signals, signal);
-
-	if (signal_data == NULL) {
-		purple_debug_error("signals", "Signal data for %s not found!", signal);
-		return;
-	}
-
-	va_start(args, signal);
-
-	for (l = signal_data->handlers; l != NULL; l = l_next)
-	{
-		l_next = l->next;
-
-		handler_data = (PurpleSignalHandlerData *)l->data;
-
-		/* This is necessary because a va_list may only be
-		 * evaluated once */
-		G_VA_COPY(tmp, args);
-
-		if (handler_data->use_vargs)
-		{
-			((void (*)(va_list, void *))handler_data->cb)(tmp,
-														  handler_data->data);
-		}
-		else
-		{
-			signal_data->marshal(handler_data->cb, tmp,
-								 handler_data->data, NULL);
-		}
-
-		va_end(tmp);
-	}
-
-	va_end(args);
-}
-
-void *
-purple_signal_emit_return_1(void *instance, const char *signal, ...) {
-	PurpleInstanceData *instance_data;
-	PurpleSignalData *signal_data;
-	PurpleSignalHandlerData *handler_data;
-	GList *l, *l_next;
-	va_list args;
-	va_list tmp;
-	void *ret_val = NULL;
-
-	g_return_val_if_fail(instance != NULL, NULL);
-	g_return_val_if_fail(signal   != NULL, NULL);
-
-	instance_data =
-		(PurpleInstanceData *)g_hash_table_lookup(instance_table, instance);
-
-	g_return_val_if_fail(instance_data != NULL, NULL);
-
-	signal_data =
-		(PurpleSignalData *)g_hash_table_lookup(instance_data->signals, signal);
-
-	if (signal_data == NULL) {
-		purple_debug_error("signals", "Signal data for %s not found!", signal);
-		return 0;
-	}
-
-	va_start(args, signal);
-	for (l = signal_data->handlers; l != NULL; l = l_next)
-	{
-		l_next = l->next;
-
-		handler_data = (PurpleSignalHandlerData *)l->data;
-
-		G_VA_COPY(tmp, args);
-		if (handler_data->use_vargs)
-		{
-			ret_val = ((void *(*)(va_list, void *))handler_data->cb)(
-				tmp, handler_data->data);
-		}
-		else
-		{
-			signal_data->marshal(handler_data->cb, tmp,
-								 handler_data->data, &ret_val);
-		}
-		va_end(tmp);
-
-		if(ret_val != NULL) {
-			break;
-		}
-	}
-
-	va_end(args);
-
-	return ret_val;
-}
-
-void
-purple_signals_init(void)
-{
-	g_return_if_fail(instance_table == NULL);
-
-	instance_table =
-		g_hash_table_new_full(g_direct_hash, g_direct_equal,
-							  NULL, (GDestroyNotify)destroy_instance_data);
-}
-
-void
-purple_signals_uninit(void)
-{
-	g_return_if_fail(instance_table != NULL);
-
-	g_clear_pointer(&instance_table, g_hash_table_destroy);
-}
-
-/**************************************************************************
- * Marshallers
- **************************************************************************/
-void
-purple_marshal_VOID(GCallback cb, G_GNUC_UNUSED va_list args, void *data,
-                    G_GNUC_UNUSED void **return_val)
-{
-	((void (*)(void *))cb)(data);
-}
-
-void
-purple_marshal_VOID__POINTER(GCallback cb, va_list args, void *data,
-                             G_GNUC_UNUSED void **return_val)
-{
-	void *arg1 = va_arg(args, void *);
-
-	((void (*)(void *, void *))cb)(arg1, data);
-}
-
-void
-purple_marshal_VOID__POINTER_UINT(GCallback cb, va_list args, void *data,
-                                  G_GNUC_UNUSED void **return_val)
-{
-	void *arg1 = va_arg(args, void *);
-	guint arg2 = va_arg(args, guint);
-
-	((void (*)(void *, guint, void *))cb)(arg1, arg2, data);
-}
-
-void
-purple_marshal_VOID__POINTER_INT_INT(GCallback cb, va_list args, void *data,
-                                     G_GNUC_UNUSED void **return_val)
-{
-	void *arg1 = va_arg(args, void *);
-	gint arg2 = va_arg(args, gint);
-	gint arg3 = va_arg(args, gint);
-
-	((void (*)(void *, gint, gint, void *))cb)(arg1, arg2, arg3, data);
-}
-
-void
-purple_marshal_VOID__POINTER_INT_POINTER(GCallback cb, va_list args, void *data,
-                                         G_GNUC_UNUSED void **return_val)
-{
-	void *arg1 = va_arg(args, void *);
-	gint arg2 = va_arg(args, gint);
-	void *arg3 = va_arg(args, void *);
-
-	((void (*)(void *, gint, void *, void *))cb)(arg1, arg2, arg3, data);
-}
-
-void
-purple_marshal_VOID__POINTER_POINTER(GCallback cb, va_list args, void *data,
-                                     G_GNUC_UNUSED void **return_val)
-{
-	void *arg1 = va_arg(args, void *);
-	void *arg2 = va_arg(args, void *);
-
-	((void (*)(void *, void *, void *))cb)(arg1, arg2, data);
-}
-
-void
-purple_marshal_BOOLEAN__POINTER(GCallback cb, va_list args, void *data,
-							  void **return_val)
-{
-	gboolean ret_val;
-	void *arg1 = va_arg(args, void *);
-
-	ret_val = ((gboolean (*)(void *, void *))cb)(arg1, data);
-
-	if (return_val != NULL)
-		*return_val = GINT_TO_POINTER(ret_val);
-}
-
-void
-purple_marshal_BOOLEAN__POINTER_POINTER(GCallback cb, va_list args,
-									  void *data, void **return_val)
-{
-	gboolean ret_val;
-	void *arg1 = va_arg(args, void *);
-	void *arg2 = va_arg(args, void *);
-
-	ret_val = ((gboolean (*)(void *, void *, void *))cb)(arg1, arg2, data);
-
-	if (return_val != NULL)
-		*return_val = GINT_TO_POINTER(ret_val);
-}
-
-void
-purple_marshal_BOOLEAN__POINTER_POINTER_POINTER(GCallback cb, va_list args,
-											  void *data, void **return_val)
-{
-	gboolean ret_val;
-	void *arg1 = va_arg(args, void *);
-	void *arg2 = va_arg(args, void *);
-	void *arg3 = va_arg(args, void *);
-
-	ret_val = ((gboolean (*)(void *, void *, void *, void *))cb)(arg1, arg2,
-																 arg3, data);
-
-	if (return_val != NULL)
-		*return_val = GINT_TO_POINTER(ret_val);
-}
diff --git a/libpurple/signals.h b/libpurple/signals.h
deleted file mode 100644
--- a/libpurple/signals.h
+++ /dev/null
@@ -1,398 +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_SIGNALS_H
-#define PURPLE_SIGNALS_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include "purpleversion.h"
-
-/**
- * PurpleSignalMarshalFunc:
- * @cb: The #GCallback to call.
- * @args: The arguments to the function.
- * @data: Userdata to pass to @cb.
- * @return_val: (optional) (out): A return address for a return value.
- *
- * A generic function pointer type used to register signals.
- *
- * Since: 2.0
- */
-typedef void (*PurpleSignalMarshalFunc)(GCallback cb, va_list args,
-									  void *data, void **return_val);
-
-G_BEGIN_DECLS
-
-/******************************************************************************
- * Signal API
- *****************************************************************************/
-
-/**
- * PURPLE_SIGNAL_PRIORITY_DEFAULT:
- *
- * The priority of a signal connected using purple_signal_connect().
- *
- * See purple_signal_connect_priority()
- */
-#define PURPLE_SIGNAL_PRIORITY_DEFAULT     0
-
-/**
- * PURPLE_SIGNAL_PRIORITY_HIGHEST:
- *
- * The largest signal priority; signals with this priority will be called
- * <emphasis>last</emphasis>.  (This is highest as in numerical value, not as in
- * order of importance.)
- *
- * See purple_signal_connect_priority().
- */
-#define PURPLE_SIGNAL_PRIORITY_HIGHEST  9999
-
-/**
- * PURPLE_SIGNAL_PRIORITY_LOWEST:
- *
- * The smallest signal priority; signals with this priority will be called
- * <emphasis>first</emphasis>.  (This is lowest as in numerical value, not as in
- * order of importance.)
- *
- * See purple_signal_connect_priority().
- */
-#define PURPLE_SIGNAL_PRIORITY_LOWEST  -9999
-
-/**
- * purple_signal_register:
- * @instance:   The instance to register the signal for.
- * @signal:     The signal name.
- * @marshal: (scope notified):    The marshal function.
- * @ret_type:   The return type, or G_TYPE_NONE for no return type.
- * @num_values: The number of values to be passed to the callbacks.
- * @...:        The types of the parameters for the callbacks.
- *
- * Registers a signal in an instance.
- *
- * Returns: The signal ID local to that instance, or 0 if the signal
- *          couldn't be registered.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-gulong purple_signal_register(void *instance, const char *signal, PurpleSignalMarshalFunc marshal, GType ret_type, int num_values, ...);
-
-/**
- * purple_signal_unregister:
- * @instance: The instance to unregister the signal for.
- * @signal:   The signal name.
- *
- * Unregisters a signal in an instance.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_signal_unregister(void *instance, const char *signal);
-
-/**
- * purple_signals_unregister_by_instance:
- * @instance: The instance to unregister the signal for.
- *
- * Unregisters all signals in an instance.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_signals_unregister_by_instance(void *instance);
-
-/**
- * purple_signal_connect_priority:
- * @instance: The instance to connect to.
- * @signal:   The name of the signal to connect.
- * @handle:   The handle of the receiver.
- * @func: (scope notified):    The callback function.
- * @data:     The data to pass to the callback function.
- * @priority: The priority with which the handler should be called. Signal
- *                 handlers are called in ascending numerical order of
- *                 @priority from #PURPLE_SIGNAL_PRIORITY_LOWEST to
- *                 #PURPLE_SIGNAL_PRIORITY_HIGHEST.
- *
- * Connects a signal handler to a signal for a particular object.
- *
- * Take care not to register a handler function twice. Purple will
- * not correct any mistakes for you in this area.
- *
- * See purple_signal_disconnect()
- *
- * Returns: The signal handler ID.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-gulong purple_signal_connect_priority(void *instance, const char *signal, void *handle, GCallback func, void *data, int priority);
-
-/**
- * purple_signal_connect:
- * @instance: The instance to connect to.
- * @signal:   The name of the signal to connect.
- * @handle:   The handle of the receiver.
- * @func: (scope notified):    The callback function.
- * @data:     The data to pass to the callback function.
- *
- * Connects a signal handler to a signal for a particular object.
- * (Its priority defaults to 0, aka #PURPLE_SIGNAL_PRIORITY_DEFAULT.)
- *
- * Take care not to register a handler function twice. Purple will
- * not correct any mistakes for you in this area.
- *
- * See purple_signal_disconnect()
- *
- * Returns: The signal handler ID.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-gulong purple_signal_connect(void *instance, const char *signal, void *handle, GCallback func, void *data);
-
-/**
- * purple_signal_disconnect:
- * @instance: The instance to disconnect from.
- * @signal:   The name of the signal to disconnect.
- * @handle:   The handle of the receiver.
- * @func: (scope call):    The registered function to disconnect.
- *
- * Disconnects a signal handler from a signal on an object.
- *
- * See purple_signal_connect()
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_signal_disconnect(void *instance, const char *signal, void *handle, GCallback func);
-
-/**
- * purple_signals_disconnect_by_handle:
- * @handle: The receiver handle.
- *
- * Removes all callbacks associated with a receiver handle.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_signals_disconnect_by_handle(void *handle);
-
-/**
- * purple_signal_emit:
- * @instance: The instance emitting the signal.
- * @signal:   The signal being emitted.
- * @...:      The arguments to pass to the callbacks.
- *
- * Emits a signal.
- *
- * See purple_signal_connect(), purple_signal_disconnect()
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_signal_emit(void *instance, const char *signal, ...);
-
-/**
- * purple_signal_emit_return_1:
- * @instance: The instance emitting the signal.
- * @signal:   The signal being emitted.
- * @...:      The arguments to pass to the callbacks.
- *
- * Emits a signal and returns the first non-NULL return value.
- *
- * Further signal handlers are NOT called after a handler returns
- * something other than NULL.
- *
- * Returns: The first non-NULL return value
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void *purple_signal_emit_return_1(void *instance, const char *signal, ...);
-
-/**
- * purple_signals_init:
- *
- * Initializes the signals subsystem.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_signals_init(void);
-
-/**
- * purple_signals_uninit:
- *
- * Uninitializes the signals subsystem.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_signals_uninit(void);
-
-/**************************************************************************/
-/* Marshal Functions                                                      */
-/**************************************************************************/
-
-/**
- * purple_marshal_VOID:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with no arguments.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_marshal_VOID(GCallback cb, va_list args, void *data, void **return_val);
-
-/**
- * purple_marshal_VOID__POINTER:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with a single pointer
- * argument.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_marshal_VOID__POINTER(GCallback cb, va_list args, void *data, void **return_val);
-
-/**
- * purple_marshal_VOID__POINTER_UINT:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with a pointer and
- * an unsigned integer argument.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_marshal_VOID__POINTER_UINT(GCallback cb, va_list args, void *data, void **return_val);
-
-/**
- * purple_marshal_VOID__POINTER_INT_INT:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with a pointer and
- * two integer arguments.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_marshal_VOID__POINTER_INT_INT(GCallback cb, va_list args, void *data, void **return_val);
-
-/**
- * purple_marshal_VOID__POINTER_INT_POINTER:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with a pointer, an
- * integer, and then another pointer argument.
- *
- * Since: 2.3
- */
-PURPLE_AVAILABLE_IN_2_3
-void purple_marshal_VOID__POINTER_INT_POINTER(GCallback cb, va_list args, void *data, void **return_val);
-
-/**
- * purple_marshal_VOID__POINTER_POINTER:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with two pointer
- * arguments.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_marshal_VOID__POINTER_POINTER(
-		GCallback cb, va_list args, void *data, void **return_val);
-
-/**
- * purple_marshal_BOOLEAN__POINTER:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with a single pointer
- * argument and returns a boolean.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_marshal_BOOLEAN__POINTER(GCallback cb, va_list args, void *data, void **return_val);
-
-/**
- * purple_marshal_BOOLEAN__POINTER_POINTER:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with two pointer
- * arguments and returns a boolean.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_marshal_BOOLEAN__POINTER_POINTER(GCallback cb, va_list args, void *data, void **return_val);
-
-/**
- * purple_marshal_BOOLEAN__POINTER_POINTER_POINTER:
- * @cb: (scope call): Callback this marshaller is designed to invoke
- * @args: va_list of arguments to be passed to the closure
- * @data: (nullable): Data to be passed to the callback
- * @return_val: (nullable): Value to store the callback's return value
- *
- * A purple marshaller function for use with signals with three pointer
- * arguments and returns a boolean.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER(GCallback cb, va_list args, void *data, void **return_val);
-
-G_END_DECLS
-
-#endif /* PURPLE_SIGNALS_H */
diff --git a/libpurple/util.c b/libpurple/util.c
--- a/libpurple/util.c
+++ b/libpurple/util.c
@@ -34,7 +34,6 @@
 #include "purpleconversation.h"
 #include "purplepath.h"
 #include "purpleprotocol.h"
-#include "signals.h"
 #include "util.h"
 
 #ifdef _WIN32
diff --git a/po/POTFILES.in b/po/POTFILES.in
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -66,7 +66,6 @@
 libpurple/request/purplerequestfieldstring.c
 libpurple/request/purplerequestgroup.c
 libpurple/request/purplerequestpage.c
-libpurple/signals.c
 libpurple/tests/test_account_manager.c
 libpurple/tests/test_account_option.c
 libpurple/tests/test_circular_buffer.c
