aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-09-21 22:30:48 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-21 22:30:48 +0800
commit5226e534df877dcb10b8f5cbb581764bb679593c (patch)
tree579e8eab62fb2faf65f60c14349736fbfda92a39
parent2f76eec65ede46b0b90972db6499b0dd65e5e2ee (diff)
downloadgsoc2013-evolution-5226e534df877dcb10b8f5cbb581764bb679593c.tar.gz
gsoc2013-evolution-5226e534df877dcb10b8f5cbb581764bb679593c.tar.zst
gsoc2013-evolution-5226e534df877dcb10b8f5cbb581764bb679593c.zip
Port e-memo-shell-view-actions.c to use GSettings
-rw-r--r--data/evolution.convert2
-rw-r--r--data/org.gnome.evolution.calendar.gschema.xml.in10
-rw-r--r--modules/calendar/e-memo-shell-view-actions.c14
3 files changed, 19 insertions, 7 deletions
diff --git a/data/evolution.convert b/data/evolution.convert
index bfea9dcc66..099b200f7e 100644
--- a/data/evolution.convert
+++ b/data/evolution.convert
@@ -46,9 +46,11 @@ hide-completed-tasks = /apps/evolution/calendar/tasks/hide_completed
hide-completed-tasks-units = /apps/evolution/calendar/tasks/hide_completed_units
hide-completed-tasks-value = /apps/evolution/calendar/tasks/hide_completed_value
last-notification-time = /apps/evolution/calendar/notify/last_notification_time
+memo-layout = /apps/evolution/calendar/display/memo_layout
month-scroll-by-week = /apps/evolution/calendar/display/month_scroll_by_week
notify-programs = /apps/evolution/calendar/notify/programs
notify-with-tray = /apps/evolution/calendar/notify/notify_with_tray
+show-memo-preview = /apps/evolution/calendar/display/show_memo_preview
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 70a13b94d2..df27b45f02 100644
--- a/data/org.gnome.evolution.calendar.gschema.xml.in
+++ b/data/org.gnome.evolution.calendar.gschema.xml.in
@@ -71,6 +71,11 @@
<_summary>Last reminder time</_summary>
<_description>Time the last reminder ran, in time_t</_description>
</key>
+ <key name="memo-layout" type="i">
+ <default>0</default>
+ <_summary>Memo layout style</_summary>
+ <_description>The layout style determines where to place the preview pane in relation to the memo list. "0" (Classic View) places the preview pane below the memo list. "1" (Vertical View) places the preview pane next to the memo list</_description>
+ </key>
<key name="month-scroll-by-week" type="b">
<default>true</default>
<_summary>Scroll Month View by a week</_summary>
@@ -86,6 +91,11 @@
<_summary>Show display reminders in notification tray</_summary>
<_description>Whether or not to use the notification tray for display reminders</_description>
</key>
+ <key name="show-memo-preview" type="b">
+ <default>true</default>
+ <_summary>Show the memo preview pane</_summary>
+ <_description>If "true", show the memo preview pane in the main window</_description>
+ </key>
<key name="timezone" type="s">
<default>'UTC'</default>
<_summary>Timezone</_summary>
diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c
index d71b893fe3..c7807291f3 100644
--- a/modules/calendar/e-memo-shell-view-actions.c
+++ b/modules/calendar/e-memo-shell-view-actions.c
@@ -863,7 +863,7 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
EPreviewPane *preview_pane;
EWebView *web_view;
GtkActionGroup *action_group;
- GConfBridge *bridge;
+ GSettings *memo_settings;
GtkAction *action;
GObject *object;
const gchar *key;
@@ -922,17 +922,17 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_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 ();
+ memo_settings = g_settings_new ("org.gnome.evolution.calendar");
object = G_OBJECT (ACTION (MEMO_PREVIEW));
- key = "/apps/evolution/calendar/display/show_memo_preview";
- gconf_bridge_bind_property (bridge, key, object, "active");
+ g_settings_bind (memo_settings, "show-memo-preview", object, "active");
object = G_OBJECT (ACTION (MEMO_VIEW_VERTICAL));
- key = "/apps/evolution/calendar/display/memo_layout";
- gconf_bridge_bind_property (bridge, key, object, "current-value");
+ g_settings_bind (memo_settings, "memo-layout", object, "current-value");
+
+ g_object_unref (G_OBJECT (memo_settings));
/* Fine tuning. */