aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-account-chooser.c10
-rw-r--r--libempathy-gtk/empathy-account-chooser.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index ba00b0541..61d63b32c 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -64,6 +64,7 @@ typedef struct {
gboolean has_all_option;
EmpathyAccountChooserFilterFunc filter;
gpointer filter_data;
+ gboolean ready;
} EmpathyAccountChooserPriv;
typedef struct {
@@ -475,6 +476,7 @@ account_manager_prepared_cb (GObject *source_object,
GList *accounts, *l;
TpAccountManager *manager = TP_ACCOUNT_MANAGER (source_object);
EmpathyAccountChooser *chooser = user_data;
+ EmpathyAccountChooserPriv *priv = GET_PRIV (chooser);
GError *error = NULL;
if (!tp_account_manager_prepare_finish (manager, result, &error)) {
@@ -497,6 +499,7 @@ account_manager_prepared_cb (GObject *source_object,
g_list_free (accounts);
+ priv->ready = TRUE;
g_signal_emit (chooser, signals[READY], 0);
}
@@ -836,3 +839,10 @@ empathy_account_chooser_filter_is_connected (TpAccount *account,
== TP_CONNECTION_STATUS_CONNECTED);
}
+gboolean
+empathy_account_chooser_is_ready (EmpathyAccountChooser *self)
+{
+ EmpathyAccountChooserPriv *priv = GET_PRIV (self);
+
+ return priv->ready;
+}
diff --git a/libempathy-gtk/empathy-account-chooser.h b/libempathy-gtk/empathy-account-chooser.h
index 075bea81c..042321ec2 100644
--- a/libempathy-gtk/empathy-account-chooser.h
+++ b/libempathy-gtk/empathy-account-chooser.h
@@ -70,6 +70,7 @@ void empathy_account_chooser_set_filter (EmpathyAccountChooser
gpointer user_data);
gboolean empathy_account_chooser_filter_is_connected (TpAccount *account,
gpointer user_data);
+gboolean empathy_account_chooser_is_ready (EmpathyAccountChooser *chooser);
G_END_DECLS