From 40d33622db46952e016cc8e540403cccb7ba6103 Mon Sep 17 00:00:00 2001 From: Patryk Zawadzki Date: Tue, 16 Jun 2009 15:37:08 +0200 Subject: Introduce empathy_contact_equal, adapt themes Fixed adium and boxes theme engines to check if contacts refer to the same id instead of comparing pointers. This fixes bug #585885. --- libempathy-gtk/empathy-theme-adium.c | 4 ++-- libempathy-gtk/empathy-theme-boxes.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 82384acd1..321d1998c 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -500,7 +500,8 @@ theme_adium_append_message (EmpathyChatView *view, } /* Get the right html/func to add the message */ - if (priv->last_contact == sender) { + func = "appendMessage"; + if (empathy_contact_equal (priv->last_contact, sender)) { func = "appendNextMessage"; if (empathy_contact_is_user (sender)) { html = priv->out_nextcontent_html; @@ -512,7 +513,6 @@ theme_adium_append_message (EmpathyChatView *view, } } if (!html) { - func = "appendMessage"; if (empathy_contact_is_user (sender)) { html = priv->out_content_html; len = priv->out_content_len; diff --git a/libempathy-gtk/empathy-theme-boxes.c b/libempathy-gtk/empathy-theme-boxes.c index 199132956..64d95d4f2 100644 --- a/libempathy-gtk/empathy-theme-boxes.c +++ b/libempathy-gtk/empathy-theme-boxes.c @@ -210,7 +210,7 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme, /* Only insert a header if the previously inserted block is not the same * as this one. */ - if (last_contact == contact) { + if (empathy_contact_equal (last_contact, contact)) { return; } -- cgit v1.2.3