Mercurial > pidgin.yaz
comparison libpurple/blist.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 | d288f5215a9a |
children |
comparison
equal
deleted
inserted
replaced
32692:0f94ec89f0bc | 32827:4a34689eeb33 |
---|---|
312 char buf[10]; | 312 char buf[10]; |
313 | 313 |
314 node = xmlnode_new("account"); | 314 node = xmlnode_new("account"); |
315 xmlnode_set_attrib(node, "proto", purple_account_get_protocol_id(account)); | 315 xmlnode_set_attrib(node, "proto", purple_account_get_protocol_id(account)); |
316 xmlnode_set_attrib(node, "name", purple_account_get_username(account)); | 316 xmlnode_set_attrib(node, "name", purple_account_get_username(account)); |
317 g_snprintf(buf, sizeof(buf), "%d", account->perm_deny); | 317 g_snprintf(buf, sizeof(buf), "%d", purple_account_get_privacy_type(account)); |
318 xmlnode_set_attrib(node, "mode", buf); | 318 xmlnode_set_attrib(node, "mode", buf); |
319 | 319 |
320 for (cur = account->permit; cur; cur = cur->next) | 320 for (cur = account->permit; cur; cur = cur->next) |
321 { | 321 { |
322 child = xmlnode_new_child(node, "permit"); | 322 child = xmlnode_new_child(node, "permit"); |
639 | 639 |
640 if (!account) | 640 if (!account) |
641 continue; | 641 continue; |
642 | 642 |
643 imode = atoi(mode); | 643 imode = atoi(mode); |
644 account->perm_deny = (imode != 0 ? imode : PURPLE_PRIVACY_ALLOW_ALL); | 644 purple_account_set_privacy_type(account, (imode != 0 ? imode : PURPLE_PRIVACY_ALLOW_ALL)); |
645 | 645 |
646 for (x = anode->child; x; x = x->next) { | 646 for (x = anode->child; x; x = x->next) { |
647 char *name; | 647 char *name; |
648 if (x->type != XMLNODE_TYPE_TAG) | 648 if (x->type != XMLNODE_TYPE_TAG) |
649 continue; | 649 continue; |
1771 { | 1771 { |
1772 g_return_if_fail(contact != NULL); | 1772 g_return_if_fail(contact != NULL); |
1773 | 1773 |
1774 contact->priority_valid = FALSE; | 1774 contact->priority_valid = FALSE; |
1775 } | 1775 } |
1776 | |
1777 int purple_contact_get_contact_size(PurpleContact *contact, gboolean offline) | |
1778 { | |
1779 g_return_val_if_fail(contact != NULL, 0); | |
1780 | |
1781 return offline ? contact->totalsize : contact->currentsize; | |
1782 } | |
1776 | 1783 |
1777 PurpleGroup *purple_group_new(const char *name) | 1784 PurpleGroup *purple_group_new(const char *name) |
1778 { | 1785 { |
1779 PurpleBlistUiOps *ops = purple_blist_get_ui_ops(); | 1786 PurpleBlistUiOps *ops = purple_blist_get_ui_ops(); |
1780 PurpleGroup *group; | 1787 PurpleGroup *group; |