From 6de7927ded5e15783b4d9d93233856d9bd373641 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 23 Jan 2012 15:27:50 +0100 Subject: don't display 'No topic defined' if topic are not supported https://bugzilla.gnome.org/show_bug.cgi?id=668502 --- libempathy-gtk/empathy-chat.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libempathy-gtk') 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); + } } } -- cgit v1.2.3