aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-09-08 21:22:09 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2009-09-08 22:12:08 +0800
commitb2ef2b768c2dbf77ff8647243862f183bb52cce0 (patch)
treefbef8377ec519883ce60b261948161123e921d3c /libempathy
parentabc3ceffca882c47c1b8678deb304f4d7d60955e (diff)
downloadgsoc2013-empathy-b2ef2b768c2dbf77ff8647243862f183bb52cce0.tar
gsoc2013-empathy-b2ef2b768c2dbf77ff8647243862f183bb52cce0.tar.gz
gsoc2013-empathy-b2ef2b768c2dbf77ff8647243862f183bb52cce0.tar.bz2
gsoc2013-empathy-b2ef2b768c2dbf77ff8647243862f183bb52cce0.tar.lz
gsoc2013-empathy-b2ef2b768c2dbf77ff8647243862f183bb52cce0.tar.xz
gsoc2013-empathy-b2ef2b768c2dbf77ff8647243862f183bb52cce0.tar.zst
gsoc2013-empathy-b2ef2b768c2dbf77ff8647243862f183bb52cce0.zip
chatroom-manager: add a ready property
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-chatroom-manager.c18
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,