comparison pidgin/gtkconv.c @ 25318:0e08c847517d

Update some casts (that the script didn't fix correctly) to GObject macros.
author Richard Laager <rlaager@wiktel.com>
date Fri, 14 Nov 2008 05:32:35 +0000
parents 8282911d5e17
children 94fa7211eb98
comparison
equal deleted inserted replaced
25317:d1a4088528ce 25318:0e08c847517d
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 }