]> git.0d.be Git - empathy.git/commitdiff
Hide contact list when text channel is destroyed.
authorXavier Claessens <xclaesse@src.gnome.org>
Mon, 28 Apr 2008 08:17:15 +0000 (08:17 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 28 Apr 2008 08:17:15 +0000 (08:17 +0000)
svn path=/trunk/; revision=1057

libempathy-gtk/empathy-chat.c

index a432a2a76ffc2eb120b999c8b93b9c1814f7eaeb..4a7de774c0f59f95ab1684340e2d5b21c3d4d4ec 100644 (file)
@@ -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)
 {