From 8732431bd961e7f75e813803575a868bada78c79 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 21 Sep 2011 18:16:23 +0200 Subject: Port ETask/MemoShellContent to GSettings --- modules/calendar/e-memo-shell-content.c | 14 +++++--------- modules/calendar/e-task-shell-content.c | 15 +++++++-------- 2 files changed, 12 insertions(+), 17 deletions(-) (limited to 'modules/calendar') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index f0f4fe958f..60936ccb8c 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -28,7 +28,6 @@ #include #include "e-util/e-selection.h" -#include "e-util/gconf-bridge.h" #include "shell/e-shell-utils.h" #include "widgets/menus/gal-view-etable.h" #include "widgets/misc/e-paned.h" @@ -273,23 +272,20 @@ memo_shell_content_restore_state_cb (EShellWindow *shell_window, EShellContent *shell_content) { EMemoShellContentPrivate *priv; - GConfBridge *bridge; + GSettings *settings; GObject *object; - const gchar *key; priv = E_MEMO_SHELL_CONTENT (shell_content)->priv; - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to settings keys. */ - bridge = gconf_bridge_get (); + settings = g_settings_new ("org.gnome.evolution.calendar"); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/memo_hpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "hposition"); + g_settings_bind (settings, "memo-hpane-position", object, "hposition", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/memo_vpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "vposition"); + g_settings_bind (settings, "memo-vpane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT); } static GtkOrientation diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 743bb937e7..80e9239706 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -271,23 +271,22 @@ task_shell_content_restore_state_cb (EShellWindow *shell_window, EShellContent *shell_content) { ETaskShellContentPrivate *priv; - GConfBridge *bridge; + GSettings *settings; GObject *object; - const gchar *key; priv = E_TASK_SHELL_CONTENT (shell_content)->priv; - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to settings keys. */ - bridge = gconf_bridge_get (); + settings = g_settings_new ("org.gnome.evolution.calendar"); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/task_hpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "hposition"); + g_settings_bind (settings, "task-hpane-position", object, "hposition", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/task_vpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "vposition"); + g_settings_bind (settings, "task-vpane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT); + + g_object_unref (G_OBJECT (settings)); } static GtkOrientation -- cgit v1.2.3