comparison console/gntblist.c @ 15022: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 fb98e9c45607
children 34e049e6ce10
comparison
equal deleted inserted replaced
15021:af2debe897c8 15022:ab2847049049
1023 gg_blist_place_tagged(GaimBlistNode *target) 1023 gg_blist_place_tagged(GaimBlistNode *target)
1024 { 1024 {
1025 GaimGroup *tg = NULL; 1025 GaimGroup *tg = NULL;
1026 GaimContact *tc = NULL; 1026 GaimContact *tc = NULL;
1027 1027
1028 /* This target resolution probably needs more clarification; for
1029 * example, if I tag a buddy in a contact, then place on
1030 * another buddy in the same contact, I probably intend to
1031 * place the tagged buddy immediately after (before?) the
1032 * target buddy -- this will simply move the tagged buddy
1033 * within the same contact without reference to position. */
1028 if (GAIM_BLIST_NODE_IS_GROUP(target)) 1034 if (GAIM_BLIST_NODE_IS_GROUP(target))
1029 tg = (GaimGroup*)target; 1035 tg = (GaimGroup*)target;
1030 else 1036 else if (GAIM_BLIST_NODE_IS_CONTACT(target))
1031 tc = (GaimContact*)target; 1037 tc = (GaimContact*)target;
1038 else /* Buddy or Chat */
1039 tc = (GaimContact*)target->parent;
1032 1040
1033 if (ggblist->tagged) { 1041 if (ggblist->tagged) {
1034 GList *list = ggblist->tagged; 1042 GList *list = ggblist->tagged;
1035 ggblist->tagged = NULL; 1043 ggblist->tagged = NULL;
1036 1044