[empathy] add empathy_account_chooser_is_ready
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] add empathy_account_chooser_is_ready
- Date: Mon, 16 Nov 2009 10:14:46 +0000 (UTC)
commit edf18bab031a39dfa79d54833f774b5acce64ba8
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Nov 13 15:43:44 2009 +0000
add empathy_account_chooser_is_ready
libempathy-gtk/empathy-account-chooser.c | 10 ++++++++++
libempathy-gtk/empathy-account-chooser.h | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index ba00b05..61d63b3 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 075bea8..042321e 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]