pidgin/gtkconv.c

branch
next.minor
changeset 24974
a81952e9babb
parent 24569
5dbd0617a27d
child 24981
ceddb7033bc8
equal deleted inserted replaced
24973:d021d316a53d 24974:a81952e9babb
199 { 199 {
200 PurpleBlistNode *node = NULL; 200 PurpleBlistNode *node = NULL;
201 201
202 switch (purple_conversation_get_type(conv)) { 202 switch (purple_conversation_get_type(conv)) {
203 case PURPLE_CONV_TYPE_IM: 203 case PURPLE_CONV_TYPE_IM:
204 node = (PurpleBlistNode*)purple_find_buddy(conv->account, conv->name); 204 node = PURPLE_BLIST_NODE(purple_find_buddy(conv->account, conv->name));
205 node = node ? node->parent : NULL; 205 node = node ? node->parent : NULL;
206 break; 206 break;
207 case PURPLE_CONV_TYPE_CHAT: 207 case PURPLE_CONV_TYPE_CHAT:
208 node = (PurpleBlistNode*)purple_blist_find_chat(conv->account, conv->name); 208 node = PURPLE_BLIST_NODE(purple_blist_find_chat(conv->account, conv->name));
209 break; 209 break;
210 default: 210 default:
211 break; 211 break;
212 } 212 }
213 return node; 213 return node;
3856 GList *list = NULL, *iter; 3856 GList *list = NULL, *iter;
3857 for (l = buds; l != NULL; l = l->next) 3857 for (l = buds; l != NULL; l = l->next)
3858 { 3858 {
3859 PurpleBlistNode *node; 3859 PurpleBlistNode *node;
3860 3860
3861 node = (PurpleBlistNode *) purple_buddy_get_contact((PurpleBuddy *)l->data); 3861 node = PURPLE_BLIST_NODE(purple_buddy_get_contact(PURPLE_BUDDY(l->data)));
3862 3862
3863 for (node = node->child; node != NULL; node = node->next) 3863 for (node = node->child; node != NULL; node = node->next)
3864 { 3864 {
3865 PurpleBuddy *buddy = (PurpleBuddy *)node; 3865 PurpleBuddy *buddy = (PurpleBuddy *)node;
3866 PurpleAccount *account; 3866 PurpleAccount *account;
5039 }; 5039 };
5040 5040
5041 static PidginConversation * 5041 static PidginConversation *
5042 pidgin_conv_find_gtkconv(PurpleConversation * conv) 5042 pidgin_conv_find_gtkconv(PurpleConversation * conv)
5043 { 5043 {
5044 PurpleBuddy *bud = purple_find_buddy(conv->account, conv->name), *b; 5044 PurpleBuddy *bud = purple_find_buddy(conv->account, conv->name);
5045 PurpleContact *c; 5045 PurpleContact *c;
5046 PurpleBlistNode *cn; 5046 PurpleBlistNode *cn, *bn;
5047 5047
5048 if (!bud) 5048 if (!bud)
5049 return NULL; 5049 return NULL;
5050 5050
5051 if (!(c = purple_buddy_get_contact(bud))) 5051 if (!(c = purple_buddy_get_contact(bud)))
5052 return NULL; 5052 return NULL;
5053 5053
5054 cn = (PurpleBlistNode *)c; 5054 cn = PURPLE_BLIST_NODE(c);
5055 for (b = (PurpleBuddy *)cn->child; b; b = (PurpleBuddy *) ((PurpleBlistNode *)b)->next) { 5055 for (bn = purple_blist_node_get_first_child(cn); bn; bn = purple_blist_node_get_sibling_next(bn)) {
5056 PurpleBuddy *b = PURPLE_BUDDY(bn);
5056 PurpleConversation *conv; 5057 PurpleConversation *conv;
5057 if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, b->name, b->account))) { 5058 if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, b->name, b->account))) {
5058 if (conv->ui_data) 5059 if (conv->ui_data)
5059 return conv->ui_data; 5060 return conv->ui_data;
5060 } 5061 }

mercurial