diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-29 22:47:35 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-29 22:47:35 +0800 |
commit | b63808b139096d53264b90908efcc6e63b1c4170 (patch) | |
tree | bc0f9fdaaf9bb892578d5620b4c00eaf9886d531 /libempathy-gtk | |
parent | bcc2b4414470de50b757414471b52923d1849619 (diff) | |
download | gsoc2013-empathy-b63808b139096d53264b90908efcc6e63b1c4170.tar gsoc2013-empathy-b63808b139096d53264b90908efcc6e63b1c4170.tar.gz gsoc2013-empathy-b63808b139096d53264b90908efcc6e63b1c4170.tar.bz2 gsoc2013-empathy-b63808b139096d53264b90908efcc6e63b1c4170.tar.lz gsoc2013-empathy-b63808b139096d53264b90908efcc6e63b1c4170.tar.xz gsoc2013-empathy-b63808b139096d53264b90908efcc6e63b1c4170.tar.zst gsoc2013-empathy-b63808b139096d53264b90908efcc6e63b1c4170.zip |
chat-text-view: cache the chat GSettings
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-chat-text-view.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c index e5ff07f8e..5d5dcde46 100644 --- a/libempathy-gtk/empathy-chat-text-view.c +++ b/libempathy-gtk/empathy-chat-text-view.c @@ -69,6 +69,7 @@ typedef struct { gboolean allow_scrolling; guint notify_system_fonts_id; GSettings *gsettings_desktop; + GSettings *gsettings_chat; EmpathySmileyManager *smiley_manager; gboolean only_if_date; } EmpathyChatTextViewPriv; @@ -560,6 +561,7 @@ chat_text_view_finalize (GObject *object) DEBUG ("%p", object); + g_object_unref (priv->gsettings_chat); g_object_unref (priv->gsettings_desktop); if (priv->last_contact) { @@ -635,6 +637,8 @@ empathy_chat_text_view_init (EmpathyChatTextView *view) "cursor-visible", FALSE, NULL); + priv->gsettings_chat = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA); + priv->gsettings_desktop = g_settings_new ( EMPATHY_PREFS_DESKTOP_INTERFACE_SCHEMA); g_signal_connect (priv->gsettings_desktop, @@ -1407,11 +1411,9 @@ empathy_chat_text_view_append_body (EmpathyChatTextView *view, GtkTextIter start_iter; GtkTextIter iter; GtkTextMark *mark; - GSettings *gsettings_chat; /* Check if we have to parse smileys */ - gsettings_chat = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA); - use_smileys = g_settings_get_boolean (gsettings_chat, + use_smileys = g_settings_get_boolean (priv->gsettings_chat, EMPATHY_PREFS_CHAT_SHOW_SMILEYS); if (use_smileys) @@ -1438,8 +1440,6 @@ empathy_chat_text_view_append_body (EmpathyChatTextView *view, &iter); gtk_text_buffer_delete_mark (priv->buffer, mark); - - g_object_unref (gsettings_chat); } void |