+/* @account: if not %NULL, the only account which can be enabled */
+static void
+display_page_account_not_enabled (EmpathyRosterWindow *self,
+ TpAccount *account)
+{
+ if (account == NULL)
+ {
+ display_page_message (self,
+ _("You need to enable one of your accounts to see contacts here."),
+ TRUE);
+ }
+ else
+ {
+ gchar *tmp;
+
+ /* translators: argument is an account name */
+ tmp = g_strdup_printf (_("You need to enable %s to see contacts here."),
+ tp_account_get_display_name (account));
+
+ display_page_message (self, tmp, TRUE);
+ g_free (tmp);
+ }
+}
+static gboolean
+has_enabled_account (GList *accounts)
+{
+ GList *l;
+
+ for (l = accounts; l != NULL; l = g_list_next (l))
+ {
+ TpAccount *account = l->data;
+
+ if (tp_account_is_enabled (account))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+