Mercurial > pidgin
diff libpurple/blist.c @ 22262:edca47ee06c5
Kill off gc->prpl in the core everywhere but connection.c (when the struct
is hidden, it will exist there and be accessible). While I was here I fixed
some other minor struct member usage along the way, including attention type
stuff I missed when I initially added its new API. I also fixed a couple
initializations that will warn on some strict non-gcc compilers.
| author | John Bailey <rekkanoryo@rekkanoryo.org> |
|---|---|
| date | Sun, 03 Feb 2008 19:43:41 +0000 |
| parents | 797230b3e48e |
| children | 6fc8f0c825e0 |
line wrap: on
line diff
--- a/libpurple/blist.c Sun Feb 03 19:38:02 2008 +0000 +++ b/libpurple/blist.c Sun Feb 03 19:43:41 2008 +0000 @@ -1087,11 +1087,18 @@ if(old_name && source && strcmp(source->name, old_name)) { for (accts = purple_group_get_accounts(source); accts; accts = g_slist_remove(accts, accts->data)) { PurpleAccount *account = accts->data; + PurpleConnection *gc = NULL; + PurplePlugin *prpl = NULL; PurplePluginProtocolInfo *prpl_info = NULL; GList *l = NULL, *buddies = NULL; - if(account->gc && account->gc->prpl) - prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl); + gc = purple_account_get_connection(account); + + if(gc) + prpl = purple_connection_get_prpl(gc); + + if(gc && prpl) + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); if(!prpl_info) continue; @@ -1104,7 +1111,7 @@ } if(prpl_info->rename_group) { - prpl_info->rename_group(account->gc, old_name, source, buddies); + prpl_info->rename_group(gc, old_name, source, buddies); } else { GList *cur, *groups = NULL;
