aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-chat.c39
1 files changed, 21 insertions, 18 deletions
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)
@@ -1256,6 +1238,27 @@ chat_remote_contact_changed_cb (EmpathyChat *chat)
}
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)
{
EmpathyChatPriv *priv = GET_PRIV (chat);