priv = GET_PRIV (self);
chatroom_manager_singleton = self;
- g_object_add_weak_pointer (obj, (gpointer *) &chatroom_manager_singleton);
+ g_object_add_weak_pointer (obj, (gpointer) &chatroom_manager_singleton);
if (priv->file == NULL)
{
if (chatroom == NULL)
return;
+ g_object_set (chatroom, "tp-chat", NULL, NULL);
g_object_get (chatroom, "favorite", &favorite, NULL);
if (!favorite)
tp_channel_get_handle (channel, &handle_type);
if (handle_type != TP_HANDLE_TYPE_ROOM)
- goto out;
+ return;
chat = EMPATHY_TP_CHAT (
empathy_dispatch_operation_get_channel_wrapper (operation));
{
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.. */
g_signal_connect (chat, "destroy",
G_CALLBACK (chatroom_manager_chat_destroyed_cb),
manager);
-
- g_object_unref (chat);
-out:
- g_object_unref (channel);
}
void