diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-09-08 23:22:00 +0800 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-09-08 23:22:00 +0800 |
commit | 469e38c1578332e3cff6ceea9bf0940f9965ff04 (patch) | |
tree | 40e7c8abbca53f36c1f9fe885c317cb82e0a45b6 /libempathy | |
parent | 0cfd64b658e967d9e2257bb21aa43dce4762ee29 (diff) | |
parent | 923bb82f3aa66ac7b24168b5b69541268bf9d055 (diff) | |
download | gsoc2013-empathy-469e38c1578332e3cff6ceea9bf0940f9965ff04.tar gsoc2013-empathy-469e38c1578332e3cff6ceea9bf0940f9965ff04.tar.gz gsoc2013-empathy-469e38c1578332e3cff6ceea9bf0940f9965ff04.tar.bz2 gsoc2013-empathy-469e38c1578332e3cff6ceea9bf0940f9965ff04.tar.lz gsoc2013-empathy-469e38c1578332e3cff6ceea9bf0940f9965ff04.tar.xz gsoc2013-empathy-469e38c1578332e3cff6ceea9bf0940f9965ff04.tar.zst gsoc2013-empathy-469e38c1578332e3cff6ceea9bf0940f9965ff04.zip |
Merge branch 'auto-connect'
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-chatroom-manager.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c index c6318abd3..7d80b9441 100644 --- a/libempathy/empathy-chatroom-manager.c +++ b/libempathy/empathy-chatroom-manager.c @@ -55,6 +55,7 @@ typedef struct gulong account_manager_ready_handler_id; /* source id of the autosave timer */ gint save_timer_id; + gboolean ready; } EmpathyChatroomManagerPriv; enum { @@ -69,6 +70,7 @@ static guint signals[LAST_SIGNAL]; enum { PROP_FILE = 1, + PROP_READY, LAST_PROPERTY }; @@ -304,6 +306,9 @@ chatroom_manager_get_all (EmpathyChatroomManager *manager) return FALSE; } + priv->ready = TRUE; + g_object_notify (G_OBJECT (manager), "ready"); + return TRUE; } @@ -321,6 +326,9 @@ empathy_chatroom_manager_get_property (GObject *object, case PROP_FILE: g_value_set_string (value, priv->file); break; + case PROP_READY: + g_value_set_boolean (value, priv->ready); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -423,6 +431,8 @@ empathy_chatroom_manager_constructor (GType type, self = EMPATHY_CHATROOM_MANAGER (obj); priv = GET_PRIV (self); + priv->ready = FALSE; + chatroom_manager_singleton = self; g_object_add_weak_pointer (obj, (gpointer) &chatroom_manager_singleton); @@ -476,6 +486,14 @@ empathy_chatroom_manager_class_init (EmpathyChatroomManagerClass *klass) G_PARAM_STATIC_BLURB); g_object_class_install_property (object_class, PROP_FILE, param_spec); + param_spec = g_param_spec_boolean ( + "ready", + "whether the manager is ready yet", + "whether the manager is ready yet", + FALSE, + G_PARAM_READABLE); + g_object_class_install_property (object_class, PROP_READY, param_spec); + signals[CHATROOM_ADDED] = g_signal_new ("chatroom-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, |