Mercurial > pidgin
diff libgaim/account.c @ 14990:633d4c25e82c
[gaim-migrate @ 17769]
Change oscar-to-aim-and-icq hack. This does the renaming gtkgaim, after everything's initialized (so it fixes broken Persons and pounces and savedstatuses, but it introduces a hack in gaim_account_get_protocol_id(), since some initialization requires the protocol id to match the plugin. I don't really like this, but it's the best workaround I could think of. Hopefully we can remove this after not-long.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 17 Nov 2006 19:39:17 +0000 |
parents | 0a9c44ce9a4a |
children | 577ddea3ab82 |
line wrap: on
line diff
--- a/libgaim/account.c Fri Nov 17 19:27:58 2006 +0000 +++ b/libgaim/account.c Fri Nov 17 19:39:17 2006 +0000 @@ -697,19 +697,6 @@ return NULL; } - - /* HACK BY SEANEGAN: special case prpl-oscar to either prpl-icq - * prpl-aim for users upgrading to 2.0.0. This can probably - * be removed after a while - */ - if (!strcmp(protocol_id, "prpl-oscar")) { - g_free(protocol_id); - if (isdigit(name[0])) - protocol_id = g_strdup("prpl-icq"); - else - protocol_id = g_strdup("prpl-aim"); - } - ret = gaim_account_new(name, protocol_id); g_free(name); g_free(protocol_id); @@ -1663,7 +1650,15 @@ gaim_account_get_protocol_id(const GaimAccount *account) { g_return_val_if_fail(account != NULL, NULL); - + /* + * HACK by Seanegan + */ + if (!strcmp(account->protocol_id, "prpl-oscar")) { + if (isdigit(account->username[0])) + return "prpl-icq"; + else + return "prpl-aim"; + } return account->protocol_id; }