Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/buddy.c @ 32827:4a34689eeb33 default tip
merged from im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 19 Nov 2011 14:42:54 +0900 |
parents | 2ec94166be43 |
children |
comparison
equal
deleted
inserted
replaced
32692:0f94ec89f0bc | 32827:4a34689eeb33 |
---|---|
499 g_ascii_strncasecmp(vc_node->name, "vCard", 5))) { | 499 g_ascii_strncasecmp(vc_node->name, "vCard", 5))) { |
500 xmlnode_free(vc_node); | 500 xmlnode_free(vc_node); |
501 vc_node = NULL; | 501 vc_node = NULL; |
502 } | 502 } |
503 | 503 |
504 if ((img = purple_buddy_icons_find_account_icon(gc->account))) { | 504 if ((img = purple_buddy_icons_find_account_icon(purple_connection_get_account(gc)))) { |
505 gconstpointer avatar_data; | 505 gconstpointer avatar_data; |
506 gsize avatar_len; | 506 gsize avatar_len; |
507 xmlnode *photo, *binval, *type; | 507 xmlnode *photo, *binval, *type; |
508 gchar *enc; | 508 gchar *enc; |
509 | 509 |
640 purple_request_fields_add_group(fields, group); | 640 purple_request_fields_add_group(fields, group); |
641 | 641 |
642 /* | 642 /* |
643 * Get existing, XML-formatted, user info | 643 * Get existing, XML-formatted, user info |
644 */ | 644 */ |
645 if((user_info = purple_account_get_user_info(gc->account)) != NULL) | 645 if((user_info = purple_account_get_user_info(purple_connection_get_account(gc))) != NULL) |
646 x_vc_data = xmlnode_from_str(user_info, -1); | 646 x_vc_data = xmlnode_from_str(user_info, -1); |
647 | 647 |
648 /* | 648 /* |
649 * Set up GSLists for edit with labels from "template," data from user info | 649 * Set up GSLists for edit with labels from "template," data from user info |
650 */ | 650 */ |
1358 jbr->idle = 0; | 1358 jbr->idle = 0; |
1359 } | 1359 } |
1360 | 1360 |
1361 if (jbr == | 1361 if (jbr == |
1362 jabber_buddy_find_resource(jb, NULL)) { | 1362 jabber_buddy_find_resource(jb, NULL)) { |
1363 purple_prpl_got_user_idle(js->gc->account, | 1363 purple_prpl_got_user_idle(purple_connection_get_account(js->gc), |
1364 buddy_name, jbr->idle, jbr->idle); | 1364 buddy_name, jbr->idle, jbr->idle); |
1365 } | 1365 } |
1366 } | 1366 } |
1367 } | 1367 } |
1368 } | 1368 } |
2253 | 2253 |
2254 /* If the value provided isn't the disco#info default, persist it. Otherwise, | 2254 /* If the value provided isn't the disco#info default, persist it. Otherwise, |
2255 make sure we aren't persisting an old value */ | 2255 make sure we aren't persisting an old value */ |
2256 if(js->user_directories && js->user_directories->data && | 2256 if(js->user_directories && js->user_directories->data && |
2257 !strcmp(directory, js->user_directories->data)) { | 2257 !strcmp(directory, js->user_directories->data)) { |
2258 purple_account_set_string(js->gc->account, "user_directory", ""); | 2258 purple_account_set_string(purple_connection_get_account(js->gc), "user_directory", ""); |
2259 } | 2259 } |
2260 else { | 2260 else { |
2261 purple_account_set_string(js->gc->account, "user_directory", directory); | 2261 purple_account_set_string(purple_connection_get_account(js->gc), "user_directory", directory); |
2262 } | 2262 } |
2263 | 2263 |
2264 iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:search"); | 2264 iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:search"); |
2265 xmlnode_set_attrib(iq->node, "to", directory); | 2265 xmlnode_set_attrib(iq->node, "to", directory); |
2266 | 2266 |
2271 | 2271 |
2272 void jabber_user_search_begin(PurplePluginAction *action) | 2272 void jabber_user_search_begin(PurplePluginAction *action) |
2273 { | 2273 { |
2274 PurpleConnection *gc = (PurpleConnection *) action->context; | 2274 PurpleConnection *gc = (PurpleConnection *) action->context; |
2275 JabberStream *js = purple_connection_get_protocol_data(gc); | 2275 JabberStream *js = purple_connection_get_protocol_data(gc); |
2276 const char *def_val = purple_account_get_string(js->gc->account, "user_directory", ""); | 2276 const char *def_val = purple_account_get_string(purple_connection_get_account(js->gc), "user_directory", ""); |
2277 if(!*def_val && js->user_directories) | 2277 if(!*def_val && js->user_directories) |
2278 def_val = js->user_directories->data; | 2278 def_val = js->user_directories->data; |
2279 | 2279 |
2280 purple_request_input(gc, _("Enter a User Directory"), _("Enter a User Directory"), | 2280 purple_request_input(gc, _("Enter a User Directory"), _("Enter a User Directory"), |
2281 _("Select a user directory to search"), | 2281 _("Select a user directory to search"), |