soc.2010.detachablepurple: 29f6b38b: Libpurple can now handle multiple accoun...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Tue Jul 6 17:01:07 EDT 2010


----------------------------------------------------------------------
Revision: 29f6b38b49e0bdceed76a5a74735f696f35ca4a2
Parent:   e199432d18cefeaad3e6c2f8a76b92b1d129a221
Author:   gillux at soc.pidgin.im
Date:     07/06/10 16:12:39
Branch:   im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/29f6b38b49e0bdceed76a5a74735f696f35ca4a2

Changelog: 

Libpurple can now handle multiple accounts over dbus, updated purpled and
accountmanager accordingly.

Changes against parent e199432d18cefeaad3e6c2f8a76b92b1d129a221

  patched  libpurple/accountmanager.c
  patched  purpled/purpled.c

-------------- next part --------------
============================================================
--- libpurple/accountmanager.c	e4d7eb707ede42f1f1edd85185e0b12bb3d971e8
+++ libpurple/accountmanager.c	9e2a66633a618f4e18334249f103b49c925dadd0
@@ -607,6 +607,10 @@ void purple_account_manager_load_account
 
 	priv->accounts_loaded = TRUE;
 
+	/* In remote mode accounts are already loaded by the daemon. */
+	if(purple_core_get_remote_mode())
+		return;
+
 	node = purple_util_read_xml_from_file("accounts.xml", _("accounts"));
 
 	if (node == NULL)
============================================================
--- purpled/purpled.c	b588bb857cad46ef09e6f149a31d5dc7fb536a41
+++ purpled/purpled.c	8a6c0aa008aead9a16daa869f78a52113113af3d
@@ -107,26 +107,10 @@ init_libpurple(void)
 {
 	purple_eventloop_set_ui_ops(&glib_eventloops);
 
-	/*
-	 * Note: currently the following code will fail if it tries to load the
-	 * accounts from your accounts.xml, because it makes it automatically
-	 * instantiate your accounts, whereas there is only a single account
-	 * exportable via dbus, yet (the /im/pidgin/purple/account object).
-	 * So spoof the user dir.
-	 */
-	purple_util_set_user_dir("/dev/null");
-
 	if (!purple_core_init(PURPLED_ID)) {
 		fprintf(stderr, "libpurple initialization failed.");
 		exit(1);
 	}
-
-	/*
-	 * Instantiate an account so that it will be accessible in dbus at
-	 * /im/pidgin/purple/account. This will have to be initiated by the
-	 * client.
-	 */
-	purple_account_new("nothing", "prpl-jabber");
 }
 
 int


More information about the Commits mailing list