diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-29 22:40:11 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-29 22:42:16 +0800 |
commit | 8a9a8bc51095f76e502293b463de676a1f6bc517 (patch) | |
tree | b058126670ed83b43758e282eda28aa7355d6bf6 /src/empathy-chat-window.c | |
parent | adda65622351cabb18517bef5ca853890e9829af (diff) | |
download | gsoc2013-empathy-8a9a8bc51095f76e502293b463de676a1f6bc517.tar gsoc2013-empathy-8a9a8bc51095f76e502293b463de676a1f6bc517.tar.gz gsoc2013-empathy-8a9a8bc51095f76e502293b463de676a1f6bc517.tar.bz2 gsoc2013-empathy-8a9a8bc51095f76e502293b463de676a1f6bc517.tar.lz gsoc2013-empathy-8a9a8bc51095f76e502293b463de676a1f6bc517.tar.xz gsoc2013-empathy-8a9a8bc51095f76e502293b463de676a1f6bc517.tar.zst gsoc2013-empathy-8a9a8bc51095f76e502293b463de676a1f6bc517.zip |
chat-window: cache the UI GSettings
Diffstat (limited to 'src/empathy-chat-window.c')
-rw-r--r-- | src/empathy-chat-window.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 7698d26f4..6616a18d7 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -114,6 +114,7 @@ typedef struct { GSettings *gsettings_chat; GSettings *gsettings_notif; + GSettings *gsettings_ui; } EmpathyChatWindowPriv; static GList *chat_windows = NULL; @@ -1871,6 +1872,7 @@ chat_window_finalize (GObject *object) g_object_unref (priv->notify_mgr); g_object_unref (priv->gsettings_chat); g_object_unref (priv->gsettings_notif); + g_object_unref (priv->gsettings_ui); if (priv->notification != NULL) { notify_notification_close (priv->notification, NULL); @@ -1983,6 +1985,7 @@ empathy_chat_window_init (EmpathyChatWindow *window) priv->gsettings_chat = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA); priv->gsettings_notif = g_settings_new (EMPATHY_PREFS_NOTIFICATIONS_SCHEMA); + priv->gsettings_ui = g_settings_new (EMPATHY_PREFS_UI_SCHEMA); priv->chatroom_manager = empathy_chatroom_manager_dup_singleton (NULL); priv->notebook = gtk_notebook_new (); @@ -2180,15 +2183,12 @@ empathy_chat_window_add_chat (EmpathyChatWindow *window, /* If this window has just been created, position it */ if (priv->chats == NULL) { - GSettings *gsettings = g_settings_new (EMPATHY_PREFS_UI_SCHEMA); const gchar *name = "chat-window"; gboolean separate_windows; - separate_windows = g_settings_get_boolean (gsettings, + separate_windows = g_settings_get_boolean (priv->gsettings_ui, EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS); - g_object_unref (gsettings); - if (empathy_chat_is_room (chat)) name = "room-window"; |