aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-29 23:23:19 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-29 23:23:19 +0800
commit086f0fc0375d06fa0c41cf921f883ed36fdb14d0 (patch)
tree2655d5f3d23b380870ccc175cb90fe3c40110432
parentd6b43c2ff67d2d90bf577990fb67917a01e38807 (diff)
downloadgsoc2013-empathy-086f0fc0375d06fa0c41cf921f883ed36fdb14d0.tar
gsoc2013-empathy-086f0fc0375d06fa0c41cf921f883ed36fdb14d0.tar.gz
gsoc2013-empathy-086f0fc0375d06fa0c41cf921f883ed36fdb14d0.tar.bz2
gsoc2013-empathy-086f0fc0375d06fa0c41cf921f883ed36fdb14d0.tar.lz
gsoc2013-empathy-086f0fc0375d06fa0c41cf921f883ed36fdb14d0.tar.xz
gsoc2013-empathy-086f0fc0375d06fa0c41cf921f883ed36fdb14d0.tar.zst
gsoc2013-empathy-086f0fc0375d06fa0c41cf921f883ed36fdb14d0.zip
theme_adium_parse_body: use the cache GSettings chat
-rw-r--r--libempathy-gtk/empathy-theme-adium.c12
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);