diff libpurple/account.c @ 28035:14ce47859540

Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630. Patch from Jan "HanzZ" Kaluza with some changes by me so that it's easier to merge with Sulabh and Eric's SoC projects (mostly so grim wouldn't yell at me). Anyway, any bugs introduced by me (darkrain42). committer: Paul Aurich <paul@darkrain42.org>
author hanzz@soc.pidgin.im
date Mon, 27 Jul 2009 05:20:52 +0000
parents c374d57b3215
children 3896cbf6336a e8eaf57f42da
line wrap: on
line diff
--- a/libpurple/account.c	Mon Jul 27 05:09:21 2009 +0000
+++ b/libpurple/account.c	Mon Jul 27 05:20:52 2009 +0000
@@ -1534,6 +1534,8 @@
 void
 purple_account_set_username(PurpleAccount *account, const char *username)
 {
+	PurpleBlistUiOps *blist_ops;
+
 	g_return_if_fail(account != NULL);
 
 	g_free(account->username);
@@ -1543,7 +1545,9 @@
 
 	/* if the name changes, we should re-write the buddy list
 	 * to disk with the new name */
-	purple_blist_schedule_save();
+	blist_ops = purple_blist_get_ui_ops();
+	if (blist_ops != NULL && blist_ops->save_account != NULL)
+		blist_ops->save_account(account);
 }
 
 void