aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-10-12 04:47:09 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-10-20 21:30:19 +0800
commit7d2255306d8c07e760917b1e8a4351c78ee302ed (patch)
treecc53895700c1a4226093df2364e5ee5b3a68c04b
parent729145dbf0039db5763533d046eb53f5de38a419 (diff)
downloadgsoc2013-empathy-7d2255306d8c07e760917b1e8a4351c78ee302ed.tar
gsoc2013-empathy-7d2255306d8c07e760917b1e8a4351c78ee302ed.tar.gz
gsoc2013-empathy-7d2255306d8c07e760917b1e8a4351c78ee302ed.tar.bz2
gsoc2013-empathy-7d2255306d8c07e760917b1e8a4351c78ee302ed.tar.lz
gsoc2013-empathy-7d2255306d8c07e760917b1e8a4351c78ee302ed.tar.xz
gsoc2013-empathy-7d2255306d8c07e760917b1e8a4351c78ee302ed.tar.zst
gsoc2013-empathy-7d2255306d8c07e760917b1e8a4351c78ee302ed.zip
empathy-chat-window: update the tab icon when the TpChat is disconnected (#597680)
-rw-r--r--src/empathy-chat-window.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 3c2b981bd..f07d25134 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -437,7 +437,11 @@ chat_window_update_chat_tab (EmpathyChat *chat)
name, empathy_account_get_unique_name (account), subject, remote_contact);
/* Update tab image */
- if (g_list_find (priv->chats_new_msg, chat)) {
+ if (empathy_chat_get_tp_chat (chat) == NULL) {
+ /* No TpChat, we are disconnected */
+ icon_name = EMPATHY_IMAGE_OFFLINE;
+ }
+ else if (g_list_find (priv->chats_new_msg, chat)) {
icon_name = EMPATHY_IMAGE_MESSAGE;
}
else if (g_list_find (priv->chats_composing, chat)) {
@@ -1170,6 +1174,9 @@ chat_window_page_added_cb (GtkNotebook *notebook,
g_signal_connect (chat, "new-message",
G_CALLBACK (chat_window_new_message_cb),
window);
+ g_signal_connect (chat, "notify::tp-chat",
+ G_CALLBACK (chat_window_update_chat_tab),
+ window);
/* Set flag so we know to perform some special operations on
* switch page due to the new page being added.
@@ -1214,6 +1221,9 @@ chat_window_page_removed_cb (GtkNotebook *notebook,
g_signal_handlers_disconnect_by_func (chat,
G_CALLBACK (chat_window_new_message_cb),
window);
+ g_signal_handlers_disconnect_by_func (chat,
+ G_CALLBACK (chat_window_update_chat_tab),
+ window);
/* Keep list of chats up to date */
priv->chats = g_list_remove (priv->chats, chat);