aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/addressbook/autocompletion-config.c8
-rw-r--r--modules/addressbook/e-book-shell-backend.c9
-rw-r--r--modules/addressbook/e-book-shell-content.c18
-rw-r--r--modules/addressbook/e-book-shell-settings.c11
-rw-r--r--modules/addressbook/e-book-shell-view-actions.c18
-rw-r--r--modules/bogofilter/evolution-bogofilter.c13
-rw-r--r--modules/calendar/e-cal-shell-backend.c41
-rw-r--r--modules/calendar/e-cal-shell-content.c33
-rw-r--r--modules/calendar/e-cal-shell-settings.c108
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c13
-rw-r--r--modules/calendar/e-calendar-preferences.c16
-rw-r--r--modules/calendar/e-memo-shell-backend.c42
-rw-r--r--modules/calendar/e-memo-shell-content.c14
-rw-r--r--modules/calendar/e-memo-shell-view-actions.c15
-rw-r--r--modules/calendar/e-task-shell-backend.c41
-rw-r--r--modules/calendar/e-task-shell-content.c16
-rw-r--r--modules/calendar/e-task-shell-view-actions.c15
-rw-r--r--modules/mail/e-mail-shell-backend.c60
-rw-r--r--modules/mail/e-mail-shell-settings.c174
-rw-r--r--modules/mail/e-mail-shell-view-actions.c16
-rw-r--r--modules/mail/em-mailer-prefs.c117
-rw-r--r--modules/mail/em-mailer-prefs.h3
-rw-r--r--modules/mailto-handler/evolution-mailto-handler.c3
-rw-r--r--modules/network-manager/Makefile.am1
-rw-r--r--modules/spamassassin/evolution-spamassassin.c38
25 files changed, 453 insertions, 390 deletions
diff --git a/modules/addressbook/autocompletion-config.c b/modules/addressbook/autocompletion-config.c
index 52a9195b44..985eafaff5 100644
--- a/modules/addressbook/autocompletion-config.c
+++ b/modules/addressbook/autocompletion-config.c
@@ -266,7 +266,7 @@ autocompletion_config_new (EPreferencesWindow *window)
EShell *shell;
EABConfig *eab;
EABConfigTargetPrefs *target;
- GConfClient *gconf;
+ GSettings *settings;
shell = e_preferences_window_get_shell (window);
@@ -291,14 +291,14 @@ autocompletion_config_new (EPreferencesWindow *window)
l = g_slist_prepend (l, &acc_items[ii]);
e_config_add_items ((EConfig *) eab, l, acc_free, shell);
- gconf = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
- target = eab_config_target_new_prefs (eab, gconf);
+ target = eab_config_target_new_prefs (eab, settings);
e_config_set_target ((EConfig *) eab, (EConfigTarget *) target);
toplevel = e_config_create_widget ((EConfig *) eab);
gtk_box_pack_start (GTK_BOX (vbox), toplevel, TRUE, TRUE, 0);
- g_object_unref (gconf);
+ g_object_unref (settings);
return vbox;
}
diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c
index 92341e4a3f..ab21d689fa 100644
--- a/modules/addressbook/e-book-shell-backend.c
+++ b/modules/addressbook/e-book-shell-backend.c
@@ -245,11 +245,10 @@ action_contact_new_cb (GtkAction *action,
{
EShell *shell;
EShellBackend *shell_backend;
- GConfClient *client;
+ GSettings *settings;
ESourceList *source_list;
ESource *source = NULL;
const gchar *action_name;
- const gchar *key;
gchar *uid;
/* This callback is used for both contacts and contact lists. */
@@ -260,9 +259,9 @@ action_contact_new_cb (GtkAction *action,
g_object_get (shell_backend, "source-list", &source_list, NULL);
g_return_if_fail (E_IS_SOURCE_LIST (source_list));
- client = e_shell_get_gconf_client (shell);
- key = "/apps/evolution/addressbook/display/primary_addressbook";
- uid = gconf_client_get_string (client, key, NULL);
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
+ uid = g_settings_get_string (settings, "primary-addressbook");
+ g_object_unref (settings);
if (uid != NULL) {
source = e_source_list_peek_source_by_uid (source_list, uid);
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c
index e8f2afd83b..f4c3d74784 100644
--- a/modules/addressbook/e-book-shell-content.c
+++ b/modules/addressbook/e-book-shell-content.c
@@ -28,7 +28,6 @@
#include <glib/gi18n.h>
#include "e-util/e-selection.h"
-#include "e-util/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/misc/e-paned.h"
#include "widgets/misc/e-preview-pane.h"
@@ -82,23 +81,18 @@ book_shell_content_restore_state_cb (EShellWindow *shell_window,
EShellContent *shell_content)
{
EBookShellContentPrivate *priv;
- GConfBridge *bridge;
- GObject *object;
- const gchar *key;
+ GSettings *settings;
priv = E_BOOK_SHELL_CONTENT (shell_content)->priv;
- /* Bind GObject properties to GConf keys. */
+ /* Bind GObject properties to GSettings keys. */
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
- object = G_OBJECT (priv->paned);
- key = "/apps/evolution/addressbook/display/hpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "hposition");
+ g_settings_bind (settings, "hpane-position", priv->paned, "hposition", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "vpane-position", priv->paned, "vposition", G_SETTINGS_BIND_DEFAULT);
- object = G_OBJECT (priv->paned);
- key = "/apps/evolution/addressbook/display/vpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "vposition");
+ g_object_unref (settings);
}
static GtkOrientation
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/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index a6aebe08a2..73736052ff 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -1147,10 +1147,9 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
EPreviewPane *preview_pane;
EWebView *web_view;
GtkActionGroup *action_group;
- GConfBridge *bridge;
+ GSettings *settings;
GtkAction *action;
GObject *object;
- const gchar *key;
shell_view = E_SHELL_VIEW (book_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
@@ -1206,21 +1205,20 @@ e_book_shell_view_actions_init (EBookShellView *book_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 GSettings keys. */
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
object = G_OBJECT (ACTION (CONTACT_PREVIEW));
- key = "/apps/evolution/addressbook/display/show_preview";
- gconf_bridge_bind_property (bridge, key, object, "active");
+ g_settings_bind (settings, "show-preview", object, "active", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (ACTION (CONTACT_VIEW_VERTICAL));
- key = "/apps/evolution/addressbook/display/layout";
- gconf_bridge_bind_property (bridge, key, object, "current-value");
+ g_settings_bind (settings, "layout", object, "current-value", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (ACTION (CONTACT_PREVIEW_SHOW_MAPS));
- key = "/apps/evolution/addressbook/display/preview_show_maps";
- gconf_bridge_bind_property (bridge, key, object, "active");
+ g_settings_bind (settings, "preview-show-maps", object, "active", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
/* Fine tuning. */
diff --git a/modules/bogofilter/evolution-bogofilter.c b/modules/bogofilter/evolution-bogofilter.c
index 1d0c99abd4..0b6340296a 100644
--- a/modules/bogofilter/evolution-bogofilter.c
+++ b/modules/bogofilter/evolution-bogofilter.c
@@ -23,7 +23,6 @@
#include <camel/camel.h>
-#include <e-util/gconf-bridge.h>
#include <mail/e-mail-junk-filter.h>
/* Standard GObject macros */
@@ -505,10 +504,14 @@ e_bogofilter_interface_init (CamelJunkFilterInterface *interface)
static void
e_bogofilter_init (EBogofilter *extension)
{
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/bogofilter/unicode",
- G_OBJECT (extension), "convert-to-unicode");
+ GSettings *settings;
+
+ settings = g_settings_new ("org.gnome.evolution.eplugin.bogo-junk");
+ g_settings_bind (
+ settings, "utf8-for-spam-filter",
+ G_OBJECT (extension), "convert-to-unicode",
+ G_SETTINGS_BIND_DEFAULT);
+ g_object_unref (settings);
}
G_MODULE_EXPORT void
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 5693994277..3e753904f3 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -901,18 +901,24 @@ e_cal_shell_backend_get_source_list (ECalShellBackend *cal_shell_backend)
GSList *
e_cal_shell_backend_get_selected_calendars (ECalShellBackend *cal_shell_backend)
{
- GConfClient *client;
- GSList *selected_calendars;
- const gchar *key;
+ GSettings *settings;
+ GSList *selected_calendars = NULL;
+ char **strv;
+ gint ii;
g_return_val_if_fail (
E_IS_CAL_SHELL_BACKEND (cal_shell_backend), NULL);
- client = gconf_client_get_default ();
- key = "/apps/evolution/calendar/display/selected_calendars";
- selected_calendars = gconf_client_get_list (
- client, key, GCONF_VALUE_STRING, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ strv = g_settings_get_strv (settings, "selected-calendars");
+ g_object_unref (settings);
+
+ if (strv != NULL) {
+ for (ii = 0; strv[ii] != NULL; ii++)
+ selected_calendars = g_slist_append (selected_calendars, g_strdup (strv[ii]));
+
+ g_strfreev (strv);
+ }
return selected_calendars;
}
@@ -921,16 +927,21 @@ void
e_cal_shell_backend_set_selected_calendars (ECalShellBackend *cal_shell_backend,
GSList *selected_calendars)
{
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
+ GSList *link;
+ GPtrArray *array = g_ptr_array_new ();
g_return_if_fail (E_IS_CAL_SHELL_BACKEND (cal_shell_backend));
- client = gconf_client_get_default ();
- key = "/apps/evolution/calendar/display/selected_calendars";
- gconf_client_set_list (
- client, key, GCONF_VALUE_STRING, selected_calendars, NULL);
- g_object_unref (client);
+ for (link = selected_calendars; link != NULL; link = link->next)
+ g_ptr_array_add (array, link->data);
+ g_ptr_array_add (array, NULL);
+
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ g_settings_set_strv (settings, "selected-calendars", (const gchar *const *) array->pdata);
+ g_object_unref (settings);
+
+ g_ptr_array_free (array, FALSE);
}
void
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 81fc76b3cb..e2e1ce58cf 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -28,7 +28,6 @@
#include <string.h>
#include <glib/gi18n.h>
-#include "e-util/gconf-bridge.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
#include "widgets/misc/e-selectable.h"
@@ -53,8 +52,6 @@ struct _ECalShellContentPrivate {
GtkWidget *memo_table;
GalViewInstance *view_instance;
-
- guint paned_binding_id;
};
enum {
@@ -111,32 +108,28 @@ cal_shell_content_notify_view_id_cb (ECalShellContent *cal_shell_content)
{
EShellContent *shell_content;
EShellView *shell_view;
- GConfBridge *bridge;
+ GSettings *settings;
GtkWidget *paned;
- guint binding_id;
const gchar *key;
const gchar *view_id;
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.calendar");
paned = cal_shell_content->priv->hpaned;
- binding_id = cal_shell_content->priv->paned_binding_id;
shell_content = E_SHELL_CONTENT (cal_shell_content);
shell_view = e_shell_content_get_shell_view (shell_content);
view_id = e_shell_view_get_view_id (shell_view);
- if (binding_id > 0)
- gconf_bridge_unbind (bridge, binding_id);
-
if (view_id != NULL && strcmp (view_id, "Month_View") == 0)
- key = "/apps/evolution/calendar/display/month_hpane_position";
+ key = "month-hpane-position";
else
- key = "/apps/evolution/calendar/display/hpane_position";
+ key = "hpane-position";
+
+ g_settings_unbind (settings, key);
- binding_id = gconf_bridge_bind_property_delayed (
- bridge, key, G_OBJECT (paned), "hposition");
+ g_settings_bind (settings, key, G_OBJECT (paned), "hposition", G_SETTINGS_BIND_DEFAULT);
- cal_shell_content->priv->paned_binding_id = binding_id;
+ g_object_unref (settings);
}
static gchar *
@@ -332,10 +325,9 @@ cal_shell_content_constructed (GObject *object)
EShellView *foreign_view;
GnomeCalendar *calendar;
GalViewInstance *view_instance;
- GConfBridge *bridge;
+ GSettings *settings;
GtkWidget *container;
GtkWidget *widget;
- const gchar *key;
gchar *markup;
gint ii;
@@ -521,11 +513,12 @@ cal_shell_content_constructed (GObject *object)
G_CALLBACK (cal_shell_content_notify_view_id_cb),
object);
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.calendar");
object = G_OBJECT (priv->vpaned);
- key = "/apps/evolution/calendar/display/tag_vpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "proportion");
+ g_settings_bind (settings, "tag-vpane-position", object, "proportion", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
}
if (memo_model)
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/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 77c5639a78..c73ca8ab77 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,11 +522,10 @@ 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;
- const gchar *key;
priv = E_CAL_SHELL_SIDEBAR (shell_sidebar)->priv;
@@ -585,13 +583,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_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (G_OBJECT (settings));
}
static void
diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c
index 85eddd9736..5578f39a2c 100644
--- a/modules/calendar/e-calendar-preferences.c
+++ b/modules/calendar/e-calendar-preferences.c
@@ -329,13 +329,13 @@ static void
notify_with_tray_toggled (GtkToggleButton *toggle,
ECalendarPreferences *prefs)
{
- GConfClient *gconf;
+ GSettings *settings;
g_return_if_fail (toggle != NULL);
- gconf = gconf_client_get_default ();
- gconf_client_set_bool (gconf, "/apps/evolution/calendar/notify/notify_with_tray", gtk_toggle_button_get_active (toggle), NULL);
- g_object_unref (gconf);
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ g_settings_set_boolean (settings, "notify-with-tray", gtk_toggle_button_get_active (toggle));
+ g_object_unref (settings);
}
static void
@@ -454,7 +454,7 @@ initialize_selection (ESourceSelector *selector,
static void
show_alarms_config (ECalendarPreferences *prefs)
{
- GConfClient *gconf;
+ GSettings *settings;
if (e_cal_client_get_sources (&prefs->alarms_list, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, NULL)) {
prefs->alarm_list_widget = e_source_selector_new (prefs->alarms_list);
@@ -464,9 +464,9 @@ show_alarms_config (ECalendarPreferences *prefs)
initialize_selection (E_SOURCE_SELECTOR (prefs->alarm_list_widget), prefs->alarms_list);
}
- gconf = gconf_client_get_default ();
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs->notify_with_tray), gconf_client_get_bool (gconf, "/apps/evolution/calendar/notify/notify_with_tray", NULL));
- g_object_unref (gconf);
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs->notify_with_tray), g_settings_get_boolean (settings, "notify-with-tray"));
+ g_object_unref (settings);
}
/* Shows the current config settings in the dialog. */
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index ed4e81d559..05b76cdd88 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -645,18 +645,25 @@ e_memo_shell_backend_get_source_list (EMemoShellBackend *memo_shell_backend)
GSList *
e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_backend)
{
- GConfClient *client;
- GSList *selected_memo_lists;
- const gchar *key;
+ GSettings *settings;
+ GSList *selected_memo_lists = NULL;
+ char **strv;
+ gint ii;
g_return_val_if_fail (
E_IS_MEMO_SHELL_BACKEND (memo_shell_backend), NULL);
- client = gconf_client_get_default ();
- key = "/apps/evolution/calendar/memos/selected_memos";
- selected_memo_lists = gconf_client_get_list (
- client, key, GCONF_VALUE_STRING, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ strv = g_settings_get_strv (settings, "selected-memos");
+ g_object_unref (settings);
+
+
+ if (strv != NULL) {
+ for (ii = 0; strv[ii] != NULL; ii++)
+ selected_memo_lists = g_slist_append (selected_memo_lists, g_strdup (strv[ii]));
+
+ g_strfreev (strv);
+ }
return selected_memo_lists;
}
@@ -665,14 +672,19 @@ void
e_memo_shell_backend_set_selected_memo_lists (EMemoShellBackend *memo_shell_backend,
GSList *selected_memo_lists)
{
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
+ GSList *link;
+ GPtrArray *array = g_ptr_array_new ();
g_return_if_fail (E_IS_MEMO_SHELL_BACKEND (memo_shell_backend));
- client = gconf_client_get_default ();
- key = "/apps/evolution/calendar/memos/selected_memos";
- gconf_client_set_list (
- client, key, GCONF_VALUE_STRING, selected_memo_lists, NULL);
- g_object_unref (client);
+ for (link = selected_memo_lists; link != NULL; link = link->next)
+ g_ptr_array_add (array, link->data);
+ g_ptr_array_add (array, NULL);
+
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ g_settings_set_strv (settings, "selected-memos", (const gchar *const *) array->pdata);
+ g_object_unref (settings);
+
+ g_ptr_array_free (array, FALSE);
}
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index f0f4fe958f..60936ccb8c 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -28,7 +28,6 @@
#include <glib/gi18n.h>
#include "e-util/e-selection.h"
-#include "e-util/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
@@ -273,23 +272,20 @@ memo_shell_content_restore_state_cb (EShellWindow *shell_window,
EShellContent *shell_content)
{
EMemoShellContentPrivate *priv;
- GConfBridge *bridge;
+ GSettings *settings;
GObject *object;
- const gchar *key;
priv = E_MEMO_SHELL_CONTENT (shell_content)->priv;
- /* 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/memo_hpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "hposition");
+ g_settings_bind (settings, "memo-hpane-position", object, "hposition", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (priv->paned);
- key = "/apps/evolution/calendar/display/memo_vpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "vposition");
+ g_settings_bind (settings, "memo-vpane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT);
}
static GtkOrientation
diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c
index d71b893fe3..3a0874616f 100644
--- a/modules/calendar/e-memo-shell-view-actions.c
+++ b/modules/calendar/e-memo-shell-view-actions.c
@@ -863,10 +863,9 @@ 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;
shell_view = E_SHELL_VIEW (memo_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
@@ -922,17 +921,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", G_SETTINGS_BIND_DEFAULT);
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_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (G_OBJECT (memo_settings));
/* Fine tuning. */
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index 2fc8ce1e5f..68545a287e 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -650,18 +650,24 @@ e_task_shell_backend_get_source_list (ETaskShellBackend *task_shell_backend)
GSList *
e_task_shell_backend_get_selected_task_lists (ETaskShellBackend *task_shell_backend)
{
- GConfClient *client;
- GSList *selected_task_lists;
- const gchar *key;
+ GSettings *settings;
+ GSList *selected_task_lists = NULL;
+ char **strv;
+ gint ii;
g_return_val_if_fail (
E_IS_TASK_SHELL_BACKEND (task_shell_backend), NULL);
- client = gconf_client_get_default ();
- key = "/apps/evolution/calendar/tasks/selected_tasks";
- selected_task_lists = gconf_client_get_list (
- client, key, GCONF_VALUE_STRING, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ strv = g_settings_get_strv (settings, "selected-tasks");
+ g_object_unref (G_OBJECT (settings));
+
+ if (strv != NULL) {
+ for (ii = 0; strv[ii] != NULL; ii++)
+ selected_task_lists = g_slist_append (selected_task_lists, g_strdup (strv[ii]));
+
+ g_strfreev (strv);
+ }
return selected_task_lists;
}
@@ -670,14 +676,19 @@ void
e_task_shell_backend_set_selected_task_lists (ETaskShellBackend *task_shell_backend,
GSList *selected_task_lists)
{
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
+ GSList *link;
+ GPtrArray *array = g_ptr_array_new ();
g_return_if_fail (E_IS_TASK_SHELL_BACKEND (task_shell_backend));
- client = gconf_client_get_default ();
- key = "/apps/evolution/calendar/tasks/selected_tasks";
- gconf_client_set_list (
- client, key, GCONF_VALUE_STRING, selected_task_lists, NULL);
- g_object_unref (client);
+ for (link = selected_task_lists; link != NULL; link = link->next)
+ g_ptr_array_add (array, link->data);
+ g_ptr_array_add (array, NULL);
+
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ g_settings_set_strv (settings, "selected-tasks", (const gchar *const *) array->pdata);
+ g_object_unref (settings);
+
+ g_ptr_array_free (array, FALSE);
}
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 743bb937e7..cb2443f19d 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -28,7 +28,6 @@
#include <glib/gi18n.h>
#include "e-util/e-selection.h"
-#include "e-util/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
@@ -271,23 +270,22 @@ task_shell_content_restore_state_cb (EShellWindow *shell_window,
EShellContent *shell_content)
{
ETaskShellContentPrivate *priv;
- GConfBridge *bridge;
+ GSettings *settings;
GObject *object;
- const gchar *key;
priv = E_TASK_SHELL_CONTENT (shell_content)->priv;
- /* 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/task_hpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "hposition");
+ g_settings_bind (settings, "task-hpane-position", object, "hposition", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (priv->paned);
- key = "/apps/evolution/calendar/display/task_vpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "vposition");
+ g_settings_bind (settings, "task-vpane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (G_OBJECT (settings));
}
static GtkOrientation
diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c
index 2fe28494ac..c7e91d2955 100644
--- a/modules/calendar/e-task-shell-view-actions.c
+++ b/modules/calendar/e-task-shell-view-actions.c
@@ -1062,10 +1062,9 @@ 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;
shell_view = E_SHELL_VIEW (task_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
@@ -1121,17 +1120,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", G_SETTINGS_BIND_DEFAULT);
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", object, "current-value", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (G_OBJECT (settings));
/* Fine tuning. */
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index b729a00832..5ea75ee5b4 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -476,17 +476,15 @@ mail_shell_backend_delete_junk_policy_decision (EMailBackend *backend)
{
EShell *shell;
EShellSettings *shell_settings;
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
gboolean delete_junk;
gint empty_date;
gint empty_days;
gint now;
- GError *error = NULL;
shell = e_shell_backend_get_shell (E_SHELL_BACKEND (backend));
- client = e_shell_get_gconf_client (shell);
+ settings = g_settings_new ("org.gnome.evolution.mail");
shell_settings = e_shell_get_shell_settings (shell);
now = time (NULL) / 60 / 60 / 24;
@@ -499,32 +497,18 @@ mail_shell_backend_delete_junk_policy_decision (EMailBackend *backend)
empty_date = empty_days = 0;
if (delete_junk) {
- key = "/apps/evolution/mail/junk/empty_on_exit_days";
- empty_days = gconf_client_get_int (client, key, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- return FALSE;
- }
- }
-
- if (delete_junk) {
- key = "/apps/evolution/mail/junk/empty_date";
- empty_date = gconf_client_get_int (client, key, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- return FALSE;
- }
+ empty_days = g_settings_get_int (settings, "junk-empty-on-exit-days");
+ empty_date = g_settings_get_int (settings, "junk-empty-date");
}
delete_junk &= (empty_days == 0) || (empty_date + empty_days <= now);
if (delete_junk) {
- key = "/apps/evolution/mail/junk/empty_date";
- gconf_client_set_int (client, key, now, NULL);
+ g_settings_set_int (settings, "junk-empty-date", now);
}
+ g_object_unref (settings);
+
return delete_junk;
}
@@ -533,17 +517,15 @@ mail_shell_backend_empty_trash_policy_decision (EMailBackend *backend)
{
EShell *shell;
EShellSettings *shell_settings;
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
gboolean empty_trash;
gint empty_date;
gint empty_days;
gint now;
- GError *error = NULL;
shell = e_shell_backend_get_shell (E_SHELL_BACKEND (backend));
- client = e_shell_get_gconf_client (shell);
+ settings = g_settings_new ("org.gnome.evolution.mail");
shell_settings = e_shell_get_shell_settings (shell);
now = time (NULL) / 60 / 60 / 24;
@@ -556,32 +538,18 @@ mail_shell_backend_empty_trash_policy_decision (EMailBackend *backend)
empty_date = empty_days = 0;
if (empty_trash) {
- key = "/apps/evolution/mail/trash/empty_on_exit_days";
- empty_days = gconf_client_get_int (client, key, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- return FALSE;
- }
- }
-
- if (empty_trash) {
- key = "/apps/evolution/mail/trash/empty_date";
- empty_date = gconf_client_get_int (client, key, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- return FALSE;
- }
+ empty_days = g_settings_get_int (settings, "trash-empty-on-exit-days");
+ empty_date = g_settings_get_int (settings, "trash-empty-date");
}
empty_trash &= (empty_days == 0) || (empty_date + empty_days <= now);
if (empty_trash) {
- key = "/apps/evolution/mail/trash/empty_date";
- gconf_client_set_int (client, key, now, NULL);
+ g_settings_set_int (settings, "trash-empty-date", now);
}
+ g_object_unref (settings);
+
return empty_trash;
}
diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c
index 6b0cee6826..7fe3fc0342 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,243 +97,301 @@ 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-sign-reply-if-signed",
+ MAIL_SCHEMA,
"/apps/evolution/mail/composer/sign_reply_if_signed");
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/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 82204ec85b..2427fc1ffd 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -378,7 +378,7 @@ action_mail_folder_mark_all_as_read_cb (GtkAction *action,
backend = E_MAIL_BACKEND (shell_backend);
session = e_mail_backend_get_session (backend);
cache = e_mail_session_get_folder_cache (session);
- key = "/apps/evolution/mail/prompts/mark_all_read";
+ key = "prompt-on-mark-all-read";
if (mail_folder_cache_get_folder_has_children (cache, folder, NULL))
prompt = "mail:ask-mark-all-read-sub";
@@ -1633,7 +1633,7 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
EMailView *mail_view;
GtkActionGroup *action_group;
GtkAction *action;
- GConfBridge *bridge;
+ GSettings *settings;
GObject *object;
const gchar *key;
@@ -1691,17 +1691,17 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
g_object_set (ACTION (MAIL_SEND_RECEIVE), "is-important", TRUE, NULL);
- /* Bind GObject properties for GConf keys. */
+ /* Bind GObject properties for GSettings keys. */
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
object = G_OBJECT (ACTION (MAIL_SHOW_DELETED));
- key = "/apps/evolution/mail/display/show_deleted";
- gconf_bridge_bind_property (bridge, key, object, "active");
+ g_settings_bind (settings, "show-deleted", object, "active", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (ACTION (MAIL_VIEW_VERTICAL));
- key = "/apps/evolution/mail/display/layout";
- gconf_bridge_bind_property (bridge, key, object, "current-value");
+ g_settings_bind (settings, "layout", object, "current-value", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
/* Fine tuning. */
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 290e189e4b..da715f3a7d 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -33,8 +33,6 @@
#include <gtkhtml/gtkhtml-properties.h>
#include <libxml/tree.h>
-#include <gconf/gconf-client.h>
-
#include "libedataserverui/e-cell-renderer-color.h"
#include <e-util/e-util.h>
@@ -106,13 +104,7 @@ em_mailer_prefs_finalize (GObject *object)
g_object_unref (prefs->builder);
- if (prefs->labels_change_notify_id) {
- gconf_client_notify_remove (prefs->gconf, prefs->labels_change_notify_id);
-
- prefs->labels_change_notify_id = 0;
- }
-
- g_object_unref (prefs->gconf);
+ g_object_unref (prefs->settings);
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (em_mailer_prefs_parent_class)->finalize (object);
@@ -130,7 +122,7 @@ em_mailer_prefs_class_init (EMMailerPrefsClass *class)
static void
em_mailer_prefs_init (EMMailerPrefs *preferences)
{
- preferences->gconf = gconf_client_get_default ();
+ preferences->settings = g_settings_new ("org.gnome.evolution.mail");
}
enum {
@@ -142,13 +134,16 @@ static void
jh_tree_refill (EMMailerPrefs *prefs)
{
GtkListStore *store = prefs->junk_header_list_store;
- GSList *l, *cjh = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
+ gchar **strv;
+ gint ii;
+
+ strv = g_settings_get_strv (prefs->settings, "junk-custom-header");
gtk_list_store_clear (store);
- for (l = cjh; l; l = l->next) {
+ for (ii = 0; strv[ii] != NULL; ii++) {
GtkTreeIter iter;
- gchar **tokens = g_strsplit (l->data, "=", 2);
+ gchar **tokens = g_strsplit (strv[ii], "=", 2);
gtk_list_store_append (store, &iter);
gtk_list_store_set (
@@ -159,8 +154,7 @@ jh_tree_refill (EMMailerPrefs *prefs)
g_strfreev (tokens);
}
- g_slist_foreach (cjh, (GFunc) g_free, NULL);
- g_slist_free (cjh);
+ g_strfreev (strv);
}
static void
@@ -191,7 +185,6 @@ jh_add_cb (GtkWidget *widget,
GtkBuilder *builder = gtk_builder_new ();
gchar *tok;
const gchar *name, *value;
- GSList *list;
e_load_ui_builder_definition (builder, "mail-config.ui");
dialog = e_builder_get_widget (builder, "add-custom-junk-header");
@@ -205,16 +198,24 @@ jh_add_cb (GtkWidget *widget,
G_CALLBACK (jh_dialog_entry_changed_cb), builder);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
+ gchar **strv;
+ GPtrArray *array;
+ gint ii;
+
name = gtk_entry_get_text (GTK_ENTRY (e_builder_get_widget (builder, "junk-header-name")));
value = gtk_entry_get_text (GTK_ENTRY (e_builder_get_widget (builder, "junk-header-content")));
- list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
+ strv = g_settings_get_strv (prefs->settings, "junk-custom-header");
+ array = g_ptr_array_new ();
+ for (ii = 0; strv[ii] != NULL; ii++)
+ g_ptr_array_add (array, strv[ii]);
tok = g_strdup_printf ("%s=%s", name, value);
- list = g_slist_append (list, tok);
- gconf_client_set_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, list, NULL);
+ g_ptr_array_add (array, tok);
+ g_ptr_array_add (array, NULL);
+ g_settings_set_strv (prefs->settings, "junk-custom-header", (const gchar * const*) array->pdata);
- g_slist_foreach (list, (GFunc) g_free, NULL);
- g_slist_free (list);
+ g_ptr_array_free (array, TRUE);
+ g_strfreev (strv);
}
g_object_unref (builder);
@@ -236,39 +237,33 @@ jh_remove_cb (GtkWidget *widget,
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (prefs->junk_header_tree));
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+ GPtrArray *array = g_ptr_array_new ();
gchar *name = NULL, *value = NULL;
- GSList *prev = NULL, *node, *list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
+ gchar **strv;
+ gint ii;
+
+ strv = g_settings_get_strv (prefs->settings, "junk-custom-header");
gtk_tree_model_get (model, &iter, JH_LIST_COLUMN_NAME, &name, JH_LIST_COLUMN_VALUE, &value, -1);
- node = list;
- while (node) {
+ for (ii = 0; strv[ii] != NULL; ii++) {
gchar *test;
gint len = strlen (name);
- test = strncmp (node->data, name, len) == 0 ? (gchar *) node->data + len : NULL;
+ test = strncmp (strv[ii], name, len) == 0 ? (gchar *) strv[ii] + len : NULL;
if (test) {
test++;
if (strcmp (test, value) == 0)
- break;
+ continue;
}
- prev = node;
- node = node->next;
+ g_ptr_array_add (array, strv[ii]);
}
- if (prev && !node) {
- /* Not found. So what? */
- } else if (prev && node) {
- prev->next = node->next;
- g_free (node->data);
- } else if (!prev && node) {
- list = list->next;
- g_free (node->data);
- }
+ g_ptr_array_add (array, NULL);
- gconf_client_set_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, list, NULL);
+ g_settings_set_strv (prefs->settings, "junk-custom-header", (const gchar * const*) array->pdata);
- g_slist_foreach (list, (GFunc) g_free, NULL);
- g_slist_free (list);
+ g_strfreev (strv);
+ g_ptr_array_free (array, TRUE);
g_free (name);
g_free (value);
@@ -494,7 +489,7 @@ toggle_button_toggled (GtkToggleButton *toggle,
const gchar *key;
key = g_object_get_data ((GObject *) toggle, "key");
- gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
+ g_settings_set_boolean (prefs->settings, key, gtk_toggle_button_get_active (toggle));
}
static void
@@ -531,7 +526,7 @@ toggle_button_init (EMMailerPrefs *prefs,
{
gboolean bool;
- bool = gconf_client_get_bool (prefs->gconf, key, NULL);
+ bool = g_settings_get_boolean (prefs->settings, key);
gtk_toggle_button_set_active (toggle, not ? !bool : bool);
if (toggled) {
@@ -539,8 +534,8 @@ toggle_button_init (EMMailerPrefs *prefs,
g_signal_connect (toggle, "toggled", toggled, prefs);
}
- if (!gconf_client_key_is_writable (prefs->gconf, key, NULL))
- gtk_widget_set_sensitive ((GtkWidget *) toggle, FALSE);
+ if (!g_settings_is_writable (prefs->settings, key))
+ gtk_widget_set_sensitive (GTK_WIDGET (toggle), FALSE);
}
static void
@@ -553,10 +548,10 @@ trash_days_changed (GtkComboBox *combo_box,
g_return_if_fail (index >= 0);
g_return_if_fail (index < G_N_ELEMENTS (empty_trash_frequency));
- gconf_client_set_int (
- prefs->gconf,
- "/apps/evolution/mail/trash/empty_on_exit_days",
- empty_trash_frequency[index].days, NULL);
+ g_settings_set_int (
+ prefs->settings,
+ "trash-empty-on-exit-days",
+ empty_trash_frequency[index].days);
}
static void
@@ -567,9 +562,9 @@ emmp_empty_trash_init (EMMailerPrefs *prefs,
GtkListStore *store;
GtkTreeIter iter;
- days = gconf_client_get_int (
- prefs->gconf,
- "/apps/evolution/mail/trash/empty_on_exit_days", NULL);
+ days = g_settings_get_int (
+ prefs->settings,
+ "trash-empty-on-exit-days");
store = GTK_LIST_STORE (gtk_combo_box_get_model (combo_box));
gtk_list_store_clear (store);
@@ -601,10 +596,10 @@ junk_days_changed (GtkComboBox *combo_box,
g_return_if_fail (index >= 0);
g_return_if_fail (index < G_N_ELEMENTS (empty_trash_frequency));
- gconf_client_set_int (
- prefs->gconf,
- "/apps/evolution/mail/junk/empty_on_exit_days",
- empty_trash_frequency[index].days, NULL);
+ g_settings_set_int (
+ prefs->settings,
+ "junk-empty-on-exit-days",
+ empty_trash_frequency[index].days);
}
static void
@@ -615,9 +610,9 @@ emmp_empty_junk_init (EMMailerPrefs *prefs,
GtkListStore *store;
GtkTreeIter iter;
- days = gconf_client_get_int (
- prefs->gconf,
- "/apps/evolution/mail/junk/empty_on_exit_days", NULL);
+ days = g_settings_get_int (
+ prefs->settings,
+ "junk-empty-on-exit-days");
store = GTK_LIST_STORE (gtk_combo_box_get_model (combo_box));
gtk_list_store_clear (store);
@@ -652,7 +647,7 @@ http_images_changed (GtkWidget *widget,
else
policy = E_MAIL_IMAGE_LOADING_POLICY_NEVER;
- gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", policy, NULL);
+ g_settings_set_int (prefs->settings, "load-http-images", policy);
}
static GtkWidget *
@@ -870,9 +865,9 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
/* HTML Mail tab */
/* Loading Images */
- locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/load_http_images", NULL);
+ locked = !g_settings_is_writable (prefs->settings, "load-http-images");
- val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", NULL);
+ val = g_settings_get_int (prefs->settings, "load-http-images");
prefs->images_never = GTK_TOGGLE_BUTTON (e_builder_get_widget (prefs->builder, "radImagesNever"));
gtk_toggle_button_set_active (prefs->images_never, val == E_MAIL_IMAGE_LOADING_POLICY_NEVER);
if (locked)
diff --git a/modules/mail/em-mailer-prefs.h b/modules/mail/em-mailer-prefs.h
index 35ebec3bf7..b8e01b360d 100644
--- a/modules/mail/em-mailer-prefs.h
+++ b/modules/mail/em-mailer-prefs.h
@@ -24,7 +24,6 @@
#define EM_MAILER_PREFS_H
#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
#include <shell/e-shell.h>
#include <widgets/misc/e-preferences-window.h>
@@ -57,6 +56,7 @@ struct _EMMailerPrefs {
GtkBuilder *builder;
GConfClient *gconf;
+ GSettings *settings;
/* General tab */
@@ -81,7 +81,6 @@ struct _EMMailerPrefs {
GtkWidget *label_remove;
GtkWidget *label_tree;
GtkListStore *label_list_store;
- guint labels_change_notify_id; /* mail_config's notify id */
/* Headers tab */
GtkButton *add_header;
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/modules/network-manager/Makefile.am b/modules/network-manager/Makefile.am
index 81b61ac864..2d87b22acf 100644
--- a/modules/network-manager/Makefile.am
+++ b/modules/network-manager/Makefile.am
@@ -6,6 +6,7 @@ libevolution_module_network_manager_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"evolution-network-manager\" \
$(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
+ $(SHELL_CFLAGS) \
$(NM_CFLAGS)
libevolution_module_network_manager_la_SOURCES = \
diff --git a/modules/spamassassin/evolution-spamassassin.c b/modules/spamassassin/evolution-spamassassin.c
index b578acf228..a628753aba 100644
--- a/modules/spamassassin/evolution-spamassassin.c
+++ b/modules/spamassassin/evolution-spamassassin.c
@@ -25,7 +25,6 @@
#include <shell/e-shell.h>
#include <e-util/e-mktemp.h>
-#include <e-util/gconf-bridge.h>
#include <mail/e-mail-junk-filter.h>
/* Standard GObject macros */
@@ -1074,7 +1073,7 @@ e_spam_assassin_class_init (ESpamAssassinClass *class)
junk_filter_class->available = spam_assassin_available;
junk_filter_class->new_config_widget = spam_assassin_new_config_widget;
- /* XXX Argh, the boolean sense of the GConf key is inverted from
+ /* XXX Argh, the boolean sense of the GSettings key is inverted from
* that of the checkbox widget. The checkbox wording is more
* natural, but GConfBridge doesn't support transform functions
* so the property has to match the sense of the GConf key. */
@@ -1146,36 +1145,23 @@ e_spam_assassin_interface_init (CamelJunkFilterInterface *interface)
static void
e_spam_assassin_init (ESpamAssassin *extension)
{
+ GSettings *settings;
+
extension->socket_path_mutex = g_mutex_new ();
/* XXX Once we move to GSettings these probably don't
* need to be properties anymore. GConfBridge is
* just easier to deal with than GConfClient. */
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/local_only",
- G_OBJECT (extension), "local-only");
-
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/spamc_binary",
- G_OBJECT (extension), "spamc-binary");
-
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/spamd_binary",
- G_OBJECT (extension), "spamd-binary");
-
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/socket_path",
- G_OBJECT (extension), "socket-path");
-
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/use_daemon",
- G_OBJECT (extension), "use-daemon");
+ settings = g_settings_new ("org.gnome.evolution.mail");
+
+ g_settings_bind (settings, "junk-sa-local-only", G_OBJECT (extension), "local-only", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "junk-sa-spamc-binary", G_OBJECT (extension), "spamc-binary", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "junk-sa-spamd-binary", G_OBJECT (extension), "spamd-binary", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "junk-sa-socjet-path", G_OBJECT (extension), "socket-path", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "junk-sa-use-daemon", G_OBJECT (extension), "use-daemon", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
if (extension->spamc_binary == NULL)
extension->spamc_binary = g_strdup (SPAMC_BINARY);