aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-chatroom-manager.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:15:31 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:15:31 +0800
commitc870b1b51063dff7e5218d8bd6bdc565cb69b577 (patch)
tree4cb2431426467c02ae36c1c38cc3a4da90a1f5f6 /libempathy/empathy-chatroom-manager.c
parenteba71b838f543c7dd9390e74911526cf3d48fa26 (diff)
downloadgsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.gz
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.bz2
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.lz
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.xz
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.zst
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.zip
Let a chatroom keep a reference to a its TpChat if applicable
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2189
Diffstat (limited to 'libempathy/empathy-chatroom-manager.c')
-rw-r--r--libempathy/empathy-chatroom-manager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c
index 0a637a440..fdc6f3c0c 100644
--- a/libempathy/empathy-chatroom-manager.c
+++ b/libempathy/empathy-chatroom-manager.c
@@ -667,6 +667,7 @@ chatroom_manager_chat_destroyed_cb (EmpathyTpChat *chat,
if (chatroom == NULL)
return;
+ g_object_set (chatroom, "tp-chat", NULL, NULL);
g_object_get (chatroom, "favorite", &favorite, NULL);
if (!favorite)
@@ -715,9 +716,14 @@ chatroom_manager_observe_channel_cb (EmpathyDispatcher *dispatcher,
{
chatroom = empathy_chatroom_new_full (account, roomname, roomname,
FALSE);
+ g_object_set (G_OBJECT (chatroom), "tp-chat", chat, NULL);
empathy_chatroom_manager_add (manager, chatroom);
g_object_unref (chatroom);
}
+ else
+ {
+ g_object_set (G_OBJECT (chatroom), "tp-chat", chat, NULL);
+ }
/* A TpChat is always destroyed as it only gets unreffed after the channel
* has been invalidated in the dispatcher.. */