Mercurial > pidgin.yaz
changeset 5879:d58406d31a1a
[gaim-migrate @ 6311]
Too many things can go wrong with gaim_accounts_get_active(), so I'm taking
it out and modifying the accounts drop-down box to just use
gaim_connections_get_all() instead.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 15 Jun 2003 04:58:09 +0000 |
parents | 9e54bb2ee3b5 |
children | 1b85ff65be57 |
files | src/account.c src/account.h src/gtkutils.c |
diffstat | 3 files changed, 8 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/account.c Sun Jun 15 03:22:55 2003 +0000 +++ b/src/account.c Sun Jun 15 04:58:09 2003 +0000 @@ -80,7 +80,6 @@ } AccountParserData; static GList *accounts = NULL; -static GList *active_accounts = NULL; static guint accounts_save_timer = 0; static gboolean accounts_loaded = FALSE; @@ -171,9 +170,6 @@ gaim_connection_connect(gc); - if (gaim_account_is_connected(account)) - active_accounts = g_list_append(active_accounts, account); - return gc; } @@ -185,8 +181,6 @@ gaim_connection_disconnect(account->gc); - active_accounts = g_list_remove(active_accounts, account); - account->gc = NULL; } @@ -1271,12 +1265,6 @@ return accounts; } -GList * -gaim_accounts_get_active(void) -{ - return active_accounts; -} - GaimAccount * gaim_accounts_find(const char *name, GaimProtocol protocol) {
--- a/src/account.h Sun Jun 15 03:22:55 2003 +0000 +++ b/src/account.h Sun Jun 15 04:58:09 2003 +0000 @@ -492,13 +492,6 @@ GList *gaim_accounts_get_all(void); /** - * Returns a list of all active accounts. - * - * @return A list of all accounts. - */ -GList *gaim_accounts_get_active(void); - -/** * Finds an account with the specified name and protocol. * * @param name The account username.
--- a/src/gtkutils.c Sun Jun 15 03:22:55 2003 +0000 +++ b/src/gtkutils.c Sun Jun 15 04:58:09 2003 +0000 @@ -696,13 +696,19 @@ if (show_all) list = gaim_accounts_get_all(); else - list = gaim_accounts_get_active(); + list = gaim_connections_get_all(); for (p = list, i = 0; p != NULL; p = p->next, i++) { GaimPluginProtocolInfo *prpl_info = NULL; GaimPlugin *plugin; - account = (GaimAccount *)p->data; + if (show_all) + account = (GaimAccount *)p->data; + else { + GaimConnection *gc = (GaimConnection *)p->data; + + account = gaim_connection_get_account(gc); + } plugin = gaim_find_prpl(gaim_account_get_protocol(account));