[evolution/wip/gsettings] Port e-task-shell-view-actions to GSettings



commit 6e7cb87f8783dfca7af2ec40b669344adf77f79f
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed Sep 21 17:21:35 2011 +0200

    Port e-task-shell-view-actions to GSettings

 data/evolution.convert                           |    2 ++
 data/org.gnome.evolution.calendar.gschema.xml.in |   10 ++++++++++
 modules/calendar/e-task-shell-view-actions.c     |   14 +++++++-------
 3 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/data/evolution.convert b/data/evolution.convert
index f2289ed..8231252 100644
--- a/data/evolution.convert
+++ b/data/evolution.convert
@@ -54,6 +54,8 @@ notify-with-tray = /apps/evolution/calendar/notify/notify_with_tray
 selected-calendars = /apps/evolution/calendar/display/selected_calendars
 selected-memos = /apps/evolution/calendar/memos/selected_memos
 show-memo-preview = /apps/evolution/calendar/display/show_memo_preview
+show-task-preview = /apps/evolution/calendar/display/show_task_preview
+task-layout = /apps/evolution/calendar/display/task_layout
 timezone = /apps/evolution/calendar/display/timezone
 use-24hour-format = /apps/evolution/calendar/display/use_24hour_format
 use-system-timezone = /apps/evolution/calendar/display/use_system_timezone
diff --git a/data/org.gnome.evolution.calendar.gschema.xml.in b/data/org.gnome.evolution.calendar.gschema.xml.in
index 48fa505..534ec5f 100644
--- a/data/org.gnome.evolution.calendar.gschema.xml.in
+++ b/data/org.gnome.evolution.calendar.gschema.xml.in
@@ -111,6 +111,16 @@
     <_summary>Show the memo preview pane</_summary>
     <_description>If "true", show the memo preview pane in the main window</_description>
   </key>
+  <key name="show-task-preview" type="b">
+    <default>true</default>
+    <_summary>Show the task preview pane</_summary>
+    <_description>If "true", show the task preview pane in the main window</_description>
+  </key>
+  <key name="task-layout" type="i">
+    <default>0</default>
+    <_summary>Task layout style</_summary>
+    <_description>The layout style determines where to place the preview pane in relation to the task list.  "0" (Classic View) places the preview pane below the task list.  "1" (Vertical View) places the preview pane next to the task list</_description>
+  </key>
   <key name="timezone" type="s">
     <default>'UTC'</default>
     <_summary>Timezone</_summary>
diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c
index 2fe2849..beb8173 100644
--- a/modules/calendar/e-task-shell-view-actions.c
+++ b/modules/calendar/e-task-shell-view-actions.c
@@ -1062,7 +1062,7 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
 	EPreviewPane *preview_pane;
 	EWebView *web_view;
 	GtkActionGroup *action_group;
-	GConfBridge *bridge;
+	GSettings *settings;
 	GtkAction *action;
 	GObject *object;
 	const gchar *key;
@@ -1121,17 +1121,17 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
 		action_group, lockdown_save_to_disk_popup_entries,
 		G_N_ELEMENTS (lockdown_save_to_disk_popup_entries));
 
-	/* 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 (ACTION (TASK_PREVIEW));
-	key = "/apps/evolution/calendar/display/show_task_preview";
-	gconf_bridge_bind_property (bridge, key, object, "active");
+	g_settings_bind (settings, "show-task-preview", object, "active");
 
 	object = G_OBJECT (ACTION (TASK_VIEW_VERTICAL));
-	key = "/apps/evolution/calendar/display/task_layout";
-	gconf_bridge_bind_property (bridge, key, object, "current-value");
+	g_settings_bind (settings, "task-layout", "current-value");
+
+	g_object_unref (G_OBJECT (settings));
 
 	/* Fine tuning. */
 



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