[evolution/wip/gsettings] Port calendar sidebar to use GSettings



commit 67c036a33910d51e2703bb86840fd8729decf4b1
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed Sep 21 16:36:08 2011 +0200

    Port calendar sidebar to use GSettings

 data/evolution.convert                           |    1 +
 data/org.gnome.evolution.calendar.gschema.xml.in |    5 +++++
 modules/calendar/e-cal-shell-sidebar.c           |   12 ++++++------
 3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/data/evolution.convert b/data/evolution.convert
index 099b200..657d743 100644
--- a/data/evolution.convert
+++ b/data/evolution.convert
@@ -33,6 +33,7 @@ show-preview = /apps/evolution/addressbook/display/show_preview
 
 [org.gnome.evolution.calendar]
 audio-dir = /apps/evolution/calendar/audio_dir
+date-navigator-pane-position = /apps/evolution/calendar/display/date_navigator_pane_position
 day-second-zone = /apps/evolution/calendar/display/day_second_zone
 day-second-zones = /apps/evolution/calendar/display/day_second_zones
 day-second-zones-max = /apps/evolution/calendar/display/day_second_zones_max
diff --git a/data/org.gnome.evolution.calendar.gschema.xml.in b/data/org.gnome.evolution.calendar.gschema.xml.in
index df27b45..39285fc 100644
--- a/data/org.gnome.evolution.calendar.gschema.xml.in
+++ b/data/org.gnome.evolution.calendar.gschema.xml.in
@@ -6,6 +6,11 @@
     <_summary>Save directory for reminder audio</_summary>
     <_description>Directory for saving reminder audio files</_description>
   </key>
+  <key name="date-navigator-pane-position" type="i">
+    <default>150</default>
+    <_summary>Month view vertical pane position</_summary>
+    <_description>Position of the vertical pane, between the calendar lists and the date navigator calendar</_description>
+  </key>
   <key name="day-second-zone" type="s">
     <default>''</default>
     <_summary>The second timezone for a Day View</_summary>
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 77c5639..ac93263 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -30,7 +30,6 @@
 #include <libedataserverui/e-client-utils.h>
 
 #include "e-util/e-alert-dialog.h"
-#include "e-util/gconf-bridge.h"
 #include "widgets/misc/e-paned.h"
 
 #include "calendar/gui/e-calendar-selector.h"
@@ -523,7 +522,7 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
 	ESourceSelector *selector;
 	ESourceList *source_list;
 	ESource *source;
-	GConfBridge *bridge;
+	GSettings *settings;
 	GtkTreeModel *model;
 	GSList *list, *iter;
 	GObject *object;
@@ -585,13 +584,14 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
 		G_CALLBACK (cal_shell_sidebar_selection_changed_cb),
 		shell_sidebar);
 
-	/* 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/date_navigator_pane_position";
-	gconf_bridge_bind_property_delayed (bridge, key, object, "vposition");
+	g_settings_bind (settings, "date-navigator-pane-position", object, "vposition");
+
+	g_object_unref (G_OBJECT (settings));
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]