Mercurial > pidgin
changeset 11053:da05145441ca
[gaim-migrate @ 12991]
Patch 1231506 from sadrul
"gaim_accounts_get_all_active functions is declared in src/account.h which should return a list of active (enabled) accounts, but it is not implemented anywhere. This patch implements the function."
This implementation looks right. It works for him. Why not?
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 03 Jul 2005 06:12:50 +0000 |
parents | 8a68c933a5dd |
children | bc700cc98b82 |
files | src/account.c |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/account.c Sun Jul 03 05:28:57 2005 +0000 +++ b/src/account.c Sun Jul 03 06:12:50 2005 +0000 @@ -24,6 +24,7 @@ */ #include "internal.h" #include "account.h" +#include "core.h" #include "debug.h" #include "notify.h" #include "pounce.h" @@ -1792,6 +1793,24 @@ return accounts; } +GList * +gaim_accounts_get_all_active(void) +{ + GList *list = NULL; + GList *all = gaim_accounts_get_all(); + + while (all != NULL) { + GaimAccount *account = all->data; + + if (gaim_account_get_enabled(account, gaim_core_get_ui())) + list = g_list_append(list, account); + + all = all->next; + } + + return list; +} + GaimAccount * gaim_accounts_find(const char *name, const char *protocol_id) {