changeset 15021:ab2847049049

[gaim-migrate @ 17803] Prevent dropping a buddy on another buddy from crashing. There should probably be some smarter logic here. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Tue, 21 Nov 2006 16:35:51 +0000
parents af2debe897c8
children 2d3c7f76cea0
files console/gntblist.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/console/gntblist.c	Tue Nov 21 15:15:20 2006 +0000
+++ b/console/gntblist.c	Tue Nov 21 16:35:51 2006 +0000
@@ -1025,10 +1025,18 @@
 	GaimGroup *tg = NULL;
 	GaimContact *tc = NULL;
 
+	/* This target resolution probably needs more clarification; for
+	 * example, if I tag a buddy in a contact, then place on
+	 * another buddy in the same contact, I probably intend to
+	 * place the tagged buddy immediately after (before?) the
+	 * target buddy -- this will simply move the tagged buddy
+	 * within the same contact without reference to position. */
 	if (GAIM_BLIST_NODE_IS_GROUP(target))
 		tg = (GaimGroup*)target;
-	else
+	else if (GAIM_BLIST_NODE_IS_CONTACT(target))
 		tc = (GaimContact*)target;
+	else /* Buddy or Chat */
+		tc = (GaimContact*)target->parent;
 
 	if (ggblist->tagged) {
 		GList *list = ggblist->tagged;