From cf56f1ff15147abbec90c4d387fa770eec7404aa Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 28 Apr 2008 08:17:15 +0000 Subject: Hide contact list when text channel is destroyed. svn path=/trunk/; revision=1057 --- libempathy-gtk/empathy-chat.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index a432a2a76..4a7de774c 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -257,24 +257,6 @@ chat_composing_stop (EmpathyChat *chat) TP_CHANNEL_CHAT_STATE_ACTIVE); } -static void -chat_destroy_cb (EmpathyTpChat *tp_chat, - EmpathyChat *chat) -{ - EmpathyChatPriv *priv; - - priv = GET_PRIV (chat); - - if (priv->tp_chat) { - g_object_unref (priv->tp_chat); - priv->tp_chat = NULL; - g_object_notify (G_OBJECT (chat), "tp-chat"); - } - - empathy_chat_view_append_event (chat->view, _("Disconnected")); - gtk_widget_set_sensitive (chat->input_text_view, FALSE); -} - static void chat_sent_message_add (EmpathyChat *chat, const gchar *str) @@ -1255,6 +1237,27 @@ chat_remote_contact_changed_cb (EmpathyChat *chat) g_object_notify (G_OBJECT (chat), "id"); } +static void +chat_destroy_cb (EmpathyTpChat *tp_chat, + EmpathyChat *chat) +{ + EmpathyChatPriv *priv; + + priv = GET_PRIV (chat); + + if (!priv->tp_chat) { + return; + } + + g_object_unref (priv->tp_chat); + priv->tp_chat = NULL; + g_object_notify (G_OBJECT (chat), "tp-chat"); + + empathy_chat_view_append_event (chat->view, _("Disconnected")); + gtk_widget_set_sensitive (chat->input_text_view, FALSE); + chat_set_show_contacts (chat, FALSE); +} + static void chat_create_ui (EmpathyChat *chat) { -- cgit v1.2.3