]> git.0d.be Git - empathy.git/commitdiff
don't display 'No topic defined' if topic are not supported
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 23 Jan 2012 14:27:50 +0000 (15:27 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 24 Jan 2012 09:29:01 +0000 (10:29 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=668502

libempathy-gtk/empathy-chat.c

index 1496f582dfc5b6b7775882c5e2f75635a2400a2c..be5d71ec74d68b91a3bae5a6771b18bfbea06895 100644 (file)
@@ -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);
+                       }
                }
 }