Mercurial > pidgin.yaz
diff src/protocols/gg/gg.c @ 4770:c4c28874ecd3
[gaim-migrate @ 5088]
I want to go to sleep. This is drag-n-drop moving of buddies in the list.
I think it works, but I didn't actually test it... I really should have though;
I can't imagine it working fine as-is. ;)
I'm holding off on the rest of my Edit Buddy List stuff for tomorrow... I love
last minute things, don't I?
Note: I created gaim_blist_members and gaim_blist_groups to reproduce the
effects of the old groups GSList and the members GSList of the group struct
that I removed. This is really sub-optimal and should be replaced to iterate
the Buddy List directly. If someone wants to do that, please do. Even if you
don't want to do that, just review the changes I made and make sure I didn't
do anything stupid. It is past 6am and I'm a bit tired and prone to mistake
making.
Thanks.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 14 Mar 2003 11:38:21 +0000 |
parents | c15e0699acae |
children | 92ae181271e9 |
line wrap: on
line diff
--- a/src/protocols/gg/gg.c Fri Mar 14 08:27:13 2003 +0000 +++ b/src/protocols/gg/gg.c Fri Mar 14 11:38:21 2003 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 5047 2003-03-13 06:08:56Z faceprint $ + * $Id: gg.c 5088 2003-03-14 11:38:21Z seanegan $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -85,7 +85,6 @@ /* for win32 compatability */ G_MODULE_IMPORT GSList *connections; -G_MODULE_IMPORT GSList *groups; struct agg_data { struct gg_session *sess; @@ -1005,7 +1004,8 @@ gchar *u = gg_urlencode(gc->username); gchar *p = gg_urlencode(gc->password); - GSList *gr = groups; + GSList *gr = gaim_blist_groups(); + GSList *gr1 = gr; he->gc = gc; he->type = AGG_HTTP_USERLIST_EXPORT; @@ -1016,12 +1016,13 @@ g_free(u); g_free(p); - while (gr) { - struct group *g = gr->data; - GSList *m = g->members; + while (gr1) { + struct group *g = gr1->data; + GSList *m = gaim_blist_members(g); + GSList *m1 = m; int num_added=0; - while (m) { - struct buddy *b = m->data; + while (m1) { + struct buddy *b = m1->data; if(b->account == gc->account) { gchar *newdata; @@ -1050,10 +1051,12 @@ g_free(show); g_free(name); } - m = g_slist_next(m); + m1 = g_slist_next(m1); } - gr = g_slist_next(gr); + g_slist_free(m); + gr = g_slist_next(gr1); } + g_slist_free(gr); if (proxy_connect(gc->account, GG_PUBDIR_HOST, GG_PUBDIR_PORT, http_req_callback, he) < 0) { do_error_dialog(_("Couldn't export buddy list"),