From 086f0fc0375d06fa0c41cf921f883ed36fdb14d0 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 29 Nov 2010 16:23:19 +0100 Subject: theme_adium_parse_body: use the cache GSettings chat --- libempathy-gtk/empathy-theme-adium.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libempathy-gtk') 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, "