diff libpurple/privacy.c @ 29471:d83ee160ffb6

propagate from branch 'im.pidgin.pidgin' (head eb9385f349a20856b9d3f9911dbc8024caa44052) to branch 'im.pidgin.pidgin.next.minor' (head 439fb2dd7a285d9ca645f65f36ef0f037abe7311)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 19 Aug 2009 00:46:04 +0000
parents 14ce47859540
children f75041cb3fec
line wrap: on
line diff
--- a/libpurple/privacy.c	Mon Mar 02 06:51:50 2009 +0000
+++ b/libpurple/privacy.c	Wed Aug 19 00:46:04 2009 +0000
@@ -35,6 +35,7 @@
 	GSList *l;
 	char *name;
 	PurpleBuddy *buddy;
+	PurpleBlistUiOps *blist_ops;
 
 	g_return_val_if_fail(account != NULL, FALSE);
 	g_return_val_if_fail(who     != NULL, FALSE);
@@ -62,7 +63,9 @@
 	if (privacy_ops != NULL && privacy_ops->permit_added != NULL)
 		privacy_ops->permit_added(account, who);
 
-	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);
 
 	/* This lets the UI know a buddy has had its privacy setting changed */
 	buddy = purple_find_buddy(account, name);
@@ -81,6 +84,7 @@
 	const char *name;
 	PurpleBuddy *buddy;
 	char *del;
+	PurpleBlistUiOps *blist_ops;
 
 	g_return_val_if_fail(account != NULL, FALSE);
 	g_return_val_if_fail(who     != NULL, FALSE);
@@ -109,7 +113,9 @@
 	if (privacy_ops != NULL && privacy_ops->permit_removed != NULL)
 		privacy_ops->permit_removed(account, who);
 
-	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);
 
 	buddy = purple_find_buddy(account, name);
 	if (buddy != NULL) {
@@ -127,6 +133,7 @@
 	GSList *l;
 	char *name;
 	PurpleBuddy *buddy;
+	PurpleBlistUiOps *blist_ops;
 
 	g_return_val_if_fail(account != NULL, FALSE);
 	g_return_val_if_fail(who     != NULL, FALSE);
@@ -154,7 +161,9 @@
 	if (privacy_ops != NULL && privacy_ops->deny_added != NULL)
 		privacy_ops->deny_added(account, who);
 
-	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);
 
 	buddy = purple_find_buddy(account, name);
 	if (buddy != NULL) {
@@ -172,6 +181,7 @@
 	const char *normalized;
 	char *name;
 	PurpleBuddy *buddy;
+	PurpleBlistUiOps *blist_ops;
 
 	g_return_val_if_fail(account != NULL, FALSE);
 	g_return_val_if_fail(who     != NULL, FALSE);
@@ -205,7 +215,10 @@
 	}
 
 	g_free(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);
 
 	return TRUE;
 }