[empathy: 1/2] Fix Bug 585601: Adium theme is not reloaded on /clear or Ctrl+L or clear menu item
- From: Gustavo Noronha Silva <gns src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy: 1/2] Fix Bug 585601: Adium theme is not reloaded on /clear or Ctrl+L or clear menu item
- Date: Thu, 2 Jul 2009 14:15:42 +0000 (UTC)
commit f923e5ed0d36621b580061dbaff834ec7e7ee0bc
Author: Gustavo Noronha Silva <gustavo noronha collabora co uk>
Date: Wed Jul 1 10:08:48 2009 -0300
Fix Bug 585601: Adium theme is not reloaded on /clear or Ctrl+L or clear menu item
The theme was deciding that new messages should be 'joined' to an
already existing message bubble, because not enough time had passed,
even after clearing the chat area. We now clear last_contact to make
sure this never happens.
libempathy-gtk/empathy-chat-text-view.c | 4 ++++
libempathy-gtk/empathy-theme-adium.c | 7 +++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index c47b547..bdf6633 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -817,6 +817,10 @@ chat_text_view_clear (EmpathyChatView *view)
priv = GET_PRIV (view);
priv->last_timestamp = 0;
+ if (priv->last_contact) {
+ g_object_unref (priv->last_contact);
+ priv->last_contact = NULL;
+ }
}
static gboolean
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index b16a3e7..40ae291 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -564,6 +564,13 @@ theme_adium_clear (EmpathyChatView *view)
priv->data->template_html,
basedir_uri);
g_free (basedir_uri);
+
+ /* Clear last contact to avoid trying to add a 'joined'
+ * message when we don't have an insertion point. */
+ if (priv->last_contact) {
+ g_object_unref (priv->last_contact);
+ priv->last_contact = NULL;
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]