Mercurial > pidgin.yaz
changeset 22987:5cbd119b26af
merge of '1e83e527c083d0177b89f95d8ac465b393e4991d'
and '3ad9ca55d458cd83d7e8caa6bd25a68d3f253c2b'
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Fri, 16 May 2008 21:04:11 +0000 |
parents | 6a5b746ddfea (current diff) 493239b86bf6 (diff) |
children | f6dc06ba2bf4 9920046f2da0 |
files | |
diffstat | 2 files changed, 16 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/blist.c Fri May 16 21:02:50 2008 +0000 +++ b/libpurple/blist.c Fri May 16 21:04:11 2008 +0000 @@ -1233,16 +1233,13 @@ g_return_if_fail(PURPLE_BLIST_NODE_IS_CHAT((PurpleBlistNode *)chat)); if (node == NULL) { - if (group == NULL) { + if (group == NULL) group = purple_group_new(_("Chats")); + + /* Add group to blist if isn't already on it. Fixes #2752. */ + if (!purple_find_group(group->name)) { purple_blist_add_group(group, purple_blist_get_last_sibling(purplebuddylist->root)); - } else { - /* Add group to blist if isn't already on it. Fixes #2752. */ - if (!purple_find_group(group->name)) { - purple_blist_add_group(group, - purple_blist_get_last_sibling(purplebuddylist->root)); - } } } else { group = (PurpleGroup*)node->parent; @@ -1336,16 +1333,11 @@ c = contact; g = (PurpleGroup *)((PurpleBlistNode *)c)->parent; } else { - if (group) { - /* Add group to blist if isn't already on it. Fixes #2752. */ - if (!purple_find_group(group->name)) { - purple_blist_add_group(group, - purple_blist_get_last_sibling(purplebuddylist->root)); - } - - g = group; - } else { + g = group; + if (g == NULL) g = purple_group_new(_("Buddies")); + /* Add group to blist if isn't already on it. Fixes #2752. */ + if (!purple_find_group(g->name)) { purple_blist_add_group(g, purple_blist_get_last_sibling(purplebuddylist->root)); } @@ -1555,9 +1547,12 @@ else if (group) g = group; else { - g = purple_group_new(_("Buddies")); - purple_blist_add_group(g, - purple_blist_get_last_sibling(purplebuddylist->root)); + g = purple_find_group(_("Buddies")); + if (g == NULL) { + g = purple_group_new(_("Buddies")); + purple_blist_add_group(g, + purple_blist_get_last_sibling(purplebuddylist->root)); + } } gnode = (PurpleBlistNode*)g;
--- a/libpurple/protocols/myspace/myspace.c Fri May 16 21:02:50 2008 +0000 +++ b/libpurple/protocols/myspace/myspace.c Fri May 16 21:04:11 2008 +0000 @@ -2824,7 +2824,8 @@ /* 1. Creates a new group, or gets existing group if it exists (or so * the documentation claims). */ group_name = msim_msg_get_string(contact_info, "GroupName"); - if (!group_name) { + if (!group_name || (*group_name == '\0')) { + g_free(group_name); group_name = g_strdup(_("IM Friends")); purple_debug_info("myspace", "No GroupName specified, defaulting to '%s'.\n", group_name); }