diff src/blist.c @ 10704:a4ae4fb7f939

[gaim-migrate @ 12288] Make the blist.xml saving schedule function public and call it whenever privacy settings are changed. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 20 Mar 2005 01:42:53 +0000
parents 54ac161a876e
children 00e3dc1a0206
line wrap: on
line diff
--- a/src/blist.c	Sun Mar 20 01:23:06 2005 +0000
+++ b/src/blist.c	Sun Mar 20 01:42:53 2005 +0000
@@ -355,8 +355,8 @@
 	return FALSE;
 }
 
-static void
-schedule_blist_save()
+void
+gaim_blist_schedule_save()
 {
 	if (save_timer == 0)
 		save_timer = gaim_timeout_add(5000, save_cb, NULL);
@@ -835,7 +835,7 @@
 	g_free(buddy->name);
 	buddy->name = g_strdup(name);
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && ops->update)
 		ops->update(gaimbuddylist, (GaimBlistNode *)buddy);
@@ -853,7 +853,7 @@
 	else
 		chat->alias = NULL;
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && ops->update)
 		ops->update(gaimbuddylist, (GaimBlistNode *)chat);
@@ -872,7 +872,7 @@
 	else
 		buddy->alias = NULL;
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && ops->update)
 		ops->update(gaimbuddylist, (GaimBlistNode *)buddy);
@@ -896,7 +896,7 @@
 	else
 		buddy->server_alias = NULL;
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && ops->update)
 		ops->update(gaimbuddylist, (GaimBlistNode *)buddy);
@@ -980,7 +980,7 @@
 	}
 
 	/* Save our changes */
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	/* Update the UI */
 	if (ops && ops->update)
@@ -1090,7 +1090,7 @@
 	else
 		gaim_blist_node_remove_setting((GaimBlistNode *)buddy, "buddy_icon");
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	gaim_blist_update_buddy_icon(buddy);
 }
@@ -1159,7 +1159,7 @@
 
 		ops->remove(gaimbuddylist, cnode);
 
-		schedule_blist_save();
+		gaim_blist_schedule_save();
 	}
 
 	if (node != NULL) {
@@ -1188,7 +1188,7 @@
 		}
 	}
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && ops->update)
 		ops->update(gaimbuddylist, (GaimBlistNode *)cnode);
@@ -1260,7 +1260,7 @@
 
 		ops->remove(gaimbuddylist, bnode);
 
-		schedule_blist_save();
+		gaim_blist_schedule_save();
 
 		if (bnode->parent->parent != (GaimBlistNode*)g) {
 			hb = g_new(struct _gaim_hbuddy, 1);
@@ -1317,7 +1317,7 @@
 
 	gaim_contact_invalidate_priority_buddy(gaim_buddy_get_contact(buddy));
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && ops->update)
 		ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
@@ -1354,7 +1354,7 @@
 	else
 		contact->alias = NULL;
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && ops->update)
 		ops->update(gaimbuddylist, (GaimBlistNode*)contact);
@@ -1504,7 +1504,7 @@
 
 		ops->remove(gaimbuddylist, cnode);
 
-		schedule_blist_save();
+		gaim_blist_schedule_save();
 	}
 
 	if (node && (GAIM_BLIST_NODE_IS_CONTACT(node) ||
@@ -1530,7 +1530,7 @@
 		g->currentsize++;
 	g->totalsize++;
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && cnode->child)
 		ops->update(gaimbuddylist, cnode);
@@ -1621,7 +1621,7 @@
 		gaimbuddylist->root = gnode;
 	}
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	if (ops && ops->update) {
 		ops->update(gaimbuddylist, gnode);
@@ -1664,7 +1664,7 @@
 		if (node->next)
 			node->next->prev = node->prev;
 
-		schedule_blist_save();
+		gaim_blist_schedule_save();
 
 		/* Update the UI */
 		if (ops && ops->remove)
@@ -1713,7 +1713,7 @@
 	}
 	contact->totalsize--;
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	/* Re-sort the contact */
 	if (contact->priority == buddy) {
@@ -1778,7 +1778,7 @@
 	}
 	group->totalsize--;
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	/* Update the UI */
 	if (ops && ops->remove)
@@ -1832,7 +1832,7 @@
 	if (node->next)
 		node->next->prev = node->prev;
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 
 	/* Update the UI */
 	if (ops && ops->remove)
@@ -2333,7 +2333,7 @@
 
 	g_hash_table_remove(node->settings, key);
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 }
 
 void
@@ -2366,7 +2366,7 @@
 
 	g_hash_table_replace(node->settings, g_strdup(key), value);
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 }
 
 gboolean
@@ -2402,7 +2402,7 @@
 
 	g_hash_table_replace(node->settings, g_strdup(key), value);
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 }
 
 int
@@ -2438,7 +2438,7 @@
 
 	g_hash_table_replace(node->settings, g_strdup(key), value);
 
-	schedule_blist_save();
+	gaim_blist_schedule_save();
 }
 
 const char *