# HG changeset patch # User Richard Laager # Date 1120371170 0 # Node ID da05145441ca675dffcebc7173d9debb1a6769e4 # Parent 8a68c933a5ddc8c9e524873071714b9272eeb279 [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 diff -r 8a68c933a5dd -r da05145441ca src/account.c --- 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) {