diff options
-rw-r--r-- | src/empathy-accounts-common.c | 13 | ||||
-rw-r--r-- | src/empathy-accounts-common.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/empathy-accounts-common.c b/src/empathy-accounts-common.c index 334f3cba8..311a5f600 100644 --- a/src/empathy-accounts-common.c +++ b/src/empathy-accounts-common.c @@ -71,6 +71,19 @@ empathy_accounts_has_non_salut_accounts (TpAccountManager *manager) return ret; } +gboolean +empathy_accounts_has_accounts (TpAccountManager *manager) +{ + GList *accounts; + gboolean has_accounts; + + accounts = tp_account_manager_get_valid_accounts (manager); + has_accounts = (accounts != NULL); + g_list_free (accounts); + + return has_accounts; +} + void empathy_accounts_import (TpAccountManager *account_mgr, EmpathyConnectionManagers *cm_mgr) diff --git a/src/empathy-accounts-common.h b/src/empathy-accounts-common.h index 2bd51bf0d..71d2dc3a1 100644 --- a/src/empathy-accounts-common.h +++ b/src/empathy-accounts-common.h @@ -24,6 +24,8 @@ gboolean empathy_accounts_has_non_salut_accounts (TpAccountManager *manager); +gboolean empathy_accounts_has_accounts (TpAccountManager *manager); + void empathy_accounts_show_accounts_ui (TpAccountManager *manager, TpAccount *account, GCallback window_destroyed_cb); |