Mercurial > pidgin.yaz
changeset 4775:92ae181271e9
[gaim-migrate @ 5095]
This fixes a bug when adding a jabber dude to a new group, I think. I
dunno, it might fix some other stuff.
If Gaim were any less inanimate I would try to sleep with it so bad
it's not even funny.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 14 Mar 2003 17:06:00 +0000 |
parents | e870e313be96 |
children | 6219ffd18c63 |
files | src/dialogs.c src/protocols/gg/gg.c src/protocols/jabber/jabber.c src/protocols/yahoo/yahoo.c src/protocols/zephyr/zephyr.c |
diffstat | 5 files changed, 28 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dialogs.c Fri Mar 14 16:18:51 2003 +0000 +++ b/src/dialogs.c Fri Mar 14 17:06:00 2003 +0000 @@ -885,8 +885,10 @@ whoalias = gtk_entry_get_text(GTK_ENTRY(a->entry_for_alias)); c = gaim_find_conversation(who); - if (!(g = gaim_find_group(grp))) + if (!(g = gaim_find_group(grp))) { g = gaim_group_new(grp); + gaim_blist_add_group(g, NULL); + } b = gaim_buddy_new(a->gc->account, who, whoalias); gaim_blist_add_buddy(b, g, NULL); serv_add_buddy(a->gc, who);
--- a/src/protocols/gg/gg.c Fri Mar 14 16:18:51 2003 +0000 +++ b/src/protocols/gg/gg.c Fri Mar 14 17:06:00 2003 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 5088 2003-03-14 11:38:21Z seanegan $ + * $Id: gg.c 5095 2003-03-14 17:06:00Z thekingant $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -806,8 +806,10 @@ g_strfreev(group_tbl); } /* Add Buddy to our userlist */ - if (!(g = gaim_find_group(group))) + if (!(g = gaim_find_group(group))) { g = gaim_group_new(group); + gaim_blist_add_group(g, NULL); + } b = gaim_buddy_new(gc->account, name, strlen(show) ? show : NULL); gaim_blist_add_buddy(b,g,NULL); gaim_blist_save();
--- a/src/protocols/jabber/jabber.c Fri Mar 14 16:18:51 2003 +0000 +++ b/src/protocols/jabber/jabber.c Fri Mar 14 17:06:00 2003 +0000 @@ -1749,10 +1749,14 @@ struct buddy *b = gaim_buddy_new(GJ_GC(gjc)->account, buddyname, name); struct group *g; if (groupname) { - if (!(g = gaim_find_group(groupname))) + if (!(g = gaim_find_group(groupname))) { g = gaim_group_new(groupname); - } else + gaim_blist_add_group(g, NULL); + } + } else { g = gaim_group_new(_("Buddies")); + gaim_blist_add_group(g, NULL); + } debug_printf("adding buddy [4]: %s\n", buddyname); gaim_blist_add_buddy(b, g, NULL); gaim_blist_save();
--- a/src/protocols/yahoo/yahoo.c Fri Mar 14 16:18:51 2003 +0000 +++ b/src/protocols/yahoo/yahoo.c Fri Mar 14 17:06:00 2003 +0000 @@ -446,6 +446,8 @@ { GSList *l = pkt->hash; gboolean export = FALSE; + struct buddy *b; + struct group *g; while (l) { char **lines; @@ -470,10 +472,13 @@ } buddies = g_strsplit(split[1], ",", -1); for (bud = buddies; bud && *bud; bud++) - if (!gaim_find_buddy(gc->account, *bud)) { - struct buddy *b = gaim_buddy_new(gc->account, *bud, NULL); - struct group *g = gaim_group_new(split[0]); - gaim_blist_add_buddy(b,g,NULL); + if (!(b = gaim_find_buddy(gc->account, *bud))) { + if (!(g = gaim_find_group(split[0]))) { + g = gaim_group_new(split[0]); + gaim_blist_add_group(g, NULL); + } + b = gaim_buddy_new(gc->account, *bud, NULL); + gaim_blist_add_buddy(b, g, NULL); export = TRUE; } g_strfreev(buddies);
--- a/src/protocols/zephyr/zephyr.c Fri Mar 14 16:18:51 2003 +0000 +++ b/src/protocols/zephyr/zephyr.c Fri Mar 14 17:06:00 2003 +0000 @@ -573,8 +573,13 @@ { FILE *fd; gchar buff[BUFSIZ], *filename; - struct group *g = gaim_group_new("Anyone"); + struct group *g; struct buddy *b; + + if (!(g = gaim_find_group(_("Anyone")))) { + g = gaim_group_new(_("Anyone")); + gaim_blist_add_group(g, NULL); + } filename = g_strconcat(gaim_home_dir(), "/.anyone", NULL); if ((fd = fopen(filename, "r")) != NULL) {