diff src/blist.c @ 6965:d4b4229bcd21

[gaim-migrate @ 7512] fix sort by log size and sort by status, and allow dragging of entire contacts into expanded contacts, like one would expect committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 25 Sep 2003 03:30:07 +0000
parents 13da9fe5f213
children a83687eeb713
line wrap: on
line diff
--- a/src/blist.c	Thu Sep 25 02:24:35 2003 +0000
+++ b/src/blist.c	Thu Sep 25 03:30:07 2003 +0000
@@ -886,6 +886,26 @@
 		gaim_blist_save();
 }
 
+void gaim_blist_merge_contact(GaimContact *source, GaimContact *target)
+{
+	GaimBlistNode *sourcenode = (GaimBlistNode*)source;
+	GaimBlistNode *targetnode = (GaimBlistNode*)target;
+	GaimBlistNode *child, *child2;
+
+	if(source == target)
+		return;
+
+	child = sourcenode->child;
+
+	while(child) {
+		child2 = child;
+		child = child->next;
+		if(GAIM_BLIST_NODE_IS_BUDDY(child2))
+			gaim_blist_add_buddy((GaimBuddy*)child2, target, NULL,
+					gaim_blist_get_last_child(targetnode));
+	}
+}
+
 void  gaim_blist_add_group (GaimGroup *group, GaimBlistNode *node)
 {
 	struct gaim_blist_ui_ops *ops;