aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-11-26 17:18:31 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-11-26 17:18:31 +0800
commit078aa4b28cbca7e5a77701fcbcaf0237e6e717ab (patch)
tree5fd9ac4497bdfdbb07278cd3a0f37e7a2b537dee
parent02ca446606c2c9f2673188b811891dd107c21e19 (diff)
downloadgsoc2013-empathy-078aa4b28cbca7e5a77701fcbcaf0237e6e717ab.tar
gsoc2013-empathy-078aa4b28cbca7e5a77701fcbcaf0237e6e717ab.tar.gz
gsoc2013-empathy-078aa4b28cbca7e5a77701fcbcaf0237e6e717ab.tar.bz2
gsoc2013-empathy-078aa4b28cbca7e5a77701fcbcaf0237e6e717ab.tar.lz
gsoc2013-empathy-078aa4b28cbca7e5a77701fcbcaf0237e6e717ab.tar.xz
gsoc2013-empathy-078aa4b28cbca7e5a77701fcbcaf0237e6e717ab.tar.zst
gsoc2013-empathy-078aa4b28cbca7e5a77701fcbcaf0237e6e717ab.zip
Clean how we insert smileys in adium themes
-rw-r--r--libempathy-gtk/empathy-theme-adium.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index f1979a6c7..1a14679d2 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -244,8 +244,6 @@ theme_adium_replace_link (const gchar *text,
g_free (escaped);
}
-static gboolean use_smileys = FALSE;
-
static void
theme_adium_replace_smiley (const gchar *text,
gssize len,
@@ -255,17 +253,10 @@ theme_adium_replace_smiley (const gchar *text,
EmpathySmileyHit *hit = match_data;
GString *string = user_data;
- if (use_smileys) {
- /* Replace smileys by a <img/> tag */
- g_string_append (string, "<abbr title=\"");
- g_string_append_len (string, text, len);
- g_string_append_printf (string, "\"><img src=\"%s\" alt=\"",
- hit->path);
- g_string_append_len (string, text, len);
- g_string_append (string, "\"/></abbr>");
- } else {
- g_string_append_len (string, text, len);
- }
+ /* Replace smiley by a <img/> tag */
+ g_string_append_printf (string,
+ "<img src=\"%s\" alt=\"%.*s\" title=\"%.*s\"/>",
+ hit->path, len, text, len, text);
}
static void
@@ -302,6 +293,7 @@ theme_adium_parse_body (const gchar *text)
{
EmpathyStringParser *parsers;
GString *string;
+ gboolean use_smileys;
/* Check if we have to parse smileys */
empathy_conf_get_bool (empathy_conf_get (),