]> git.0d.be Git - empathy.git/blobdiff - chat/empathy-chat-main.c
[darcs-to-svn @ Sync last things from gossip. Up to date with gossip SVN revision...
[empathy.git] / chat / empathy-chat-main.c
index f279449945d5686da6850e260b67afcd32f19949..864e506b7aefadeda0b0267b54223c776836306b 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * Copyright (C) 2007 Xavier Claessens <xclaesse@gmail.com>
+ * Copyright (C) 2007 Collabora Ltd.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -17,6 +17,7 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  * 
+ * Authors: Xavier Claessens <xclaesse@gmail.com>
  */
 
 #include <config.h>
@@ -28,6 +29,7 @@
 
 #include <libtelepathy/tp-conn.h>
 #include <libtelepathy/tp-chan.h>
+#include <libtelepathy/tp-helpers.h>
 #include <libmissioncontrol/mc-account.h>
 
 #include <libempathy/gossip-contact.h>
@@ -56,7 +58,7 @@ new_channel_cb (EmpathyChandler *chandler,
                GossipPrivateChat     *chat;
 
                /* We have a private chat channel */
-               mc = empathy_session_get_mission_control ();
+               mc = mission_control_new (tp_get_bus ());
                account = mission_control_get_account_for_connection (mc, tp_conn, NULL);
                manager = empathy_session_get_contact_manager ();
                list = empathy_contact_manager_get_list (manager, account);
@@ -65,6 +67,7 @@ new_channel_cb (EmpathyChandler *chandler,
                chat = gossip_private_chat_new_with_channel (contact, tp_chan);
                gossip_chat_present (GOSSIP_CHAT (chat));
 
+               g_object_unref (mc);
                g_object_unref (account);
                g_object_unref (contact);
                g_object_unref (chat);