[empathy] add empathy_accounts_has_accounts



commit 475ab0143677586dd29be933795e88c35b4a2706
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Mar 4 17:52:37 2010 +0100

    add empathy_accounts_has_accounts

 src/empathy-accounts-common.c |   13 +++++++++++++
 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 334f3cb..311a5f6 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 2bd51bf..71d2dc3 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]