aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-11-15 00:19:25 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-11-15 00:19:25 +0800
commit55ed27cd2f509453c9928a21a75871a5fe59fb9f (patch)
tree461d79e408ee195b8a144b0e2acc2f0f88044cc7
parent7ab5ae3fc72516cceeb09a48bc5a39f7b57933de (diff)
downloadgsoc2013-evolution-55ed27cd2f509453c9928a21a75871a5fe59fb9f.tar
gsoc2013-evolution-55ed27cd2f509453c9928a21a75871a5fe59fb9f.tar.gz
gsoc2013-evolution-55ed27cd2f509453c9928a21a75871a5fe59fb9f.tar.bz2
gsoc2013-evolution-55ed27cd2f509453c9928a21a75871a5fe59fb9f.tar.lz
gsoc2013-evolution-55ed27cd2f509453c9928a21a75871a5fe59fb9f.tar.xz
gsoc2013-evolution-55ed27cd2f509453c9928a21a75871a5fe59fb9f.tar.zst
gsoc2013-evolution-55ed27cd2f509453c9928a21a75871a5fe59fb9f.zip
Migrate EShellSettings to GSettings
-rw-r--r--data/evolution.convert35
-rw-r--r--data/org.gnome.evolution.calendar.gschema.xml.in135
-rw-r--r--data/org.gnome.evolution.mail.gschema.xml.in30
-rw-r--r--modules/addressbook/e-book-shell-settings.c11
-rw-r--r--modules/calendar/e-cal-shell-settings.c108
-rw-r--r--modules/mail/e-mail-shell-settings.c173
-rw-r--r--modules/mailto-handler/evolution-mailto-handler.c3
-rw-r--r--shell/e-shell-settings.c217
-rw-r--r--shell/e-shell-settings.h3
-rw-r--r--shell/e-shell.c3
10 files changed, 493 insertions, 225 deletions
diff --git a/data/evolution.convert b/data/evolution.convert
index 6946b0eab3..ecb5236406 100644
--- a/data/evolution.convert
+++ b/data/evolution.convert
@@ -37,10 +37,21 @@ vpane-position = /apps/evolution/addressbook/display/vpane_position
[org.gnome.evolution.calendar]
audio-dir = /apps/evolution/calendar/audio_dir
+ba-reminder-interval = /apps/evolution/calendar/other/ba_reminder_interval
+ba-reminder-units = /apps/evolution/calendar/other/ba_reminder_units
+compress-weekend = /apps/evolution/calendar/display/compress_weekend
+confirm-delete = /apps/evolution/calendar/prompts/confirm_delete
+confirm-purge = /apps/evolution/calendar/prompts/confirm_purge
date-navigator-pane-position = /apps/evolution/calendar/display/date_navigator_pane_position
+day-end-hour = /apps/evolution/calendar/display/day_end_hour
+day-end-minute = /apps/evolution/calendar/display/day_end_minute
+day-start-hour = /apps/evolution/calendar/display/day_start_hour
+day-start-minute = /apps/evolution/calendar/display/day_start_minute
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
+default-reminder-interval = /apps/evolution/calendar/other/default_reminder_interval
+default-reminder-units = /apps/evolution/calendar/other/default_reminder_units
editor-show-categories = /apps/evolution/calendar/display/show_categories
editor-show-role = /apps/evolution/calendar/display/show_role
editor-show-rsvp = /apps/evolution/calendar/display/show_rsvp
@@ -52,6 +63,9 @@ hide-completed-tasks-units = /apps/evolution/calendar/tasks/hide_completed_units
hide-completed-tasks-value = /apps/evolution/calendar/tasks/hide_completed_value
hpane-position = /apps/evolution/calendar/display/hpane_position
last-notification-time = /apps/evolution/calendar/notify/last_notification_time
+marcus-bains-color-dayview = /apps/evolution/calendar/display/marcus_bains_color_dayview
+marcus-bains-color-timebar = /apps/evolution/calendar/display/marcus_bains_color_timebar
+marcus-bains-line = /apps/evolution/calendar/display/marcus_bains_line
memo-hpane-position = /apps/evolution/calendar/display/memo_hpane_position
memo-layout = /apps/evolution/calendar/display/memo_layout
memo-vpane-position = /apps/evolution/calendar/display/memo_vpane_position
@@ -59,18 +73,31 @@ month-hpane-position = /apps/evolution/calendar/display/month_hpane_position
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
+primary-calendar = /apps/evolution/calendar/display/primary_calendar
+primary-memos = /apps/evolution/calendar/memos/primary_memos
+primary-tasks = /apps/evolution/calendar/tasks/primary_tasks
+publish-template = /apps/evolution/calendar/publish/template
+recur-events-italic = /apps/evolution/calendar/display/recur_events_italic
selected-calendars = /apps/evolution/calendar/display/selected_calendars
selected-memos = /apps/evolution/calendar/memos/selected_memos
selected-tasks = /apps/evolution/calendar/tasks/selected_tasks
+show-event-end = /apps/evolution/calendar/display/show_event_end
show-memo-preview = /apps/evolution/calendar/display/show_memo_preview
show-task-preview = /apps/evolution/calendar/display/show_task_preview
+show-week-numbers = /apps/evolution/calendar/display/show_week_numbers
tag-vpane-position = /apps/evolution/calendar/display/tag_vpane_position
+task-due-today-color = /apps/evolution/calendar/tasks/colors/due_today
task-hpane-position = /apps/evolution/calendar/display/task_hpane_position
task-vpane-position = /apps/evolution/calendar/display/task_vpane_position
task-layout = /apps/evolution/calendar/display/task_layout
+task-overdue-color = /apps/evolution/calendar/tasks/colors/overdue
+time-divisions = /apps/evolution/calendar/display/time_divisions
timezone = /apps/evolution/calendar/display/timezone
use-24hour-format = /apps/evolution/calendar/display/use_24hour_format
+use-ba-reminder = /apps/evolution/calendar/other/use_ba_reminder
+use-default-reminder = /apps/evolution/calendar/other/use_default_reminder
use-system-timezone = /apps/evolution/calendar/display/use_system_timezone
+week-start-day = /apps/evolution/calendar/display/week_start_day
working-days = /apps/evolution/calendar/display/working_days
[org.gnome.evolution.importer]
@@ -86,6 +113,7 @@ charset = /apps/evolution/mail/display/charset
citation-colour = /apps/evolution/mail/display/citation_colour
composer-charset = /apps/evolution/mail/composer/charset
composer-current-folder = /apps/evolution/mail/composer/current_folder
+composer-gallery-path = /apps/evolution/mail/composer/gallery_path
composer-group-reply-to-list = /apps/evolution/mail/composer/group_reply_to_list
composer-height = /apps/evolution/mail/composer/height
composer-ignore-list-reply-to = /apps/evolution/mail/composer/ignore_list_reply_to
@@ -96,6 +124,7 @@ composer-message-attribution = /apps/evolution/mail/composer/message_attribution
composer-message-forward = /apps/evolution/mail/composer/message_forward
composer-message-original = /apps/evolution/mail/composer/message_original
composer-no-signature-delim = /apps/evolution/mail/composer/no_signature_delim
+composer-outlook-filenames = /apps/evolution/mail/composer/outlook_filenames
composer-reply-start-bottom = /apps/evolution/mail/composer/reply_start_bottom
composer-request-receipt = /apps/evolution/mail/composer/request_receipt
composer-send-html = /apps/evolution/mail/composer/send_html
@@ -106,10 +135,10 @@ composer-show-cc = /apps/evolution/mail/composer/show_mail_cc
composer-show-reply-to = /apps/evolution/mail/composer/show_mail_reply_to
composer-show-post-from = /apps/evolution/mail/composer/show_post_from
composer-show-post-reply-to = /apps/evolution/mail/composer/show_post_reply_to
-composer-outlook-filenames = /apps/evolution/mail/composer/outlook_filenames
composer-top-signature = /apps/evolution/mail/composer/top_signature
composer-width = /apps/evolution/mail/composer/width
default-account = /apps/evolution/mail/default_account
+enable-local = /apps/evolution/mail/display/enable_local
enable-vfolders = /apps/evolution/mail/display/enable_vfolders
error-level = /apps/evolution/mail/display/error_level
error-timeout = /apps/evolution/mail/display/error_timeout
@@ -154,6 +183,7 @@ mime-types = /apps/evolution/mail/display/mime_types
monospace-font = /apps/evolution/mail/display/fonts/monospace
no-folder-dots = /apps/evolution/mail/display/no_folder_dots
paned-size = /apps/evolution/mail/display/paned_size
+paned-view-headers-state = /apps/evolution/mail/display/paned_view_headers_state
photo-local = /apps/evolution/mail/display/photo_local
prompt-check-if-default-mailer = /apps/evolution/mail/prompts/checkdefault
prompt-on-delete-in-vfolder = /apps/evolution/mail/prompts/delete_in_vfolder
@@ -174,6 +204,8 @@ save-dir = /apps/evolution/mail/save_dir
safe-list = /apps/evolution/mail/display/safe_list
send-recv-height = /apps/evolution/mail/send_recv_height
send-recv-maximized = /apps/evolution/mail/send_recv_maximized
+send-recv-on-start = /apps/evolution/mail/send_recv_on_start
+send-recv-all-on-start = /apps/evolution/mail/send_recv_all_on_start
send-recv-width = /apps/evolution/mail/send_recv_width
show-all-headers = /apps/evolution/mail/display/show_all_headers
show-animated-images = /apps/evolution/mail/display/animated_images
@@ -182,6 +214,7 @@ show-email = /apps/evolution/mail/display/show_email
show-real-date = /apps/evolution/mail/display/show_real_date
show-sender-photo = /apps/evolution/mail/display/sender_photo
side-bar-search = /apps/evolution/mail/display/side_bar_search
+sort-accounts-alpha = /apps/evolution/mail/display/sort_accounts_alpha
subscription-editor-height = /apps/evolution/mail/subscription_editor_height
subscription-editor-maximized = /apps/evolution/mail/subscription_editor_maximized
subscription-editor-width = /apps/evolution/mail/subscription_editor_width
diff --git a/data/org.gnome.evolution.calendar.gschema.xml.in b/data/org.gnome.evolution.calendar.gschema.xml.in
index cc32a3c36d..6217ce22d2 100644
--- a/data/org.gnome.evolution.calendar.gschema.xml.in
+++ b/data/org.gnome.evolution.calendar.gschema.xml.in
@@ -5,11 +5,56 @@
<_summary>Save directory for reminder audio</_summary>
<_description>Directory for saving reminder audio files</_description>
</key>
+ <key name="ba-reminder-interval" type="i">
+ <default>15</default>
+ <_summary>Birthday and anniversary reminder value</_summary>
+ <_description>Number of units for determining a birthday or anniversary reminder</_description>
+ </key>
+ <key name="ba-reminder-units" type="s">
+ <default>'minutes'</default>
+ <_summary>Birthday and anniversary reminder units</_summary>
+ <_description>Units for a birthday or anniversary reminder, "minutes", "hours" or "days"</_description>
+ </key>
+ <key name="compress-weekend" type="b">
+ <default>true</default>
+ <_summary>Compress weekends in month view</_summary>
+ <_description>Whether to compress weekends in the month view, which puts Saturday and Sunday in the space of one weekday</_description>
+ </key>
+ <key name="confirm-delete" type="b">
+ <default>true</default>
+ <_summary>Ask for confirmation when deleting items</_summary>
+ <_description>Whether to ask for confirmation when deleting an appointment or task</_description>
+ </key>
+ <key name="confirm-purge" type="b">
+ <default>true</default>
+ <_summary>Confirm expunge</_summary>
+ <_description>Whether to ask for confirmation when expunging appointments and tasks</_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-end-hour" type="i">
+ <default>17</default>
+ <_summary>Workday end hour</_summary>
+ <_description>Hour the workday ends on, in twenty four hour format, 0 to 23</_description>
+ </key>
+ <key name="day-end-minute" type="i">
+ <default>0</default>
+ <_summary>Workday end minute</_summary>
+ <_description>Minute the workday ends on, 0 to 59.</_description>
+ </key>
+ <key name="day-start-hour" type="i">
+ <default>9</default>
+ <_summary>Workday start hour</_summary>
+ <_description>Hour the workday starts on, in twenty four hour format, 0 to 23.</_description>
+ </key>
+ <key name="day-start-minute" type="i">
+ <default>0</default>
+ <_summary>Workday start minute</_summary>
+ <_description>Minute the workday starts on, 0 to 59.</_description>
+ </key>
<key name="day-second-zone" type="s">
<default>''</default>
<_summary>The second timezone for a Day View</_summary>
@@ -25,6 +70,16 @@
<_summary>Maximum number of recently used timezones to remember</_summary>
<_description>Maximum number of recently used timezones to remember in a 'day-second-zones' list</_description>
</key>
+ <key name="default-reminder-interval" type="i">
+ <default>15</default>
+ <_summary>Default reminder value</_summary>
+ <_description>Number of units for determining a default reminder</_description>
+ </key>
+ <key name="default-reminder-units" type="s">
+ <default>'minutes'</default>
+ <_summary>Default reminder units</_summary>
+ <_description>Units for a default reminder, "minutes", "hours" or "days"</_description>
+ </key>
<key name="editor-show-categories" type="b">
<default>false</default>
<_summary>Show categories field in the event/meeting/task editor</_summary>
@@ -80,6 +135,21 @@
<_summary>Last reminder time</_summary>
<_description>Time the last reminder ran, in time_t</_description>
</key>
+ <key name="marcus-bains-color-dayview" type="s">
+ <default>'#ff0000'</default>
+ <_summary>Marcus Bains Line Color - Day View</_summary>
+ <_description>Color to draw the Marcus Bains line in the Day View</_description>
+ </key>
+ <key name="marcus-bains-color-timebar" type="s">
+ <default>'#ff0000'</default>
+ <_summary>Marcus Bains Line Color - Time bar</_summary>
+ <_description>Color to draw the Marcus Bains Line in the Time bar (empty for default)</_description>
+ </key>
+ <key name="marcus-bains-line" type="b">
+ <default>true</default>
+ <_summary>Marcus Bains Line</_summary>
+ <_description>Whether to draw the Marcus Bains Line (line at current time) in the calendar</_description>
+ </key>
<key name="memo-hpane-position" type="i">
<default>200</default>
<_summary>Memo preview pane position (horizontal)</_summary>
@@ -115,6 +185,31 @@
<_summary>Show display reminders in notification tray</_summary>
<_description>Whether or not to use the notification tray for display reminders</_description>
</key>
+ <key name="primary-calendar" type="s">
+ <default>''</default>
+ <_summary>Primary calendar</_summary>
+ <_description>The UID of the selected (or "primary") calendar in the sidebar of the "Calendar" view</_description>
+ </key>
+ <key name="primary-memos" type="s">
+ <default>''</default>
+ <_summary>Primary memo list</_summary>
+ <_description>The UID of the selected (or "primary") memo list in the sidebar of the "Memos" view</_description>
+ </key>
+ <key name="primary-tasks" type="s">
+ <default>''</default>
+ <_summary>Primary task list</_summary>
+ <_description>The UID of the selected (or "primary") task list in the sidebar of the "Tasks" view</_description>
+ </key>
+ <key name="publish-template" type="s">
+ <default>''</default>
+ <_summary>Free/busy template URL</_summary>
+ <_description>The URL template to use as a free/busy data fallback, %u is replaced by the user part of the mail address and %d is replaced by the domain</_description>
+ </key>
+ <key name="recur-events-italic" type="b">
+ <default>false</default>
+ <_summary>Recurrent Events in Italic</_summary>
+ <_description>Show days with recurrent events in italic font in bottom left calendar</_description>
+ </key>
<key name="selected-calendars" type="as">
<default>[]</default>
<_summary>List of selected calendars</_summary>
@@ -130,6 +225,11 @@
<_summary>List of selected task lists</_summary>
<_description>List of task lists to load</_description>
</key>
+ <key name="show-event-end" type="b">
+ <default>true</default>
+ <_summary>Show appointment end times in week and month views</_summary>
+ <_description>Whether to display the end time of events in the week and month views</_description>
+ </key>
<key name="show-memo-preview" type="b">
<default>true</default>
<_summary>Show the memo preview pane</_summary>
@@ -140,11 +240,21 @@
<_summary>Show the task preview pane</_summary>
<_description>If "true", show the task preview pane in the main window</_description>
</key>
+ <key name="show-week-numbers" type="b">
+ <default>false</default>
+ <_summary>Show week numbers in Day View, Work Week View, and Date Navigator</_summary>
+ <_description>Whether to show week numbers in various places in the Calendar</_description>
+ </key>
<key name="tag-vpane-position" type="i">
<default>0</default>
<_summary>Vertical position for the tag pane</_summary>
<_description>Vertical position for the tag pane</_description>
</key>
+ <key name="task-due-today-color" type="s">
+ <default>'#1e90ff'</default>
+ <_summary>Tasks due today color</_summary>
+ <_description>Background color of tasks that are due today, in "#rrggbb" format</_description>
+ </key>
<key name="task-hpane-position" type="i">
<default>200</default>
<_summary>Task preview pane position (horizontal)</_summary>
@@ -160,6 +270,16 @@
<_summary>Task preview pane position (vertical)</_summary>
<_description>Position of the task preview pane when oriented vertically</_description>
</key>
+ <key name="task-overdue-color" type="s">
+ <default>'#ff0000'</default>
+ <_summary>Overdue tasks color</_summary>
+ <_description>Background color of tasks that are overdue, in "#rrggbb" format</_description>
+ </key>
+ <key name="time-divisions" type="i">
+ <default>30</default>
+ <_summary>Time divisions</_summary>
+ <_description>Intervals shown in Day and Work Week views, in minutes</_description>
+ </key>
<key name="timezone" type="s">
<default>'UTC'</default>
<_summary>Timezone</_summary>
@@ -170,11 +290,26 @@
<_summary>Twenty four hour time format</_summary>
<_description>Whether to show times in twenty four hour format instead of using am/pm</_description>
</key>
+ <key name="use-ba-reminder" type="b">
+ <default>false</default>
+ <_summary>Birthday and anniversary reminder</_summary>
+ <_description>Whether to set a reminder for birthdays and anniversaries</_description>
+ </key>
+ <key name="use-default-reminder" type="b">
+ <default>false</default>
+ <_summary>Default appointment reminder</_summary>
+ <_description>Whether to set a default reminder for appointments</_description>
+ </key>
<key name="use-system-timezone" type="b">
<default>true</default>
<_summary>Use system timezone</_summary>
<_description>Use the system timezone instead of the timezone selected in Evolution</_description>
</key>
+ <key name="week-start-day" type="i">
+ <default>1</default>
+ <_summary>Week start</_summary>
+ <_description>Weekday the week starts on, from Sunday (0) to Saturday (6)</_description>
+ </key>
<key name="working-days" type="i">
<default>62</default>
<_summary>Work days</_summary>
diff --git a/data/org.gnome.evolution.mail.gschema.xml.in b/data/org.gnome.evolution.mail.gschema.xml.in
index 30884ae571..004ec16ccf 100644
--- a/data/org.gnome.evolution.mail.gschema.xml.in
+++ b/data/org.gnome.evolution.mail.gschema.xml.in
@@ -10,6 +10,11 @@
<_summary>Default charset in which to compose messages</_summary>
<_description>Default charset in which to compose messages.</_description>
</key>
+ <key name="composer-gallery-path" type="s">
+ <default>''</default>
+ <_summary>Path where picture gallery should search for its content</_summary>
+ <_description>This value can be an empty string, which means it'll use the system Picture folder, usually set to ~/Pictures. This folder will be also used when the set path is not pointing to the existent folder</_description>
+ </key>
<key name="composer-inline-spelling" type="b">
<default>true</default>
<_summary>Spell check inline</_summary>
@@ -235,6 +240,11 @@
<_summary>Show deleted messages in the message-list</_summary>
<_description>Show deleted messages (with a strike-through) in the message-list.</_description>
</key>
+ <key name="enable-local" type="b">
+ <default>true</default>
+ <_summary>Enable local folders</_summary>
+ <_description>Whether to show local folders (On This Computer) in a folder tree</_description>
+ </key>
<key name="enable-vfolders" type="b">
<default>true</default>
<_summary>Enable search folders</_summary>
@@ -250,6 +260,11 @@
<_summary>Height of the message-list pane</_summary>
<_description>Height of the message-list pane.</_description>
</key>
+ <key name="paned-view-headers-state" type="i">
+ <default>0</default>
+ <_summary>State of message headers in paned view</_summary>
+ <_description>Describes whether message headers in paned view should be collapsed or expanded by default. "0" = expanded and "1" = collapsed</_description>
+ </key>
<key name="hpaned-size" type="i">
<default>450</default>
<_summary>Width of the message-list pane</_summary>
@@ -325,6 +340,11 @@
<_summary>Mail browser maximized</_summary>
<_description>Default maximized state of the mail browser window.</_description>
</key>
+ <key name="sort-accounts-alpha" type="b">
+ <default>true</default>
+ <_summary>Sort accounts alphabetically in a folder tree</_summary>
+ <_description>Tells how to sort accounts in a folder tree used in a Mail view. When set to true accounts are sorted alphabetically, with an exception of On This Computer and Search folders, otherwise accounts are sorted based on an order given by a user</_description>
+ </key>
<key name="subscription-editor-height" type="i">
<default>400</default>
<_summary>"Folder Subscriptions" window height</_summary>
@@ -580,6 +600,16 @@
<_summary>"Send and Receive Mail" window maximize state</_summary>
<_description>Initial maximize state of the "Send and Receive Mail" window. The value updates when the user maximizes or unmaximizes the window. Note, this particular value is not used by Evolution since the "Send and Receive Mail" window cannot be maximized. This key exists only as an implementation detail.</_description>
</key>
+ <key name="send-recv-on-start" type="b">
+ <default>true</default>
+ <_summary>Check for new messages on start</_summary>
+ <_description>Whether check for new messages when Evolution is started. This includes also sending messages from Outbox.</_description>
+ </key>
+ <key name="send-recv-all-on-start" type="b">
+ <default>false</default>
+ <_summary>Check for new messages in all active accounts</_summary>
+ <_description>Whether check for new messages in all active accounts regardless of the account "Check for new messages every X minutes" option when Evolution is started. This option is used only together with 'send_recv_on_start' option.</_description>
+ </key>
<key name="send-recv-width" type="i">
<default>600</default>
<_summary>"Send and Receive Mail" window width</_summary>
diff --git a/modules/addressbook/e-book-shell-settings.c b/modules/addressbook/e-book-shell-settings.c
index ae2e4f0adf..22e40a6485 100644
--- a/modules/addressbook/e-book-shell-settings.c
+++ b/modules/addressbook/e-book-shell-settings.c
@@ -25,18 +25,23 @@
#include "e-book-shell-settings.h"
+#define ADDRESSBOOK_SCHEMA "org.gnome.evolution.addressbook"
+
void
e_book_shell_backend_init_settings (EShell *shell)
{
e_shell_settings_install_property_for_key (
"book-completion-show-address",
- "/apps/evolution/addressbook/completion/show_address");
+ ADDRESSBOOK_SCHEMA,
+ "completion-show-address");
e_shell_settings_install_property_for_key (
"book-primary-selection",
- "/apps/evolution/addressbook/display/primary_addressbook");
+ ADDRESSBOOK_SCHEMA,
+ "primary-addressbook");
e_shell_settings_install_property_for_key (
"enable-address-formatting",
- "/apps/evolution/addressbook/display/address_formatting");
+ ADDRESSBOOK_SCHEMA,
+ "address-formatting");
}
diff --git a/modules/calendar/e-cal-shell-settings.c b/modules/calendar/e-cal-shell-settings.c
index 456f95707c..88b961e64f 100644
--- a/modules/calendar/e-cal-shell-settings.c
+++ b/modules/calendar/e-cal-shell-settings.c
@@ -25,12 +25,13 @@
#include "e-cal-shell-settings.h"
-#include <gconf/gconf-client.h>
#include <libecal/e-cal-util.h>
#include <e-util/e-util.h>
#include <e-util/e-util-enumtypes.h>
+#define CALENDAR_SCHEMA "org.gnome.evolution.calendar"
+
static gboolean
transform_string_to_icaltimezone (GBinding *binding,
const GValue *source_value,
@@ -524,149 +525,184 @@ e_cal_shell_backend_init_settings (EShell *shell)
e_shell_settings_install_property_for_key (
"cal-ba-reminder-interval",
- "/apps/evolution/calendar/other/ba_reminder_interval");
+ CALENDAR_SCHEMA,
+ "ba-reminder-interval");
e_shell_settings_install_property_for_key (
"cal-ba-reminder-units-string",
- "/apps/evolution/calendar/other/ba_reminder_units");
+ CALENDAR_SCHEMA,
+ "ba-reminder-units");
e_shell_settings_install_property_for_key (
"cal-compress-weekend",
- "/apps/evolution/calendar/display/compress_weekend");
+ CALENDAR_SCHEMA,
+ "compress-weekend");
e_shell_settings_install_property_for_key (
"cal-confirm-delete",
- "/apps/evolution/calendar/prompts/confirm_delete");
+ CALENDAR_SCHEMA,
+ "confirm-delete");
e_shell_settings_install_property_for_key (
"cal-confirm-purge",
- "/apps/evolution/calendar/prompts/confirm_purge");
+ CALENDAR_SCHEMA,
+ "confirm-purge");
e_shell_settings_install_property_for_key (
"cal-default-reminder-interval",
- "/apps/evolution/calendar/other/default_reminder_interval");
+ CALENDAR_SCHEMA,
+ "default-reminder-interval");
/* Do not bind to this.
* Use "cal-default-reminder-units" instead. */
e_shell_settings_install_property_for_key (
"cal-default-reminder-units-string",
- "/apps/evolution/calendar/other/default_reminder_units");
+ CALENDAR_SCHEMA,
+ "default-reminder-units");
e_shell_settings_install_property_for_key (
"cal-free-busy-template",
- "/apps/evolution/calendar/publish/template");
+ CALENDAR_SCHEMA,
+ "publish-template");
e_shell_settings_install_property_for_key (
"cal-hide-completed-tasks",
- "/apps/evolution/calendar/tasks/hide_completed");
+ CALENDAR_SCHEMA,
+ "hide-completed-tasks");
/* Do not bind to this.
* Use "cal-hide-completed-tasks-units" instead. */
e_shell_settings_install_property_for_key (
"cal-hide-completed-tasks-units-string",
- "/apps/evolution/calendar/tasks/hide_completed_units");
+ CALENDAR_SCHEMA,
+ "hide-completed-tasks-units");
e_shell_settings_install_property_for_key (
"cal-hide-completed-tasks-value",
- "/apps/evolution/calendar/tasks/hide_completed_value");
+ CALENDAR_SCHEMA,
+ "hide-completed-tasks-value");
e_shell_settings_install_property_for_key (
"cal-marcus-bains-day-view-color",
- "/apps/evolution/calendar/display/marcus_bains_color_dayview");
+ CALENDAR_SCHEMA,
+ "marcus-bains-color-dayview");
e_shell_settings_install_property_for_key (
"cal-marcus-bains-time-bar-color",
- "/apps/evolution/calendar/display/marcus_bains_color_timebar");
+ CALENDAR_SCHEMA,
+ "marcus-bains-color-timebar");
e_shell_settings_install_property_for_key (
"cal-marcus-bains-show-line",
- "/apps/evolution/calendar/display/marcus_bains_line");
+ CALENDAR_SCHEMA,
+ "marcus-bains-line");
e_shell_settings_install_property_for_key (
"cal-month-scroll-by-week",
- "/apps/evolution/calendar/display/month_scroll_by_week");
+ CALENDAR_SCHEMA,
+ "month-scroll-by-week");
e_shell_settings_install_property_for_key (
"cal-primary-calendar",
- "/apps/evolution/calendar/display/primary_calendar");
+ CALENDAR_SCHEMA,
+ "primary-calendar");
e_shell_settings_install_property_for_key (
"cal-primary-memo-list",
- "/apps/evolution/calendar/memos/primary_memos");
+ CALENDAR_SCHEMA,
+ "primary-memos");
e_shell_settings_install_property_for_key (
"cal-primary-task-list",
- "/apps/evolution/calendar/tasks/primary_tasks");
+ CALENDAR_SCHEMA,
+ "primary-tasks");
e_shell_settings_install_property_for_key (
"cal-recur-events-italic",
- "/apps/evolution/calendar/display/recur_events_italic");
+ CALENDAR_SCHEMA,
+ "recur-events-italic");
e_shell_settings_install_property_for_key (
"cal-show-event-end-times",
- "/apps/evolution/calendar/display/show_event_end");
+ CALENDAR_SCHEMA,
+ "show-event-end");
e_shell_settings_install_property_for_key (
"cal-show-week-numbers",
- "/apps/evolution/calendar/display/show_week_numbers");
+ CALENDAR_SCHEMA,
+ "show-week-numbers");
e_shell_settings_install_property_for_key (
"cal-tasks-color-due-today",
- "/apps/evolution/calendar/tasks/colors/due_today");
+ CALENDAR_SCHEMA,
+ "task-due-today-color");
e_shell_settings_install_property_for_key (
"cal-tasks-color-overdue",
- "/apps/evolution/calendar/tasks/colors/overdue");
+ CALENDAR_SCHEMA,
+ "task-overdue-color");
e_shell_settings_install_property_for_key (
"cal-time-divisions",
- "/apps/evolution/calendar/display/time_divisions");
+ CALENDAR_SCHEMA,
+ "time-divisions");
/* Do not bind to this. Use "cal-timezone" instead. */
e_shell_settings_install_property_for_key (
"cal-timezone-string",
- "/apps/evolution/calendar/display/timezone");
+ CALENDAR_SCHEMA,
+ "timezone");
e_shell_settings_install_property_for_key (
"cal-use-24-hour-format",
- "/apps/evolution/calendar/display/use_24hour_format");
+ CALENDAR_SCHEMA,
+ "use-24hour-format");
e_shell_settings_install_property_for_key (
"cal-use-ba-reminder",
- "/apps/evolution/calendar/other/use_ba_reminder");
+ CALENDAR_SCHEMA,
+ "use-ba-reminder");
e_shell_settings_install_property_for_key (
"cal-use-default-reminder",
- "/apps/evolution/calendar/other/use_default_reminder");
+ CALENDAR_SCHEMA,
+ "use-default-reminder");
e_shell_settings_install_property_for_key (
"cal-use-system-timezone",
- "/apps/evolution/calendar/display/use_system_timezone");
+ CALENDAR_SCHEMA,
+ "use-system-timezone");
/* Do not bind to this. Use "cal-week-start-day" instead. */
e_shell_settings_install_property_for_key (
"cal-week-start-day-gconf",
- "/apps/evolution/calendar/display/week_start_day");
+ CALENDAR_SCHEMA,
+ "week-start-day");
e_shell_settings_install_property_for_key (
"cal-work-day-end-hour",
- "/apps/evolution/calendar/display/day_end_hour");
+ CALENDAR_SCHEMA,
+ "day-end-hour");
e_shell_settings_install_property_for_key (
"cal-work-day-end-minute",
- "/apps/evolution/calendar/display/day_end_minute");
+ CALENDAR_SCHEMA,
+ "day-end-minute");
e_shell_settings_install_property_for_key (
"cal-work-day-start-hour",
- "/apps/evolution/calendar/display/day_start_hour");
+ CALENDAR_SCHEMA,
+ "day-start-hour");
e_shell_settings_install_property_for_key (
"cal-work-day-start-minute",
- "/apps/evolution/calendar/display/day_start_minute");
+ CALENDAR_SCHEMA,
+ "day-start-minute");
e_shell_settings_install_property_for_key (
"cal-working-days-bitset",
- "/apps/evolution/calendar/display/working_days");
+ CALENDAR_SCHEMA,
+ "working-days");
/* These properties use transform functions to convert
* GConf values to forms more useful to Evolution. We
diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c
index b0d5f1eed8..5cc70efdbd 100644
--- a/modules/mail/e-mail-shell-settings.c
+++ b/modules/mail/e-mail-shell-settings.c
@@ -32,6 +32,8 @@
#include <shell/e-shell.h>
+#define MAIL_SCHEMA "org.gnome.evolution.mail"
+
static gboolean
transform_no_folder_dots_to_ellipsize (GBinding *binding,
const GValue *source_value,
@@ -95,239 +97,296 @@ e_mail_shell_settings_init (EShellBackend *shell_backend)
e_shell_settings_install_property_for_key (
"mail-address-compress",
- "/apps/evolution/mail/display/address_compress");
+ MAIL_SCHEMA,
+ "address-compress");
e_shell_settings_install_property_for_key (
"mail-address-count",
- "/apps/evolution/mail/display/address_count");
+ MAIL_SCHEMA,
+ "address-count");
e_shell_settings_install_property_for_key (
"mail-charset",
- "/apps/evolution/mail/display/charset");
+ MAIL_SCHEMA,
+ "charset");
e_shell_settings_install_property_for_key (
"mail-check-for-junk",
- "/apps/evolution/mail/junk/check_incoming");
+ MAIL_SCHEMA,
+ "junk-check-incoming");
e_shell_settings_install_property_for_key (
"mail-check-on-start",
- "/apps/evolution/mail/send_recv_on_start");
+ MAIL_SCHEMA,
+ "send-recv-on-start");
e_shell_settings_install_property_for_key (
"mail-check-all-on-start",
- "/apps/evolution/mail/send_recv_all_on_start");
+ MAIL_SCHEMA,
+ "send-recv-all-on-start");
e_shell_settings_install_property_for_key (
"mail-citation-color",
- "/apps/evolution/mail/display/citation_colour");
+ MAIL_SCHEMA,
+ "citation-colour");
e_shell_settings_install_property_for_key (
"mail-confirm-expunge",
- "/apps/evolution/mail/prompts/expunge");
+ MAIL_SCHEMA,
+ "prompt-on-expunge");
e_shell_settings_install_property_for_key (
"mail-confirm-unwanted-html",
- "/apps/evolution/mail/prompts/unwanted_html");
+ MAIL_SCHEMA,
+ "prompt-on-unwanted-html");
e_shell_settings_install_property_for_key (
"mail-empty-junk-on-exit",
- "/apps/evolution/mail/junk/empty_on_exit");
+ MAIL_SCHEMA,
+ "junk-empty-on-exit");
e_shell_settings_install_property_for_key (
"mail-empty-trash-on-exit",
- "/apps/evolution/mail/trash/empty_on_exit");
+ MAIL_SCHEMA,
+ "trash-empty-on-exit");
e_shell_settings_install_property_for_key (
"mail-enable-search-folders",
- "/apps/evolution/mail/display/enable_vfolders");
+ MAIL_SCHEMA,
+ "enable-vfolders");
e_shell_settings_install_property_for_key (
"mail-enable-local-folders",
- "/apps/evolution/mail/display/enable_local");
+ MAIL_SCHEMA,
+ "enable-local");
e_shell_settings_install_property_for_key (
"mail-font-monospace",
- "/apps/evolution/mail/display/fonts/monospace");
+ MAIL_SCHEMA,
+ "monospace-font");
e_shell_settings_install_property_for_key (
"mail-font-variable",
- "/apps/evolution/mail/display/fonts/variable");
+ MAIL_SCHEMA,
+ "variable-width-font");
e_shell_settings_install_property_for_key (
"mail-force-message-limit",
- "/apps/evolution/mail/display/force_message_limit");
+ MAIL_SCHEMA,
+ "force-message-limit");
/* This value corresponds to the EMailForwardStyle enum. */
e_shell_settings_install_property_for_key (
"mail-forward-style",
- "/apps/evolution/mail/format/forward_style");
+ MAIL_SCHEMA,
+ "forward-style");
/* This value corresponds to MailConfigHTTPMode enum. */
e_shell_settings_install_property_for_key (
"mail-image-loading-policy",
- "/apps/evolution/mail/display/load_http_images");
+ MAIL_SCHEMA,
+ "load-http-images");
e_shell_settings_install_property_for_key (
"mail-magic-spacebar",
- "/apps/evolution/mail/display/magic_spacebar");
+ MAIL_SCHEMA,
+ "magic-spacebar");
e_shell_settings_install_property_for_key (
"mail-global-view-setting",
- "/apps/evolution/mail/display/global_view_setting");
+ MAIL_SCHEMA,
+ "global-view-setting");
e_shell_settings_install_property_for_key (
"mail-mark-citations",
- "/apps/evolution/mail/display/mark_citations");
+ MAIL_SCHEMA,
+ "mark-citations");
e_shell_settings_install_property_for_key (
"mail-mark-seen",
- "/apps/evolution/mail/display/mark_seen");
+ MAIL_SCHEMA,
+ "mark-seen");
e_shell_settings_install_property_for_key (
"mail-mark-seen-timeout",
- "/apps/evolution/mail/display/mark_seen_timeout");
+ MAIL_SCHEMA,
+ "mark-seen-timeout");
e_shell_settings_install_property_for_key (
"mail-message-text-part-limit",
- "/apps/evolution/mail/display/message_text_part_limit");
+ MAIL_SCHEMA,
+ "message-text-part-limit");
/* Do not bind to this. Use "mail-sidebar-ellipsize" instead. */
e_shell_settings_install_property_for_key (
"mail-no-folder-dots",
- "/apps/evolution/mail/display/no_folder_dots");
+ MAIL_SCHEMA,
+ "no-folder-dots");
e_shell_settings_install_property_for_key (
"mail-only-local-photos",
- "/apps/evolution/mail/display/photo_local");
+ MAIL_SCHEMA,
+ "photo-local");
e_shell_settings_install_property_for_key (
"mail-show-real-date",
- "/apps/evolution/mail/display/show_real_date");
+ MAIL_SCHEMA,
+ "show-real-date");
e_shell_settings_install_property_for_key (
"mail-sort-accounts-alpha",
- "/apps/evolution/mail/display/sort_accounts_alpha");
+ MAIL_SCHEMA,
+ "sort-accounts-alpha");
e_shell_settings_install_property_for_key (
"mail-prompt-delete-in-vfolder",
- "/apps/evolution/mail/prompts/delete_in_vfolder");
+ MAIL_SCHEMA,
+ "prompt-on-delete-in-vfolder");
/* This value corresponds to the EMailReplyStyle enum,
* but the ordering of the combo box items in preferences
* has changed. We use transformation functions there. */
e_shell_settings_install_property_for_key (
"mail-reply-style",
- "/apps/evolution/mail/format/reply_style");
+ MAIL_SCHEMA,
+ "reply-style");
e_shell_settings_install_property_for_key (
"mail-safe-list",
- "/apps/evolution/mail/display/safe_list");
+ MAIL_SCHEMA,
+ "safe-list");
e_shell_settings_install_property_for_key (
"mail-show-animated-images",
- "/apps/evolution/mail/display/animated_images");
+ MAIL_SCHEMA,
+ "show-animated-images");
e_shell_settings_install_property_for_key (
"mail-show-sender-photo",
- "/apps/evolution/mail/display/sender_photo");
+ MAIL_SCHEMA,
+ "show-sender-photo");
e_shell_settings_install_property_for_key (
"mail-sidebar-search",
- "/apps/evolution/mail/display/side_bar_search");
+ MAIL_SCHEMA,
+ "side-bar-search");
e_shell_settings_install_property_for_key (
"mail-thread-by-subject",
- "/apps/evolution/mail/display/thread_subject");
+ MAIL_SCHEMA,
+ "thread-subject");
e_shell_settings_install_property_for_key (
"mail-use-custom-fonts",
- "/apps/evolution/mail/display/fonts/use_custom");
+ MAIL_SCHEMA,
+ "use-custom-font");
/*** Composer Preferences ***/
e_shell_settings_install_property_for_key (
"composer-charset",
- "/apps/evolution/mail/composer/charset");
+ MAIL_SCHEMA,
+ "composer-charset");
e_shell_settings_install_property_for_key (
"composer-format-html",
- "/apps/evolution/mail/composer/send_html");
+ MAIL_SCHEMA,
+ "composer-send-html");
e_shell_settings_install_property_for_key (
"composer-inline-spelling",
- "/apps/evolution/mail/composer/inline_spelling");
+ MAIL_SCHEMA,
+ "composer-inline-spelling");
e_shell_settings_install_property_for_key (
"composer-magic-links",
- "/apps/evolution/mail/composer/magic_links");
+ MAIL_SCHEMA,
+ "composer-magic-links");
e_shell_settings_install_property_for_key (
"composer-magic-smileys",
- "/apps/evolution/mail/composer/magic_smileys");
+ MAIL_SCHEMA,
+ "composer-magic-smileys");
e_shell_settings_install_property_for_key (
"composer-outlook-filenames",
- "/apps/evolution/mail/composer/outlook_filenames");
+ MAIL_SCHEMA,
+ "composer-outlook-filenames");
e_shell_settings_install_property_for_key (
"composer-ignore-list-reply-to",
- "/apps/evolution/mail/composer/ignore_list_reply_to");
+ MAIL_SCHEMA,
+ "composer-ignore-list-reply-to");
e_shell_settings_install_property_for_key (
"composer-group-reply-to-list",
- "/apps/evolution/mail/composer/group_reply_to_list");
+ MAIL_SCHEMA,
+ "composer-group-reply-to-list");
e_shell_settings_install_property_for_key (
"composer-prompt-only-bcc",
- "/apps/evolution/mail/prompts/only_bcc");
+ MAIL_SCHEMA,
+ "prompt-on-only-bcc");
e_shell_settings_install_property_for_key (
"composer-prompt-private-list-reply",
- "/apps/evolution/mail/prompts/private_list_reply");
+ MAIL_SCHEMA,
+ "prompt-on-private-list-reply");
e_shell_settings_install_property_for_key (
"composer-prompt-reply-many-recips",
- "/apps/evolution/mail/prompts/reply_many_recips");
+ MAIL_SCHEMA,
+ "prompt-on-reply-many-recips");
e_shell_settings_install_property_for_key (
"composer-prompt-list-reply-to",
- "/apps/evolution/mail/prompts/list_reply_to");
+ MAIL_SCHEMA,
+ "prompt-on-list-reply-to");
e_shell_settings_install_property_for_key (
"composer-prompt-empty-subject",
- "/apps/evolution/mail/prompts/empty_subject");
+ MAIL_SCHEMA,
+ "prompt-on-empty-subject");
e_shell_settings_install_property_for_key (
"composer-prompt-send-invalid-recip",
- "/apps/evolution/mail/prompts/send_invalid_recip");
+ MAIL_SCHEMA,
+ "prompt-on-invalid-recip");
e_shell_settings_install_property_for_key (
"composer-reply-start-bottom",
- "/apps/evolution/mail/composer/reply_start_bottom");
+ MAIL_SCHEMA,
+ "composer-reply-start-bottom");
e_shell_settings_install_property_for_key (
"composer-request-receipt",
- "/apps/evolution/mail/composer/request_receipt");
+ MAIL_SCHEMA,
+ "composer-request-receipt");
e_shell_settings_install_property_for_key (
"composer-spell-color",
- "/apps/evolution/mail/composer/spell_color");
+ MAIL_SCHEMA,
+ "composer-spell-color");
e_shell_settings_install_property_for_key (
"composer-top-signature",
- "/apps/evolution/mail/composer/top_signature");
+ MAIL_SCHEMA,
+ "composer-top-signature");
e_shell_settings_install_property_for_key (
"composer-no-signature-delim",
- "/apps/evolution/mail/composer/no_signature_delim");
+ MAIL_SCHEMA,
+ "composer-no-signature-delim");
e_shell_settings_install_property_for_key (
"composer-gallery-path",
- "/apps/evolution/mail/composer/gallery_path");
+ MAIL_SCHEMA,
+ "composer-gallery-path");
e_shell_settings_install_property_for_key (
"paned-view-headers-state",
- "/apps/evolution/mail/display/paned_view_headers_state");
+ MAIL_SCHEMA,
+ "paned-view-headers-state");
/* These properties use transform functions to convert
* GConf values to forms more useful to Evolution. We
diff --git a/modules/mailto-handler/evolution-mailto-handler.c b/modules/mailto-handler/evolution-mailto-handler.c
index 4846aaaa85..98e03516ce 100644
--- a/modules/mailto-handler/evolution-mailto-handler.c
+++ b/modules/mailto-handler/evolution-mailto-handler.c
@@ -241,7 +241,8 @@ mailto_handler_constructed (GObject *object)
e_shell_settings_install_property_for_key (
"mailto-handler-check",
- "/apps/evolution/mail/prompts/checkdefault");
+ "org.gnome.evolution.mail",
+ "prompt-check-if-default-mailer");
g_signal_connect_swapped (
shell, "event::ready-to-start",
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index 5e5f3428fe..decd9d00b5 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -31,8 +31,6 @@
#include "e-shell-settings.h"
-#include "e-util/gconf-bridge.h"
-
struct _EShellSettingsPrivate {
GArray *value_array;
guint debug : 1;
@@ -44,130 +42,93 @@ static gpointer parent_class;
static GParamSpec *
shell_settings_pspec_for_key (const gchar *property_name,
- const gchar *gconf_key)
+ const gchar *schema,
+ const gchar *key)
{
- GConfClient *client;
- GConfEntry *entry;
- GConfSchema *schema;
- GConfValue *default_value;
- GConfValueType value_type;
+ GSettings *settings;
+ GVariant *v;
+ GVariantType *value_type;
GParamSpec *pspec;
const gchar *bad_type;
- const gchar *schema_name;
GError *error = NULL;
- client = gconf_client_get_default ();
-
- entry = gconf_client_get_entry (client, gconf_key, NULL, TRUE, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- return NULL;
- }
-
- schema_name = gconf_entry_get_schema_name (entry);
- g_return_val_if_fail (schema_name != NULL, NULL);
-
- schema = gconf_client_get_schema (client, schema_name, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- gconf_entry_unref (entry);
- g_error_free (error);
- return NULL;
- }
-
- value_type = gconf_schema_get_type (schema);
- default_value = gconf_schema_get_default_value (schema);
-
- /* If the schema does not specify a default value, make one up. */
- if (default_value == NULL) {
- default_value = gconf_value_new (value_type);
-
- /* XXX This should NOT be necessary, but the GConfValue
- * documentation claims it is. Bother. */
- switch (value_type) {
- case GCONF_VALUE_STRING:
- gconf_value_set_string (default_value, "");
- break;
-
- case GCONF_VALUE_INT:
- gconf_value_set_int (default_value, 0);
- break;
-
- case GCONF_VALUE_FLOAT:
- gconf_value_set_float (default_value, 0.0);
- break;
-
- case GCONF_VALUE_BOOL:
- gconf_value_set_bool (default_value, FALSE);
- break;
-
- default:
- /* We'll fail in the next switch statement. */
- break;
- }
+ client = g_settings_new (schema);
+
+ v = g_settings_get_value (settings, key);
+ value_type = g_variant_get_type (v);
+
+ if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_STRING)) {
+ pspec = g_param_spec_string (
+ property_name, NULL, NULL,
+ g_variant_get_string (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_BYTE)) {
+ pspec = g_param_spec_int (
+ property_name, NULL, NULL,
+ G_MININT, G_MAXINT,
+ g_variant_get_byte (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_INT16)) {
+ pspec = g_param_spec_int (
+ property_name, NULL, NULL,
+ G_MININT, G_MAXINT,
+ g_variant_get_int16 (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_UINT16)) {
+ pspec = g_param_spec_int (
+ property_name, NULL, NULL,
+ G_MININT, G_MAXINT,
+ g_variant_get_uint16 (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_INT32)) {
+ pspec = g_param_spec_int (
+ property_name, NULL, NULL,
+ G_MININT, G_MAXINT,
+ g_variant_get_int32 (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_UINT32)) {
+ pspec = g_param_spec_int (
+ property_name, NULL, NULL,
+ G_MININT, G_MAXINT,
+ g_variant_get_uint32 (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_INT64)) {
+ pspec = g_param_spec_int (
+ property_name, NULL, NULL,
+ G_MININT, G_MAXINT,
+ g_variant_get_int64 (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_UINT64)) {
+ pspec = g_param_spec_int (
+ property_name, NULL, NULL,
+ G_MININT, G_MAXINT,
+ g_variant_get_uint64 (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_DOUBLE)) {
+ pspec = g_param_spec_double (
+ property_name, NULL, NULL,
+ -G_MAXDOUBLE, G_MAXDOUBLE,
+ g_variant_get_double (v),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (value_type, G_VARIANT_TYPE_BOOLEAN)) {
+ pspec = g_param_spec_boolean (
+ property_name, NULL, NULL,
+ g_variant_get_boolean (v),
+ G_PARAM_READWRITE);
} else {
- default_value = gconf_value_copy (default_value);
+ bad_type = g_variant_get_type_string (v);
+ goto fail;
}
- switch (value_type) {
- case GCONF_VALUE_STRING:
- pspec = g_param_spec_string (
- property_name, NULL, NULL,
- gconf_value_get_string (default_value),
- G_PARAM_READWRITE);
- break;
-
- case GCONF_VALUE_INT:
- pspec = g_param_spec_int (
- property_name, NULL, NULL,
- G_MININT, G_MAXINT,
- gconf_value_get_int (default_value),
- G_PARAM_READWRITE);
- break;
-
- case GCONF_VALUE_FLOAT:
- pspec = g_param_spec_double (
- property_name, NULL, NULL,
- -G_MAXDOUBLE, G_MAXDOUBLE,
- gconf_value_get_float (default_value),
- G_PARAM_READWRITE);
- break;
-
- case GCONF_VALUE_BOOL:
- pspec = g_param_spec_boolean (
- property_name, NULL, NULL,
- gconf_value_get_bool (default_value),
- G_PARAM_READWRITE);
- break;
-
- case GCONF_VALUE_SCHEMA:
- bad_type = "schema";
- goto fail;
-
- case GCONF_VALUE_LIST:
- bad_type = "list";
- goto fail;
-
- case GCONF_VALUE_PAIR:
- bad_type = "pair";
- goto fail;
-
- default:
- bad_type = "invalid";
- goto fail;
- }
-
- gconf_value_free (default_value);
- gconf_schema_free (schema);
- gconf_entry_unref (entry);
+ g_variant_unref (v);
+ g_object_unref (settings);
return pspec;
fail:
g_error (
"Unable to create EShellSettings property for "
- "GConf key '%s' of type '%s'", gconf_key, bad_type);
+ "GSettings key '%s' of type '%s'", key, bad_type);
g_assert_not_reached ();
}
@@ -277,7 +238,7 @@ shell_settings_init (EShellSettings *shell_settings,
g_object_notify (G_OBJECT (shell_settings), pspec->name);
/* FIXME Need to bind those properties that have
- * associated GConf keys. */
+ * associated GSettings keys. */
}
g_free (pspecs);
@@ -366,33 +327,39 @@ e_shell_settings_install_property (GParamSpec *pspec)
/**
* e_shell_settings_install_property_for_key:
* @property_name: the name of the property to install
- * @gconf_key: the GConf key to bind the property to
+ * @schema: the GSettings schema to use for @key
+ * @key: the GSettings key to bind the property to
*
* Installs a new #EShellSettings class property by examining the
- * GConf schema for @gconf_key to determine the appropriate type and
+ * GSettings schema for @key to determine the appropriate type and
* default value. This is usually done during initialization of an
* #EShellBackend of other dynamically loaded entity.
*
* After the class property is installed, all #EShellSettings instances
- * are bound to @gconf_key, causing @property_name and @gconf_key to have
+ * are bound to @key, causing @property_name and @key to have
* the same value at all times.
**/
void
e_shell_settings_install_property_for_key (const gchar *property_name,
- const gchar *gconf_key)
+ const gchar *schema,
+ const gchar *key)
{
GParamSpec *pspec;
GList *iter, *next;
+ GSettings *settings;
g_return_if_fail (property_name != NULL);
- g_return_if_fail (gconf_key != NULL);
+ g_return_if_fail (schema != NULL);
+ g_return_if_fail (key != NULL);
- pspec = shell_settings_pspec_for_key (property_name, gconf_key);
+ pspec = shell_settings_pspec_for_key (property_name, schema, key);
if (!pspec)
return;
e_shell_settings_install_property (pspec);
+ settings = g_settings_new (schema);
+
for (iter = instances; iter != NULL; iter = iter->next)
g_object_freeze_notify (iter->data);
@@ -401,15 +368,15 @@ e_shell_settings_install_property_for_key (const gchar *property_name,
shell_settings = E_SHELL_SETTINGS (iter->data);
- gconf_bridge_bind_property (
- gconf_bridge_get (), gconf_key,
- G_OBJECT (shell_settings), property_name);
+ g_settings_bind (settings, key, G_OBJECT (shell_settings), property_name, G_SETTINGS_BIND_DEFAULT);
}
for (iter = instances; iter != NULL; iter = next) {
next = iter->next;
g_object_thaw_notify (iter->data);
}
+
+ g_object_unref (settings);
}
/**
@@ -463,7 +430,7 @@ e_shell_settings_get_boolean (EShellSettings *shell_settings,
* @v_boolean: boolean value to be set
*
* Sets the contents of an #EShellSettings property of type #G_TYPE_BOOLEAN
- * to @v_boolean. If @property_name is bound to a GConf key, the GConf key
+ * to @v_boolean. If @property_name is bound to a GSettings key, the GSettings key
* will also be set to @v_boolean.
**/
void
@@ -521,7 +488,7 @@ e_shell_settings_get_int (EShellSettings *shell_settings,
* @v_int: integer value to be set
*
* Sets the contents of an #EShellSettings property of type #G_TYPE_INT
- * to @v_int. If @property_name is bound to a GConf key, the GConf key
+ * to @v_int. If @property_name is bound to a GSettings key, the GSettings key
* will also be set to @v_int.
**/
void
@@ -579,7 +546,7 @@ e_shell_settings_get_string (EShellSettings *shell_settings,
* @v_string: string to be set
*
* Sets the contents of an #EShellSettings property of type #G_TYPE_STRING
- * to @v_string. If @property_name is bound to a GConf key, the GConf key
+ * to @v_string. If @property_name is bound to a GSettings key, the GSettings key
* will also be set to @v_string.
**/
void
diff --git a/shell/e-shell-settings.h b/shell/e-shell-settings.h
index 15aaff2071..0316a7bb0b 100644
--- a/shell/e-shell-settings.h
+++ b/shell/e-shell-settings.h
@@ -69,7 +69,8 @@ void e_shell_settings_install_property
(GParamSpec *pspec);
void e_shell_settings_install_property_for_key
(const gchar *property_name,
- const gchar *gconf_key);
+ const gchar *schema,
+ const gchar *key);
void e_shell_settings_enable_debug (EShellSettings *shell_settings);
/* Getters and setters for common EShellSettings property types.
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 740bec8306..ac9b8b5835 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -1197,7 +1197,8 @@ e_shell_init (EShell *shell)
e_shell_settings_install_property_for_key (
"start-offline",
- "/apps/evolution/shell/start_offline");
+ "org.gnome.evolution.shell"
+ "start-offline");
/*** Session Management ***/