aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-theme-adium.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-11-25 01:25:22 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-11-25 01:31:27 +0800
commit0b86e861b20e3c083baa04bb9e0fa2df31df8e8d (patch)
tree30047f1344d412f1ad7a2598bf262b7221a58092 /libempathy-gtk/empathy-theme-adium.c
parent783fe36cb4d096a9ed17078e8ddc36b3542b638b (diff)
downloadgsoc2013-empathy-0b86e861b20e3c083baa04bb9e0fa2df31df8e8d.tar
gsoc2013-empathy-0b86e861b20e3c083baa04bb9e0fa2df31df8e8d.tar.gz
gsoc2013-empathy-0b86e861b20e3c083baa04bb9e0fa2df31df8e8d.tar.bz2
gsoc2013-empathy-0b86e861b20e3c083baa04bb9e0fa2df31df8e8d.tar.lz
gsoc2013-empathy-0b86e861b20e3c083baa04bb9e0fa2df31df8e8d.tar.xz
gsoc2013-empathy-0b86e861b20e3c083baa04bb9e0fa2df31df8e8d.tar.zst
gsoc2013-empathy-0b86e861b20e3c083baa04bb9e0fa2df31df8e8d.zip
Do not escape twice /me messages with adium theme.
Diffstat (limited to 'libempathy-gtk/empathy-theme-adium.c')
-rw-r--r--libempathy-gtk/empathy-theme-adium.c47
1 files changed, 27 insertions, 20 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index a41cbd6c0..c1365579b 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -435,6 +435,28 @@ theme_adium_append_html (EmpathyThemeAdium *theme,
}
static void
+theme_adium_append_event_escaped (EmpathyChatView *view,
+ const gchar *escaped)
+{
+ EmpathyThemeAdium *theme = EMPATHY_THEME_ADIUM (view);
+ EmpathyThemeAdiumPriv *priv = GET_PRIV (theme);
+
+ if (priv->data->status_html) {
+ theme_adium_append_html (theme, "appendMessage",
+ priv->data->status_html,
+ priv->data->status_len,
+ escaped, NULL, NULL, NULL, NULL,
+ "event", empathy_time_get_current ());
+ }
+
+ /* There is no last contact */
+ if (priv->last_contact) {
+ g_object_unref (priv->last_contact);
+ priv->last_contact = NULL;
+ }
+}
+
+static void
theme_adium_append_message (EmpathyChatView *view,
EmpathyMessage *msg)
{
@@ -484,7 +506,7 @@ theme_adium_append_message (EmpathyChatView *view,
gchar *str;
str = g_strdup_printf ("%s %s", name, body);
- empathy_chat_view_append_event (view, str);
+ theme_adium_append_event_escaped (view, str);
g_free (str);
g_free (dup_body);
return;
@@ -631,26 +653,11 @@ static void
theme_adium_append_event (EmpathyChatView *view,
const gchar *str)
{
- EmpathyThemeAdium *theme = EMPATHY_THEME_ADIUM (view);
- EmpathyThemeAdiumPriv *priv = GET_PRIV (theme);
+ gchar *str_escaped;
- if (priv->data->status_html) {
- gchar *str_escaped;
-
- str_escaped = g_markup_escape_text (str, -1);
- theme_adium_append_html (theme, "appendMessage",
- priv->data->status_html,
- priv->data->status_len,
- str_escaped, NULL, NULL, NULL, NULL,
- "event", empathy_time_get_current ());
- g_free (str_escaped);
- }
-
- /* There is no last contact */
- if (priv->last_contact) {
- g_object_unref (priv->last_contact);
- priv->last_contact = NULL;
- }
+ str_escaped = g_markup_escape_text (str, -1);
+ theme_adium_append_event_escaped (view, str_escaped);
+ g_free (str_escaped);
}
static void