[empathy] account-chooser.c: add a 'ready' signal
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] account-chooser.c: add a 'ready' signal
- Date: Mon, 16 Nov 2009 10:14:36 +0000 (UTC)
commit 2b60435f91564f1d3848cb054599ecfe62a004b4
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Nov 13 15:35:24 2009 +0000
account-chooser.c: add a 'ready' signal
This can be useful to know when the combobox has been populated by the
accounts.
libempathy-gtk/empathy-account-chooser.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 7624c2c..ba00b05 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]