changeset 4316:c5851f0e120e

[gaim-migrate @ 4570] (19:17:32) faceprint: current gaim CVS writes it once per buddy at signon, and then once every time a buddy changes state (19:17:35) faceprint: patch takes do_export() out of handle_buddy_rename() and puts it in the appropriate places committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 15 Jan 2003 00:18:16 +0000
parents 6e36a04209c0
children 7c9f3d0fe8b2
files src/buddy.c src/dialogs.c src/protocols/jabber/jabber.c src/server.c
diffstat 4 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy.c	Tue Jan 14 11:29:58 2003 +0000
+++ b/src/buddy.c	Wed Jan 15 00:18:16 2003 +0000
@@ -233,9 +233,6 @@
 	GtkCTreeNode *c;
 	char buf[256];
 
-	/* well you shouldn't be calling this if nothing changed. duh. */
-	do_export(b->gc);
-
 	c = gtk_ctree_find_by_row_data(GTK_CTREE(edittree), NULL, b);
 	if (get_buddy_alias_only(b))
 		g_snprintf(buf, sizeof(buf), "%s (%s)", b->name, get_buddy_alias(b));
@@ -743,7 +740,7 @@
 	b->alias[0] = '\0';
 	handle_buddy_rename(b, b->name); /* make me a sammich! */
 	serv_alias_buddy(b);
-
+	do_export(b->gc);
 }
 
 static gboolean click_edit_tree(GtkWidget *widget, GdkEventButton *event, gpointer data)
--- a/src/dialogs.c	Tue Jan 14 11:29:58 2003 +0000
+++ b/src/dialogs.c	Wed Jan 15 00:18:16 2003 +0000
@@ -3777,6 +3777,7 @@
 		b->alias[0] = '\0';
 	handle_buddy_rename(b, b->name);
 	serv_alias_buddy(b);
+	do_export(b->gc);
 	destroy_dialog(aliasdlg, aliasdlg);
 }
 
@@ -4425,6 +4426,7 @@
 		g_snprintf(b->name, sizeof(b->name), "%s", new_name);
 		serv_add_buddy(b->gc, b->name);
 		handle_buddy_rename(b, prevname);
+		do_export(b->gc);
 		g_free(prevname);
 	}
 
--- a/src/protocols/jabber/jabber.c	Tue Jan 14 11:29:58 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Wed Jan 15 00:18:16 2003 +0000
@@ -1793,6 +1793,7 @@
 			} else if(name != NULL && strcmp(b->alias, name)) {
 				g_snprintf(b->alias, sizeof(b->alias), "%s", name);
 				handle_buddy_rename(b, buddyname);
+				do_export(GJ_GC(gjc));
 			}
 		}
 	}  else if (BUD_USUB_TO_PEND(sub, ask) || BUD_USUBD_TO(sub, ask) || !strcasecmp(sub, "remove")) {
--- a/src/server.c	Tue Jan 14 11:29:58 2003 +0000
+++ b/src/server.c	Wed Jan 15 00:18:16 2003 +0000
@@ -813,6 +813,7 @@
 		char *who = g_strdup(b->name);
 		g_snprintf(b->name, sizeof(b->name), "%s", name);
 		handle_buddy_rename(b, who);
+		do_export(b->gc);
 		g_free(who);
 	}