diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-01 20:18:26 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-01 20:18:26 +0800 |
commit | 8aaf6865026ead0f21a233a2897a89a7de332f5d (patch) | |
tree | 1eb2237d2e0284e26130361ec8ca68922af6e971 /libempathy/empathy-tp-chat.c | |
parent | b21403fed48c9b95d32a9b8968ac8f47135fd34f (diff) | |
download | gsoc2013-empathy-8aaf6865026ead0f21a233a2897a89a7de332f5d.tar gsoc2013-empathy-8aaf6865026ead0f21a233a2897a89a7de332f5d.tar.gz gsoc2013-empathy-8aaf6865026ead0f21a233a2897a89a7de332f5d.tar.bz2 gsoc2013-empathy-8aaf6865026ead0f21a233a2897a89a7de332f5d.tar.lz gsoc2013-empathy-8aaf6865026ead0f21a233a2897a89a7de332f5d.tar.xz gsoc2013-empathy-8aaf6865026ead0f21a233a2897a89a7de332f5d.tar.zst gsoc2013-empathy-8aaf6865026ead0f21a233a2897a89a7de332f5d.zip |
[darcs-to-svn @ Connect accounts in empathy-launcher, not in empathy-contact-list]
svn path=/trunk/; revision=14
Diffstat (limited to 'libempathy/empathy-tp-chat.c')
-rw-r--r-- | libempathy/empathy-tp-chat.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 36ac8a7a8..f72655eca 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -44,6 +44,7 @@ struct _EmpathyTpChatPriv { EmpathyContactList *list; McAccount *account; gchar *id; + MissionControl *mc; TpChan *tp_chan; DBusGProxy *text_iface; @@ -167,6 +168,9 @@ tp_chat_finalize (GObject *object) if (priv->account) { g_object_unref (priv->account); } + if (priv->mc) { + g_object_unref (priv->mc); + } g_free (priv->id); G_OBJECT_CLASS (empathy_tp_chat_parent_class)->finalize (object); @@ -190,6 +194,7 @@ empathy_tp_chat_new (McAccount *account, priv->list = empathy_contact_manager_get_list (manager, account); priv->tp_chan = g_object_ref (tp_chan); priv->account = g_object_ref (account); + priv->mc = mission_control_new (tp_get_bus ()); g_object_ref (priv->list); priv->text_iface = tp_chan_get_interface (tp_chan, @@ -230,7 +235,7 @@ empathy_tp_chat_new_with_contact (GossipContact *contact) g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL); - mc = empathy_session_get_mission_control (); + mc = mission_control_new (tp_get_bus ()); account = gossip_contact_get_account (contact); if (mission_control_get_connection_status (mc, account, NULL) != 0) { @@ -255,6 +260,7 @@ empathy_tp_chat_new_with_contact (GossipContact *contact) g_object_unref (tp_conn); g_object_unref (text_chan); + g_object_unref (mc); return chat; } @@ -373,7 +379,6 @@ const gchar * empathy_tp_chat_get_id (EmpathyTpChat *chat) { EmpathyTpChatPriv *priv; - MissionControl *mc; TpConn *tp_conn; GArray *handles; gchar **names; @@ -387,8 +392,7 @@ empathy_tp_chat_get_id (EmpathyTpChat *chat) return priv->id; } - mc = empathy_session_get_mission_control (); - tp_conn = mission_control_get_connection (mc, priv->account, NULL); + tp_conn = mission_control_get_connection (priv->mc, priv->account, NULL); handles = g_array_new (FALSE, FALSE, sizeof (guint)); g_array_append_val (handles, priv->tp_chan->handle); |