aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-01-23 22:27:50 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-01-24 17:29:01 +0800
commit6de7927ded5e15783b4d9d93233856d9bd373641 (patch)
tree64c7484811eab97ed69e90bcaa87f966d36f831c
parent140d5bcc021f83c8b5057c87764c72c60659c16a (diff)
downloadgsoc2013-empathy-6de7927ded5e15783b4d9d93233856d9bd373641.tar
gsoc2013-empathy-6de7927ded5e15783b4d9d93233856d9bd373641.tar.gz
gsoc2013-empathy-6de7927ded5e15783b4d9d93233856d9bd373641.tar.bz2
gsoc2013-empathy-6de7927ded5e15783b4d9d93233856d9bd373641.tar.lz
gsoc2013-empathy-6de7927ded5e15783b4d9d93233856d9bd373641.tar.xz
gsoc2013-empathy-6de7927ded5e15783b4d9d93233856d9bd373641.tar.zst
gsoc2013-empathy-6de7927ded5e15783b4d9d93233856d9bd373641.zip
don't display 'No topic defined' if topic are not supported
https://bugzilla.gnome.org/show_bug.cgi?id=668502
-rw-r--r--libempathy-gtk/empathy-chat.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 1496f582d..be5d71ec7 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1604,15 +1604,19 @@ chat_subject_changed_cb (EmpathyChat *chat)
gtk_widget_show (priv->hbox_topic);
}
if (priv->block_events_timeout_id == 0) {
- gchar *str;
+ gchar *str = NULL;
if (!EMP_STR_EMPTY (priv->subject)) {
str = g_strdup_printf (_("Topic set to: %s"), priv->subject);
- } else {
+ } else if (empathy_tp_chat_supports_subject (priv->tp_chat)) {
+ /* No need to display this 'event' is no topic can be defined anyway */
str = g_strdup (_("No topic defined"));
}
- empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
- g_free (str);
+
+ if (str != NULL) {
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
+ g_free (str);
+ }
}
}