aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-29 22:36:59 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-29 22:36:59 +0800
commitadda65622351cabb18517bef5ca853890e9829af (patch)
treec179ebdeddef95e5d41391484bdc47f2f9282fdf /src
parent87b4a33dd408c9d5fe33d9261b6185e1833696d5 (diff)
downloadgsoc2013-empathy-adda65622351cabb18517bef5ca853890e9829af.tar
gsoc2013-empathy-adda65622351cabb18517bef5ca853890e9829af.tar.gz
gsoc2013-empathy-adda65622351cabb18517bef5ca853890e9829af.tar.bz2
gsoc2013-empathy-adda65622351cabb18517bef5ca853890e9829af.tar.lz
gsoc2013-empathy-adda65622351cabb18517bef5ca853890e9829af.tar.xz
gsoc2013-empathy-adda65622351cabb18517bef5ca853890e9829af.tar.zst
gsoc2013-empathy-adda65622351cabb18517bef5ca853890e9829af.zip
chat-window: cache the notifications GSettings
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 4aba2af2d..7698d26f4 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -113,6 +113,7 @@ typedef struct {
guint32 x_user_action_time;
GSettings *gsettings_chat;
+ GSettings *gsettings_notif;
} EmpathyChatWindowPriv;
static GList *chat_windows = NULL;
@@ -1285,14 +1286,9 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
if (!empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
return;
} else {
- GSettings *gsettings = g_settings_new (
- EMPATHY_PREFS_NOTIFICATIONS_SCHEMA);
-
- res = g_settings_get_boolean (gsettings,
+ res = g_settings_get_boolean (priv->gsettings_notif,
EMPATHY_PREFS_NOTIFICATIONS_FOCUS);
- g_object_unref (gsettings);
-
if (!res) {
return;
}
@@ -1874,6 +1870,7 @@ chat_window_finalize (GObject *object)
g_object_unref (priv->chatroom_manager);
g_object_unref (priv->notify_mgr);
g_object_unref (priv->gsettings_chat);
+ g_object_unref (priv->gsettings_notif);
if (priv->notification != NULL) {
notify_notification_close (priv->notification, NULL);
@@ -1985,6 +1982,7 @@ empathy_chat_window_init (EmpathyChatWindow *window)
g_object_unref (gui);
priv->gsettings_chat = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA);
+ priv->gsettings_notif = g_settings_new (EMPATHY_PREFS_NOTIFICATIONS_SCHEMA);
priv->chatroom_manager = empathy_chatroom_manager_dup_singleton (NULL);
priv->notebook = gtk_notebook_new ();