From 6e7cb87f8783dfca7af2ec40b669344adf77f79f Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 21 Sep 2011 17:21:35 +0200 Subject: 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 f2289ed14a..823125288a 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 48fa505e06..534ec5f99c 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 <_description>If "true", show the memo preview pane in the main window + + true + <_summary>Show the task preview pane + <_description>If "true", show the task preview pane in the main window + + + 0 + <_summary>Task layout style + <_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 + 'UTC' <_summary>Timezone diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index 2fe28494ac..beb81730c3 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. */ -- cgit v1.2.3