soc.2009.telepathy: 03320da8: Fixed account-specific signals receiver ...

sttwister at gmail.com sttwister at gmail.com
Sat Sep 12 08:45:49 EDT 2009


-----------------------------------------------------------------
Revision: 03320da81d5eab8340555963dc37b0178f7be4a0
Ancestor: 16753861b141b975015cbf1c5dbb92ee1cd568d2
Author: sttwister at gmail.com
Date: 2009-09-12T12:39:26
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/03320da81d5eab8340555963dc37b0178f7be4a0

Modified files:
        libpurple/protocols/telepathy/telepathy.c
        libpurple/protocols/telepathy/telepathy_account.c

ChangeLog: 

Fixed account-specific signals receiver handle to point to the plugin

-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy.c	224cd9774dfc17acd83324998ddd25b81d5f3c17
+++ libpurple/protocols/telepathy/telepathy.c	8496868bf4dc9f71e3eab1b7a6993f18254eaea2
@@ -1181,7 +1181,7 @@ list_connection_managers_cb (TpConnectio
 	 */
 	tp_cli_dbus_properties_call_get(account_Manager, -1,
 			TP_IFACE_ACCOUNT_MANAGER, "ValidAccounts",
-			get_valid_accounts_cb, NULL, NULL, NULL);
+			get_valid_accounts_cb, user_data, NULL, NULL);
 
 }
 
@@ -1245,7 +1245,7 @@ G_MODULE_EXPORT gboolean purple_init_plu
 	}
 
 	/* the list of connection managers will be returned in list_connection_managers_cb */
-	tp_list_connection_managers(daemon, list_connection_managers_cb, NULL, NULL, NULL);
+	tp_list_connection_managers(daemon, list_connection_managers_cb, plugin, NULL, NULL);
 	
 	if (daemon != NULL)
 		g_object_unref(daemon);
============================================================
--- libpurple/protocols/telepathy/telepathy_account.c	e2010cc36257c387e6f34880da64e82364dfc3b8
+++ libpurple/protocols/telepathy/telepathy_account.c	eaa0ac4146ecd7234a634eda6d9f25a7aa6cce97
@@ -683,6 +683,7 @@ get_valid_accounts_cb (TpProxy *proxy,
 	GPtrArray *accounts;
 	GError *err = NULL;
 	TpDBusDaemon *daemon;
+	PurplePlugin *plugin = user_data;
 
 	if (error != NULL)
 	{
@@ -765,28 +766,26 @@ get_valid_accounts_cb (TpProxy *proxy,
 
 	}
 
-	/* FIXME: Is purple_accounts_get_handle() the right one to pass as the handle?
-	 * I honestly have no idea, seems to fail with a NULL :|
-	 *
+	/* 
 	 * FIXME: account-modified is Pidgin-dependent
 	 */
 	purple_signal_connect(pidgin_account_get_handle(), "account-modified",
-		purple_accounts_get_handle(),
+		plugin,
 		PURPLE_CALLBACK(purple_account_modified_cb),
 		NULL);
 
 	purple_signal_connect(purple_accounts_get_handle(), "account-destroying",
-		purple_accounts_get_handle(),
+		plugin,
 		PURPLE_CALLBACK(purple_account_destroying_cb),
 		NULL);
 
 	purple_signal_connect(purple_accounts_get_handle(), "account-added",
-		purple_accounts_get_handle(),
+		plugin,
 		PURPLE_CALLBACK(purple_account_added_cb),
 		NULL);
 
 	purple_signal_connect(purple_accounts_get_handle(), "account-removed",
-		purple_accounts_get_handle(),
+		plugin,
 		PURPLE_CALLBACK(purple_account_removed_cb),
 		NULL);
 


More information about the Commits mailing list