diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-08-13 18:50:49 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-08-13 18:50:49 +0800 |
commit | 847a3825bf21b66935ba1c092e71c93fa109d8f5 (patch) | |
tree | baf5c8e262925b55d6058c11ec6792cc64e3f608 /libempathy-gtk/empathy-group-chat.c | |
parent | b59e573a00d6d723bd14882312b764e9b8f9a8a9 (diff) | |
download | gsoc2013-empathy-847a3825bf21b66935ba1c092e71c93fa109d8f5.tar gsoc2013-empathy-847a3825bf21b66935ba1c092e71c93fa109d8f5.tar.gz gsoc2013-empathy-847a3825bf21b66935ba1c092e71c93fa109d8f5.tar.bz2 gsoc2013-empathy-847a3825bf21b66935ba1c092e71c93fa109d8f5.tar.lz gsoc2013-empathy-847a3825bf21b66935ba1c092e71c93fa109d8f5.tar.xz gsoc2013-empathy-847a3825bf21b66935ba1c092e71c93fa109d8f5.tar.zst gsoc2013-empathy-847a3825bf21b66935ba1c092e71c93fa109d8f5.zip |
Only update the topic of it has really be changed, avoid diplaying many
2007-08-13 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-group-chat.c: Only update the topic of it has
really be changed, avoid diplaying many times "Topic set to:" message.
* libempathy-gtk/empathy-chat.c: Some Jabber chatroom sends messages
received before we joined the room, this avoid displaying those messages
if we already logged them last time we joined that room. Previous
workaround prevented Empathy to log offline messages.
svn path=/trunk/; revision=255
Diffstat (limited to 'libempathy-gtk/empathy-group-chat.c')
-rw-r--r-- | libempathy-gtk/empathy-group-chat.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-group-chat.c b/libempathy-gtk/empathy-group-chat.c index 4d62d51b6..ca046a3d7 100644 --- a/libempathy-gtk/empathy-group-chat.c +++ b/libempathy-gtk/empathy-group-chat.c @@ -560,13 +560,18 @@ group_chat_subject_notify_cb (EmpathyTpChat *tp_chat, EmpathyGroupChat *chat) { EmpathyGroupChatPriv *priv; - gchar *str; + gchar *str = NULL; priv = GET_PRIV (chat); - g_free (priv->topic); + g_object_get (priv->tp_chat, "subject", &str, NULL); + if (!empathy_strdiff (priv->topic, str)) { + g_free (str); + return; + } - g_object_get (priv->tp_chat, "subject", &priv->topic, NULL); + g_free (priv->topic); + priv->topic = str; gtk_label_set_text (GTK_LABEL (priv->label_topic), priv->topic); if (!G_STR_EMPTY (priv->topic)) { |