aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-local-xmpp-assistant-widget.c')
-rw-r--r--libempathy-gtk/empathy-local-xmpp-assistant-widget.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
index 5cf8ce976..5d00fd229 100644
--- a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
+++ b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
@@ -280,3 +280,28 @@ empathy_local_xmpp_assistant_widget_create_account (
empathy_account_settings_apply_async (self->priv->settings,
apply_account_cb, NULL);
}
+
+gboolean
+empathy_local_xmpp_assistant_widget_should_create_account (
+ TpAccountManager *manager)
+{
+ gboolean salut_created = FALSE;
+ GList *accounts, *l;
+
+ accounts = tp_account_manager_get_valid_accounts (manager);
+
+ for (l = accounts; l != NULL; l = g_list_next (l))
+ {
+ TpAccount *account = TP_ACCOUNT (l->data);
+
+ if (!tp_strdiff (tp_account_get_protocol (account), "local-xmpp"))
+ {
+ salut_created = TRUE;
+ break;
+ }
+ }
+
+ g_list_free (accounts);
+
+ return !salut_created;
+}