diff options
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 921956e74..bdc5ea556 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -249,14 +249,16 @@ static EmpathyStringParser string_parsers_with_smiley[] = { }; static gchar * -theme_adium_parse_body (const gchar *text) +theme_adium_parse_body (EmpathyThemeAdium *self, + const gchar *text) { + EmpathyThemeAdiumPriv *priv = GET_PRIV (self); EmpathyStringParser *parsers; GString *string; - GSettings *gsettings = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA); /* Check if we have to parse smileys */ - if (g_settings_get_boolean (gsettings, EMPATHY_PREFS_CHAT_SHOW_SMILEYS)) + if (g_settings_get_boolean (priv->gsettings_chat, + EMPATHY_PREFS_CHAT_SHOW_SMILEYS)) parsers = string_parsers_with_smiley; else parsers = string_parsers; @@ -267,8 +269,6 @@ theme_adium_parse_body (const gchar *text) string = g_string_sized_new (strlen (text)); empathy_string_parser_substr (text, -1, parsers, string); - g_object_unref (gsettings); - /* Wrap body in order to make tabs and multiple spaces displayed * properly. See bug #625745. */ g_string_prepend (string, "<div style=\"display: inline; " @@ -469,7 +469,7 @@ theme_adium_append_message (EmpathyChatView *view, service_name = tp_account_get_protocol (account); timestamp = empathy_message_get_timestamp (msg); body = empathy_message_get_body (msg); - body_escaped = theme_adium_parse_body (body); + body_escaped = theme_adium_parse_body (theme, body); name = empathy_contact_get_alias (sender); contact_id = empathy_contact_get_id (sender); |