aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-13 23:35:24 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-16 18:13:35 +0800
commit2b60435f91564f1d3848cb054599ecfe62a004b4 (patch)
treecf613c8762b9e9f2ce69d87de2a1636b7f535846
parent95fb98c0a53a1f69f9ef97c21fc890e61b74544b (diff)
downloadgsoc2013-empathy-2b60435f91564f1d3848cb054599ecfe62a004b4.tar
gsoc2013-empathy-2b60435f91564f1d3848cb054599ecfe62a004b4.tar.gz
gsoc2013-empathy-2b60435f91564f1d3848cb054599ecfe62a004b4.tar.bz2
gsoc2013-empathy-2b60435f91564f1d3848cb054599ecfe62a004b4.tar.lz
gsoc2013-empathy-2b60435f91564f1d3848cb054599ecfe62a004b4.tar.xz
gsoc2013-empathy-2b60435f91564f1d3848cb054599ecfe62a004b4.tar.zst
gsoc2013-empathy-2b60435f91564f1d3848cb054599ecfe62a004b4.zip
account-chooser.c: add a 'ready' signal
This can be useful to know when the combobox has been populated by the accounts.
-rw-r--r--libempathy-gtk/empathy-account-chooser.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 7624c2c13..ba00b0541 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -123,6 +123,13 @@ enum {
PROP_HAS_ALL_OPTION,
};
+enum {
+ READY,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
G_DEFINE_TYPE (EmpathyAccountChooser, empathy_account_chooser, GTK_TYPE_COMBO_BOX);
static void
@@ -147,6 +154,16 @@ empathy_account_chooser_class_init (EmpathyAccountChooserClass *klass)
FALSE,
G_PARAM_READWRITE));
+ signals[READY] =
+ g_signal_new ("ready",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
g_type_class_add_private (object_class, sizeof (EmpathyAccountChooserPriv));
}
@@ -479,6 +496,8 @@ account_manager_prepared_cb (GObject *source_object,
}
g_list_free (accounts);
+
+ g_signal_emit (chooser, signals[READY], 0);
}
static void