| 53 static GHashTable *groups_cache = NULL; |
53 static GHashTable *groups_cache = NULL; |
| 54 |
54 |
| 55 static guint save_timer = 0; |
55 static guint save_timer = 0; |
| 56 static gboolean blist_loaded = FALSE; |
56 static gboolean blist_loaded = FALSE; |
| 57 |
57 |
| 58 PurpleBListNode *purple_blist_get_last_child(PurpleBListNode *node); |
58 PurpleBListNode *_purple_blist_get_last_child(PurpleBListNode *node); |
| 59 |
59 |
| 60 /********************************************************************* |
60 /********************************************************************* |
| 61 * Private utility functions * |
61 * Private utility functions * |
| 62 *********************************************************************/ |
62 *********************************************************************/ |
| 63 |
63 |
| 482 if ((x = xmlnode_get_child(bnode, "alias"))) |
482 if ((x = xmlnode_get_child(bnode, "alias"))) |
| 483 alias = xmlnode_get_data(x); |
483 alias = xmlnode_get_data(x); |
| 484 |
484 |
| 485 buddy = purple_buddy_new(account, name, alias); |
485 buddy = purple_buddy_new(account, name, alias); |
| 486 purple_blist_add_buddy(buddy, contact, group, |
486 purple_blist_add_buddy(buddy, contact, group, |
| 487 purple_blist_get_last_child((PurpleBListNode*)contact)); |
487 _purple_blist_get_last_child((PurpleBListNode*)contact)); |
| 488 |
488 |
| 489 for (x = xmlnode_get_child(bnode, "setting"); x; x = xmlnode_get_next_twin(x)) { |
489 for (x = xmlnode_get_child(bnode, "setting"); x; x = xmlnode_get_next_twin(x)) { |
| 490 parse_setting((PurpleBListNode*)buddy, x); |
490 parse_setting((PurpleBListNode*)buddy, x); |
| 491 } |
491 } |
| 492 |
492 |
| 500 PurpleContact *contact = purple_contact_new(); |
500 PurpleContact *contact = purple_contact_new(); |
| 501 xmlnode *x; |
501 xmlnode *x; |
| 502 const char *alias; |
502 const char *alias; |
| 503 |
503 |
| 504 purple_blist_add_contact(contact, group, |
504 purple_blist_add_contact(contact, group, |
| 505 purple_blist_get_last_child((PurpleBListNode*)group)); |
505 _purple_blist_get_last_child((PurpleBListNode*)group)); |
| 506 |
506 |
| 507 if ((alias = xmlnode_get_attrib(cnode, "alias"))) { |
507 if ((alias = xmlnode_get_attrib(cnode, "alias"))) { |
| 508 purple_contact_set_alias(contact, alias); |
508 purple_contact_set_alias(contact, alias); |
| 509 } |
509 } |
| 510 |
510 |
| 557 g_hash_table_replace(components, g_strdup(name), value); |
557 g_hash_table_replace(components, g_strdup(name), value); |
| 558 } |
558 } |
| 559 |
559 |
| 560 chat = purple_chat_new(account, alias, components); |
560 chat = purple_chat_new(account, alias, components); |
| 561 purple_blist_add_chat(chat, group, |
561 purple_blist_add_chat(chat, group, |
| 562 purple_blist_get_last_child((PurpleBListNode*)group)); |
562 _purple_blist_get_last_child((PurpleBListNode*)group)); |
| 563 |
563 |
| 564 for (x = xmlnode_get_child(cnode, "setting"); x; x = xmlnode_get_next_twin(x)) { |
564 for (x = xmlnode_get_child(cnode, "setting"); x; x = xmlnode_get_next_twin(x)) { |
| 565 parse_setting((PurpleBListNode*)chat, x); |
565 parse_setting((PurpleBListNode*)chat, x); |
| 566 } |
566 } |
| 567 |
567 |
| 930 purple_blist_add_group(g, |
930 purple_blist_add_group(g, |
| 931 purple_blist_get_last_sibling(purplebuddylist->root)); |
931 purple_blist_get_last_sibling(purplebuddylist->root)); |
| 932 } |
932 } |
| 933 c = purple_contact_new(); |
933 c = purple_contact_new(); |
| 934 purple_blist_add_contact(c, g, |
934 purple_blist_add_contact(c, g, |
| 935 purple_blist_get_last_child((PurpleBListNode*)g)); |
935 _purple_blist_get_last_child((PurpleBListNode*)g)); |
| 936 } |
936 } |
| 937 |
937 |
| 938 cnode = PURPLE_BLIST_NODE(c); |
938 cnode = PURPLE_BLIST_NODE(c); |
| 939 |
939 |
| 940 if (bnode->parent) { |
940 if (bnode->parent) { |