aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-theme-adium.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-11-26 17:20:40 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-11-26 17:20:40 +0800
commit9ff14672ab605f20789a2db6f9f89673cf8f2c4b (patch)
tree19abe13769981d82500d44e7e88b1bb7de0c5ccc /libempathy-gtk/empathy-theme-adium.c
parent078aa4b28cbca7e5a77701fcbcaf0237e6e717ab (diff)
parent0b86e861b20e3c083baa04bb9e0fa2df31df8e8d (diff)
downloadgsoc2013-empathy-9ff14672ab605f20789a2db6f9f89673cf8f2c4b.tar
gsoc2013-empathy-9ff14672ab605f20789a2db6f9f89673cf8f2c4b.tar.gz
gsoc2013-empathy-9ff14672ab605f20789a2db6f9f89673cf8f2c4b.tar.bz2
gsoc2013-empathy-9ff14672ab605f20789a2db6f9f89673cf8f2c4b.tar.lz
gsoc2013-empathy-9ff14672ab605f20789a2db6f9f89673cf8f2c4b.tar.xz
gsoc2013-empathy-9ff14672ab605f20789a2db6f9f89673cf8f2c4b.tar.zst
gsoc2013-empathy-9ff14672ab605f20789a2db6f9f89673cf8f2c4b.zip
Merge branch 'adium-events'
Conflicts: libempathy-gtk/empathy-theme-adium.c
Diffstat (limited to 'libempathy-gtk/empathy-theme-adium.c')
-rw-r--r--libempathy-gtk/empathy-theme-adium.c48
1 files changed, 28 insertions, 20 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 1a14679d2..4e70fedb2 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -439,6 +439,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)
{
@@ -485,7 +507,8 @@ theme_adium_append_message (EmpathyChatView *view,
gchar *str;
str = g_strdup_printf ("%s %s", name, body_escaped);
- empathy_chat_view_append_event (view, str);
+ theme_adium_append_event_escaped (view, str);
+
g_free (str);
g_free (body_escaped);
return;
@@ -632,26 +655,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