Mercurial > pidgin.yaz
comparison src/account.c @ 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 | a5c31b83063f |
children | 2eca9ed49469 |
comparison
equal
deleted
inserted
replaced
11052:8a68c933a5dd | 11053:da05145441ca |
---|---|
22 * along with this program; if not, write to the Free Software | 22 * along with this program; if not, write to the Free Software |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 */ | 24 */ |
25 #include "internal.h" | 25 #include "internal.h" |
26 #include "account.h" | 26 #include "account.h" |
27 #include "core.h" | |
27 #include "debug.h" | 28 #include "debug.h" |
28 #include "notify.h" | 29 #include "notify.h" |
29 #include "pounce.h" | 30 #include "pounce.h" |
30 #include "prefs.h" | 31 #include "prefs.h" |
31 #include "privacy.h" | 32 #include "privacy.h" |
1790 gaim_accounts_get_all(void) | 1791 gaim_accounts_get_all(void) |
1791 { | 1792 { |
1792 return accounts; | 1793 return accounts; |
1793 } | 1794 } |
1794 | 1795 |
1796 GList * | |
1797 gaim_accounts_get_all_active(void) | |
1798 { | |
1799 GList *list = NULL; | |
1800 GList *all = gaim_accounts_get_all(); | |
1801 | |
1802 while (all != NULL) { | |
1803 GaimAccount *account = all->data; | |
1804 | |
1805 if (gaim_account_get_enabled(account, gaim_core_get_ui())) | |
1806 list = g_list_append(list, account); | |
1807 | |
1808 all = all->next; | |
1809 } | |
1810 | |
1811 return list; | |
1812 } | |
1813 | |
1795 GaimAccount * | 1814 GaimAccount * |
1796 gaim_accounts_find(const char *name, const char *protocol_id) | 1815 gaim_accounts_find(const char *name, const char *protocol_id) |
1797 { | 1816 { |
1798 GaimAccount *account = NULL; | 1817 GaimAccount *account = NULL; |
1799 GList *l; | 1818 GList *l; |