[empathy: 1/2] Do not escape twice /me messages with adium theme.
- From: Xavier Claessens <xclaesse src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy: 1/2] Do not escape twice /me messages with adium theme.
- Date: Thu, 26 Nov 2009 09:38:36 +0000 (UTC)
commit 0b86e861b20e3c083baa04bb9e0fa2df31df8e8d
Author: Xavier Claessens <xclaesse gmail com>
Date: Tue Nov 24 18:25:22 2009 +0100
Do not escape twice /me messages with adium theme.
libempathy-gtk/empathy-theme-adium.c | 47 +++++++++++++++++++--------------
1 files changed, 27 insertions(+), 20 deletions(-)
---
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index a41cbd6..c136557 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]