aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gustavo.noronha@collabora.co.uk>2009-07-01 21:08:48 +0800
committerGustavo Noronha Silva <gustavo.noronha@collabora.co.uk>2009-07-01 22:08:50 +0800
commitf923e5ed0d36621b580061dbaff834ec7e7ee0bc (patch)
treecb7c7ccd174f9eeff30765c16685426244ead610
parenta980a2b3eaa634981b0ebfe950f50b515e43cf4a (diff)
downloadgsoc2013-empathy-f923e5ed0d36621b580061dbaff834ec7e7ee0bc.tar
gsoc2013-empathy-f923e5ed0d36621b580061dbaff834ec7e7ee0bc.tar.gz
gsoc2013-empathy-f923e5ed0d36621b580061dbaff834ec7e7ee0bc.tar.bz2
gsoc2013-empathy-f923e5ed0d36621b580061dbaff834ec7e7ee0bc.tar.lz
gsoc2013-empathy-f923e5ed0d36621b580061dbaff834ec7e7ee0bc.tar.xz
gsoc2013-empathy-f923e5ed0d36621b580061dbaff834ec7e7ee0bc.tar.zst
gsoc2013-empathy-f923e5ed0d36621b580061dbaff834ec7e7ee0bc.zip
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.
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c4
-rw-r--r--libempathy-gtk/empathy-theme-adium.c7
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 c47b5474f..bdf66333e 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 b16a3e7c9..40ae291bf 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