aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-11-23 09:48:44 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-11-23 09:48:44 +0800
commit9918361aef9ad1360a0ed3a240cc58d6cd9e30f8 (patch)
tree50bf24934b5ab3fefcc27913d1855a27c75e6d40
parentfa1bb9a17e11cf12ce02d9b49bba2753f6020ea0 (diff)
parente64d6fe05c30c2cc1d7625a202afba3ba2da07cd (diff)
downloadgsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.gz
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.bz2
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.lz
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.xz
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.zst
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.zip
Merge branch 'wip/gsettings'
-rw-r--r--addressbook/gui/contact-editor/Makefile.am1
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c18
-rw-r--r--addressbook/gui/widgets/eab-config.c12
-rw-r--r--addressbook/gui/widgets/eab-config.h7
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c3
-rw-r--r--calendar/gui/alarm-notify/alarm.c1
-rw-r--r--calendar/gui/alarm-notify/alarm.h1
-rw-r--r--calendar/gui/alarm-notify/config-data.c128
-rw-r--r--calendar/gui/alarm-notify/config-data.h2
-rw-r--r--calendar/gui/calendar-config.c90
-rw-r--r--calendar/gui/calendar-config.h13
-rw-r--r--calendar/gui/calendar-view-factory.c1
-rw-r--r--calendar/gui/calendar-view.c1
-rw-r--r--calendar/gui/comp-util.c1
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c1
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c1
-rw-r--r--calendar/gui/dialogs/cancel-comp.c1
-rw-r--r--calendar/gui/dialogs/changed-comp.c1
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c1
-rw-r--r--calendar/gui/dialogs/comp-editor.c39
-rw-r--r--calendar/gui/dialogs/delete-comp.c1
-rw-r--r--calendar/gui/dialogs/delete-error.c1
-rw-r--r--calendar/gui/dialogs/recur-comp.c1
-rw-r--r--calendar/gui/dialogs/send-comp.c1
-rw-r--r--calendar/gui/e-cal-config.c6
-rw-r--r--calendar/gui/e-cal-config.h2
-rw-r--r--calendar/gui/e-day-view-time-item.c21
-rw-r--r--calendar/gui/e-week-view.c43
-rw-r--r--calendar/gui/gnome-cal.c7
-rw-r--r--calendar/gui/itip-utils.c10
-rw-r--r--calendar/importers/icalendar-importer.c16
-rw-r--r--capplet/settings/mail-account-view.c43
-rw-r--r--composer/e-composer-header-table.c56
-rw-r--r--composer/e-composer-private.c43
-rw-r--r--composer/e-composer-private.h33
-rw-r--r--composer/e-msg-composer.c103
-rw-r--r--configure.ac2
-rw-r--r--data/Makefile.am33
-rw-r--r--data/evolution.convert282
-rw-r--r--data/org.gnome.evolution.addressbook.gschema.xml.in54
-rw-r--r--data/org.gnome.evolution.bogofilter.gschema.xml.in9
-rw-r--r--data/org.gnome.evolution.calendar.gschema.xml.in319
-rw-r--r--data/org.gnome.evolution.gschema.xml.in19
-rw-r--r--data/org.gnome.evolution.importer.gschema.xml.in14
-rw-r--r--data/org.gnome.evolution.mail.gschema.xml.in619
-rw-r--r--data/org.gnome.evolution.plugin.attachment-reminder.gschema.xml.in9
-rw-r--r--data/org.gnome.evolution.plugin.autocontacts.gschema.xml.in39
-rw-r--r--data/org.gnome.evolution.plugin.email-custom-header.gschema.xml.in9
-rw-r--r--data/org.gnome.evolution.plugin.external-editor.gschema.xml.in14
-rw-r--r--data/org.gnome.evolution.plugin.face-picture.gschema.xml.in9
-rw-r--r--data/org.gnome.evolution.plugin.itip.gschema.xml.in9
-rw-r--r--data/org.gnome.evolution.plugin.mail-notification.gschema.xml.in49
-rw-r--r--data/org.gnome.evolution.plugin.prefer-plain.gschema.xml.in14
-rw-r--r--data/org.gnome.evolution.plugin.templates.gschema.xml.in9
-rw-r--r--data/org.gnome.evolution.shell.gschema.xml.in94
-rw-r--r--data/org.gnome.evolution.spamassassin.gschema.xml.in29
-rw-r--r--e-util/e-datetime-format.c4
-rw-r--r--e-util/e-plugin.c37
-rw-r--r--e-util/e-signature-list.c11
-rw-r--r--e-util/e-signature-list.h5
-rw-r--r--e-util/e-signature-utils.c10
-rw-r--r--e-util/e-signature.c1
-rw-r--r--e-util/e-util.c2
-rw-r--r--em-format/em-format-quote.c11
-rw-r--r--em-format/em-format.c13
-rw-r--r--help/C/mail-error-failed-to-append-to-sent-folder.page32
-rw-r--r--help/C/mail-error-folder-mismatch.page52
-rw-r--r--help/C/mail-error-no-provider-available.page49
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c1
-rw-r--r--libgnomecanvas/gnome-canvas-text.c1
-rw-r--r--mail/e-mail-attachment-bar.c15
-rw-r--r--mail/e-mail-browser.c11
-rw-r--r--mail/e-mail-label-list-store.c125
-rw-r--r--mail/e-mail-paned-view.c23
-rw-r--r--mail/e-mail-reader.c95
-rw-r--r--mail/e-mail-session.c98
-rw-r--r--mail/em-account-editor.c121
-rw-r--r--mail/em-composer-utils.c81
-rw-r--r--mail/em-config.c1
-rw-r--r--mail/em-folder-properties.c12
-rw-r--r--mail/em-subscription-editor.c45
-rw-r--r--mail/em-utils.c33
-rw-r--r--mail/mail-autoconfig/Makefile.am2
-rw-r--r--mail/mail-config.c200
-rw-r--r--mail/mail-config.ui1
-rw-r--r--mail/mail-vfolder.c12
-rw-r--r--mail/message-list.c70
-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/addressbook/e-book-shell-view-private.c4
-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.c41
-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.c176
-rw-r--r--modules/mail/e-mail-shell-view-actions.c17
-rw-r--r--modules/mail/em-mailer-prefs.c139
-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/online-accounts/e-online-accounts-google.c2
-rw-r--r--modules/spamassassin/evolution-spamassassin.c55
-rw-r--r--plugins/attachment-reminder/attachment-reminder.c57
-rw-r--r--plugins/bbdb/bbdb.c141
-rw-r--r--plugins/bbdb/bbdb.h16
-rw-r--r--plugins/bbdb/gaimbuddies.c29
-rw-r--r--plugins/external-editor/external-editor.c52
-rw-r--r--plugins/face/face.c14
-rw-r--r--plugins/itip-formatter/itip-formatter.c27
-rw-r--r--plugins/mail-notification/mail-notification.c112
-rw-r--r--plugins/mail-to-task/mail-to-task.c8
-rw-r--r--plugins/mark-all-read/mark-all-read.c1
-rw-r--r--plugins/prefer-plain/prefer-plain.c27
-rw-r--r--plugins/pst-import/pst-importer.c9
-rw-r--r--plugins/save-calendar/rdf-format.c10
-rw-r--r--plugins/templates/templates.c38
-rw-r--r--shell/e-shell-backend.c11
-rw-r--r--shell/e-shell-migrate.c30
-rw-r--r--shell/e-shell-searchbar.c9
-rw-r--r--shell/e-shell-settings.c229
-rw-r--r--shell/e-shell-settings.h3
-rw-r--r--shell/e-shell-sidebar.c17
-rw-r--r--shell/e-shell-switcher.c19
-rw-r--r--shell/e-shell-taskbar.c11
-rw-r--r--shell/e-shell-view.c11
-rw-r--r--shell/e-shell-window-private.c58
-rw-r--r--shell/e-shell-window-private.h4
-rw-r--r--shell/e-shell-window.c3
-rw-r--r--shell/e-shell.c25
-rw-r--r--shell/main.c68
-rw-r--r--widgets/misc/e-attachment-paned.c14
-rw-r--r--widgets/misc/e-attachment.c14
-rw-r--r--widgets/table/e-table-field-chooser-item.c3
-rw-r--r--widgets/table/e-table-header-utils.c2
146 files changed, 3526 insertions, 1955 deletions
diff --git a/addressbook/gui/contact-editor/Makefile.am b/addressbook/gui/contact-editor/Makefile.am
index 254af85207..9c1e553400 100644
--- a/addressbook/gui/contact-editor/Makefile.am
+++ b/addressbook/gui/contact-editor/Makefile.am
@@ -34,6 +34,7 @@ libecontacteditor_la_LIBADD = \
$(top_builddir)/addressbook/gui/merging/libeabbookmerging.la \
$(top_builddir)/addressbook/printing/libecontactprint.la \
$(top_builddir)/widgets/menus/libmenus.la \
+ $(EVOLUTION_ADDRESSBOOK_LIBS) \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS)
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 28b5b636fe..9ad6fc0612 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2302,26 +2302,16 @@ set_address_label (EContact *contact,
{
gchar *address_label = NULL;
gboolean format_address;
- GConfClient *client;
- GConfValue *value;
+ GSettings *settings;
if (!address) {
e_contact_set (contact, field, NULL);
return;
}
-
- client = gconf_client_get_default ();
- value = gconf_client_get (client,
- "/apps/evolution/addressbook/display/address_formatting", NULL);
- g_object_unref (client);
-
- if (value) {
- format_address = gconf_value_get_bool (value);
- gconf_value_free (value);
- } else {
- format_address = TRUE;
- }
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
+ format_address = g_settings_get_boolean (settings, "address-formatting");
+ g_object_unref (settings);
if (format_address) {
address_label = eab_format_address (contact,
diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c
index e1a0501203..6974df22d1 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -70,8 +70,8 @@ ecp_target_free (EConfig *ec,
case EAB_CONFIG_TARGET_PREFS: {
EABConfigTargetPrefs *s = (EABConfigTargetPrefs *) t;
- if (s->gconf)
- g_object_unref (s->gconf);
+ if (s->settings)
+ g_object_unref (s->settings);
break; }
}
@@ -163,15 +163,15 @@ eab_config_target_new_source (EABConfig *ecp,
EABConfigTargetPrefs *
eab_config_target_new_prefs (EABConfig *ecp,
- GConfClient *gconf)
+ GSettings *settings)
{
EABConfigTargetPrefs *t = e_config_target_new (
&ecp->config, EAB_CONFIG_TARGET_PREFS, sizeof (*t));
- if (gconf)
- t->gconf = g_object_ref (gconf);
+ if (settings)
+ t->settings = g_object_ref (settings);
else
- t->gconf = NULL;
+ t->settings = NULL;
return t;
}
diff --git a/addressbook/gui/widgets/eab-config.h b/addressbook/gui/widgets/eab-config.h
index 70023360e0..36134c08e7 100644
--- a/addressbook/gui/widgets/eab-config.h
+++ b/addressbook/gui/widgets/eab-config.h
@@ -24,7 +24,6 @@
#ifndef __EAB_CONFIG_H__
#define __EAB_CONFIG_H__
-#include <gconf/gconf-client.h>
#include <libedataserver/e-source.h>
#include "e-util/e-config.h"
@@ -65,8 +64,8 @@ typedef struct _EABConfigTargetPrefs EABConfigTargetPrefs;
struct _EABConfigTargetPrefs {
EConfigTarget target;
- /* preferences are global from gconf */
- GConfClient *gconf;
+ /* preferences are global from GSettings */
+ GSettings *settings;
};
typedef struct _EConfigItem EABConfigItem;
@@ -75,7 +74,7 @@ GType eab_config_get_type (void);
EABConfig *eab_config_new (gint type, const gchar *menuid);
EABConfigTargetSource *eab_config_target_new_source (EABConfig *ecp, ESource *source);
-EABConfigTargetPrefs *eab_config_target_new_prefs (EABConfig *ecp, GConfClient *gconf);
+EABConfigTargetPrefs *eab_config_target_new_prefs (EABConfig *ecp, GSettings *settings);
G_END_DECLS
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 4f04974b33..eeca88e1b6 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -106,7 +106,8 @@ process_removal_in_hash (const gchar *uri,
}
static gint
-find_slist_source_uri_cb (gconstpointer a, gconstpointer b)
+find_slist_source_uri_cb (gconstpointer a,
+ gconstpointer b)
{
ESource *asource = (ESource *) a;
const gchar *buri = b;
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index a05498532b..2797d44b0a 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -36,7 +36,6 @@
#include "alarm.h"
#include "config-data.h"
-
/* Our glib timeout */
static guint timeout_id;
diff --git a/calendar/gui/alarm-notify/alarm.h b/calendar/gui/alarm-notify/alarm.h
index 54a6e4c720..d6e9ff4a4e 100644
--- a/calendar/gui/alarm-notify/alarm.h
+++ b/calendar/gui/alarm-notify/alarm.h
@@ -29,7 +29,6 @@
#include <time.h>
#include <glib.h>
-
typedef void (* AlarmFunction) (gpointer alarm_id, time_t trigger, gpointer data);
typedef void (* AlarmDestroyNotify) (gpointer alarm_id, gpointer data);
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index 567ca69c09..c8348f89fc 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -30,14 +30,11 @@
#include <libedataserver/e-source-list.h>
#include "config-data.h"
-#define KEY_LAST_NOTIFICATION_TIME \
- "/apps/evolution/calendar/notify/last_notification_time"
-#define KEY_PROGRAMS "/apps/evolution/calendar/notify/programs"
-
/* Whether we have initied ourselves by reading
* the data from the configuration engine. */
static gboolean inited = FALSE;
static GConfClient *conf_client = NULL;
+static GSettings *calendar_settings = NULL;
static ESourceList *calendar_source_list = NULL, *tasks_source_list = NULL;
/* Copied from ../calendar-config.c; returns whether the locale has 'am' and
@@ -69,6 +66,9 @@ do_cleanup (void)
g_object_unref (conf_client);
conf_client = NULL;
+ g_object_unref (calendar_settings);
+ calendar_settings = FALSE;
+
inited = FALSE;
}
@@ -87,6 +87,8 @@ ensure_inited (void)
return;
}
+ calendar_settings = g_settings_new ("org.gnome.evolution.calendar");
+
g_atexit ((GVoidFunc) do_cleanup);
/* load the sources for calendars and tasks */
@@ -104,8 +106,10 @@ config_data_get_calendars (const gchar *key)
gboolean state;
GSList *gconf_list;
- if (!inited)
+ if (!inited) {
conf_client = gconf_client_get_default ();
+ calendar_settings = g_settings_new ("org.gnome.evolution.calendar");
+ }
gconf_list = gconf_client_get_list (conf_client,
key,
@@ -119,15 +123,11 @@ config_data_get_calendars (const gchar *key)
return cal_sources;
}
- state = gconf_client_get_bool (conf_client,
- "/apps/evolution/calendar/notify/notify_with_tray",
- NULL);
+ state = g_settings_get_boolean (calendar_settings, "notify-with-tray");
if (!state) /* Should be old client */ {
GSList *source;
- gconf_client_set_bool (conf_client,
- "/apps/evolution/calendar/notify/notify_with_tray",
- TRUE,
- NULL);
+
+ g_settings_set_boolean (calendar_settings, "notify-with-tray", TRUE);
source = gconf_client_get_list (conf_client,
"/apps/evolution/calendar/sources",
GCONF_VALUE_STRING,
@@ -189,28 +189,18 @@ config_data_replace_string_list (const gchar *key,
}
}
-GConfClient *
-config_data_get_conf_client (void)
-{
- ensure_inited ();
- return conf_client;
-}
-
icaltimezone *
config_data_get_timezone (void)
{
gchar *location;
- const gchar *key;
icaltimezone *local_timezone;
ensure_inited ();
- key = "/apps/evolution/calendar/display/use_system_timezone";
- if (gconf_client_get_bool (conf_client, key, NULL))
+ if (g_settings_get_boolean (calendar_settings, "use-system-timezone"))
location = e_cal_util_get_system_timezone_location ();
else {
- key = "/apps/evolution/calendar/display/timezone";
- location = gconf_client_get_string (conf_client, key, NULL);
+ location = g_settings_get_string (calendar_settings, "timezone");
}
if (location && location[0])
@@ -229,10 +219,7 @@ config_data_get_24_hour_format (void)
ensure_inited ();
if (locale_supports_12_hour_format ()) {
- const gchar *key;
-
- key = "/apps/evolution/calendar/display/use_24hour_format";
- return gconf_client_get_bool (conf_client, key, NULL);
+ return g_settings_get_boolean (calendar_settings, "use-24hour-format");
}
return TRUE;
@@ -243,9 +230,7 @@ config_data_get_notify_with_tray (void)
{
ensure_inited ();
- return gconf_client_get_bool (conf_client,
- "/apps/evolution/calendar/notify/notify_with_tray",
- NULL);
+ return g_settings_get_boolean (calendar_settings, "notify-with-tray");
}
/**
@@ -260,7 +245,6 @@ void
config_data_set_last_notification_time (ECalClient *cal,
time_t t)
{
- GConfClient *client;
time_t current_t, now = time (NULL);
g_return_if_fail (t != -1);
@@ -291,14 +275,11 @@ config_data_set_last_notification_time (ECalClient *cal,
}
}
- if (!(client = config_data_get_conf_client ()))
- return;
-
/* we only store the new notification time if it is bigger
* than the already stored one */
- current_t = gconf_client_get_int (client, KEY_LAST_NOTIFICATION_TIME, NULL);
+ current_t = g_settings_get_int (calendar_settings, "last-notification-time");
if (t > current_t || current_t > now)
- gconf_client_set_int (client, KEY_LAST_NOTIFICATION_TIME, t, NULL);
+ g_settings_set_int (calendar_settings, "last-notification-time", t);
}
/**
@@ -311,8 +292,7 @@ config_data_set_last_notification_time (ECalClient *cal,
time_t
config_data_get_last_notification_time (ECalClient *cal)
{
- GConfValue *value;
- GConfClient *client;
+ time_t value, now;
if (cal) {
ESource *source = e_client_get_source (E_CLIENT (cal));
@@ -326,33 +306,21 @@ config_data_get_last_notification_time (ECalClient *cal)
if (last_notified && *last_notified &&
g_time_val_from_iso8601 (last_notified, &tmval)) {
- time_t now = time (NULL), val = (time_t) tmval.tv_sec;
+ time_t now = time (NULL), value = (time_t) tmval.tv_sec;
- if (val > now)
- val = now;
- return val;
+ if (value > now)
+ value = now;
+ return value;
}
}
}
- if (!(client = config_data_get_conf_client ()))
- return -1;
-
- value = gconf_client_get_without_default (
- client, KEY_LAST_NOTIFICATION_TIME, NULL);
- if (value) {
- time_t val, now;
-
- val = (time_t) gconf_value_get_int (value);
- now = time (NULL);
-
- if (val > now)
- val = now;
+ value = g_settings_get_int (calendar_settings, "last-notification-time");
+ now = time (NULL);
+ if (value > now)
+ value = now;
- return val;
- }
-
- return -1;
+ return value;
}
/**
@@ -364,17 +332,20 @@ config_data_get_last_notification_time (ECalClient *cal)
void
config_data_save_blessed_program (const gchar *program)
{
- GConfClient *client;
- GSList *l;
+ gchar **list;
+ gint i;
+ GPtrArray *array = g_ptr_array_new ();
- if (!(client = config_data_get_conf_client ()))
- return;
+ list = g_settings_get_strv (calendar_settings, "notify-programs");
+ for (i = 0; i < g_strv_length (list); i++)
+ g_ptr_array_add (array, list[i]);
- l = gconf_client_get_list (client, KEY_PROGRAMS, GCONF_VALUE_STRING, NULL);
- l = g_slist_append (l, g_strdup (program));
- gconf_client_set_list (client, KEY_PROGRAMS, GCONF_VALUE_STRING, l, NULL);
- g_slist_foreach (l, (GFunc) g_free, NULL);
- g_slist_free (l);
+ g_ptr_array_add (array, (gpointer) program);
+ g_ptr_array_add (array, NULL);
+ g_settings_set_strv (calendar_settings, "notify-programs", (const gchar *const *) array->pdata);
+
+ g_strfreev (list);
+ g_ptr_array_free (array, TRUE);
}
/**
@@ -388,23 +359,22 @@ config_data_save_blessed_program (const gchar *program)
gboolean
config_data_is_blessed_program (const gchar *program)
{
- GConfClient *client;
- GSList *l, *n;
+ gchar **list;
+ gint i = 0;
gboolean found = FALSE;
- if (!(client = config_data_get_conf_client ()))
+ list = g_settings_get_strv (calendar_settings, "notify-programs");
+ if (!list)
return FALSE;
- l = gconf_client_get_list (client, KEY_PROGRAMS, GCONF_VALUE_STRING, NULL);
- while (l) {
- n = l->next;
+ while (list[i] != NULL) {
if (!found)
- found = strcmp ((gchar *) l->data, program) == 0;
- g_free (l->data);
- g_slist_free_1 (l);
- l = n;
+ found = strcmp ((gchar *) list[i], program) == 0;
+ i++;
}
+ g_strfreev (list);
+
return found;
}
diff --git a/calendar/gui/alarm-notify/config-data.h b/calendar/gui/alarm-notify/config-data.h
index 1023609d6a..a7a0ca58e0 100644
--- a/calendar/gui/alarm-notify/config-data.h
+++ b/calendar/gui/alarm-notify/config-data.h
@@ -28,10 +28,8 @@
#include <libical/ical.h>
#include <libecal/e-cal-client.h>
-#include <gconf/gconf-client.h>
#include <libedataserver/e-source-list.h>
-GConfClient * config_data_get_conf_client (void);
icaltimezone * config_data_get_timezone (void);
gboolean config_data_get_24_hour_format (void);
gboolean config_data_get_notify_with_tray
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 6d97cdf8cf..39431549dd 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -31,6 +31,7 @@
#include <time.h>
#include <string.h>
+#include <gio/gio.h>
#include <e-util/e-util.h>
#include <libecal/e-cal-time-util.h>
#include <libedataserver/e-data-server-util.h>
@@ -40,7 +41,7 @@
#include "calendar-config-keys.h"
#include "calendar-config.h"
-static GConfClient *config = NULL;
+static GSettings *config = NULL;
static void
do_cleanup (void)
@@ -55,18 +56,17 @@ calendar_config_init (void)
if (config)
return;
- config = gconf_client_get_default ();
+ config = g_settings_new ("org.gnome.evolution.calendar");
g_atexit ((GVoidFunc) do_cleanup);
-
- gconf_client_add_dir (config, CALENDAR_CONFIG_PREFIX, GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
}
void
-calendar_config_remove_notification (guint id)
+calendar_config_remove_notification (CalendarConfigChangedFunc func,
+ gpointer data)
{
calendar_config_init ();
- gconf_client_notify_remove (config, id);
+ g_signal_handlers_disconnect_by_func (G_OBJECT (config), G_CALLBACK (func), data);
}
/* Returns TRUE if the locale has 'am' and 'pm' strings defined, in which
@@ -92,7 +92,7 @@ calendar_config_get_timezone_stored (void)
{
calendar_config_init ();
- return gconf_client_get_string (config, CALENDAR_CONFIG_TIMEZONE, NULL);
+ return g_settings_get_string (config, "timezone");
}
static gchar *
@@ -142,7 +142,7 @@ calendar_config_get_24_hour_format (void)
* default. If the locale doesn't have 'am' and 'pm' strings we have
* to use 24-hour format, or strftime ()/strptime () won't work. */
if (calendar_config_locale_supports_12_hour_format ())
- return gconf_client_get_bool (config, CALENDAR_CONFIG_24HOUR, NULL);
+ return g_settings_get_boolean (config, "use-24hour-format");
return TRUE;
}
@@ -153,20 +153,17 @@ calendar_config_get_month_scroll_by_week (void)
{
calendar_config_init ();
- return gconf_client_get_bool (config, CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK, NULL);
+ return g_settings_get_boolean (config, "month-scroll-by-week");
}
-guint
-calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc func,
+void
+calendar_config_add_notification_month_scroll_by_week (CalendarConfigChangedFunc func,
gpointer data)
{
- guint id;
-
calendar_config_init ();
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK, func, data, NULL, NULL);
-
- return id;
+ g_signal_connect (G_OBJECT (config), "changed::month-scroll-by-week",
+ G_CALLBACK (func), data);
}
/***************************************/
@@ -177,7 +174,7 @@ calendar_config_get_working_days (void)
{
calendar_config_init ();
- return gconf_client_get_int (config, CALENDAR_CONFIG_WORKING_DAYS, NULL);
+ return g_settings_get_int (config, "working-days");
}
/* Settings to hide completed tasks. */
@@ -186,7 +183,7 @@ calendar_config_get_hide_completed_tasks (void)
{
calendar_config_init ();
- return gconf_client_get_bool (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED, NULL);
+ return g_settings_get_boolean (config, "hide-completed-tasks");
}
static EDurationType
@@ -197,7 +194,7 @@ calendar_config_get_hide_completed_tasks_units (void)
calendar_config_init ();
- units = gconf_client_get_string (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_UNITS, NULL);
+ units = g_settings_get_string (config, "hide-completed-tasks-units");
if (units && !strcmp (units, "minutes"))
cu = E_DURATION_MINUTES;
@@ -229,7 +226,7 @@ calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed)
gint value;
units = calendar_config_get_hide_completed_tasks_units ();
- value = gconf_client_get_int (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE, NULL);
+ value = g_settings_get_int (config, "hide-completed-tasks-value");
if (value == 0) {
/* If the value is 0, we want to hide completed tasks
@@ -284,7 +281,7 @@ calendar_config_set_dir_path (const gchar *path)
{
calendar_config_init ();
- gconf_client_set_string (config, CALENDAR_CONFIG_SAVE_DIR, path, NULL);
+ g_settings_set_string (config, "audio-dir", path);
}
gchar *
@@ -294,7 +291,7 @@ calendar_config_get_dir_path (void)
calendar_config_init ();
- path = gconf_client_get_string (config, CALENDAR_CONFIG_SAVE_DIR, NULL);
+ path = g_settings_get_string (config, "audio-dir");
return path;
}
@@ -304,11 +301,19 @@ calendar_config_get_dir_path (void)
GSList *
calendar_config_get_day_second_zones (void)
{
- GSList *res;
+ GSList *res = NULL;
+ gchar **strv;
+ gint i;
calendar_config_init ();
- res = gconf_client_get_list (config, CALENDAR_CONFIG_DAY_SECOND_ZONES_LIST, GCONF_VALUE_STRING, NULL);
+ strv = g_settings_get_strv (config, "day-second-zones");
+ for (i = 0; i < g_strv_length (strv); i++) {
+ if (strv[i] != NULL)
+ res = g_slist_append (res, g_strdup (strv[i]));
+ }
+
+ g_strfreev (strv);
return res;
}
@@ -331,16 +336,12 @@ calendar_config_set_day_second_zone (const gchar *location)
if (location && *location) {
GSList *lst, *l;
- GError *error = NULL;
gint max_zones;
+ GPtrArray *array;
+ gint i;
/* configurable max number of timezones to remember */
- max_zones = gconf_client_get_int (config, CALENDAR_CONFIG_DAY_SECOND_ZONES_MAX, &error);
-
- if (error) {
- g_error_free (error);
- max_zones = -1;
- }
+ max_zones = g_settings_get_int (config, "day-second-zones-max");
if (max_zones <= 0)
max_zones = 5;
@@ -364,18 +365,18 @@ calendar_config_set_day_second_zone (const gchar *location)
lst = g_slist_prepend (lst, g_strdup (location));
}
- while (g_slist_length (lst) > max_zones) {
- l = g_slist_last (lst);
- g_free (l->data);
- lst = g_slist_delete_link (lst, l);
- }
+ array = g_ptr_array_new ();
+ for (i = 0, l = lst; i < max_zones && l != NULL; i++, l = l->next)
+ g_ptr_array_add (array, l->data);
+ g_ptr_array_add (array, NULL);
- gconf_client_set_list (config, CALENDAR_CONFIG_DAY_SECOND_ZONES_LIST, GCONF_VALUE_STRING, lst, NULL);
+ g_settings_set_strv (config, "day-second-zones", (const gchar * const *) array->pdata);
calendar_config_free_day_second_zones (lst);
+ g_ptr_array_free (array, FALSE);
}
- gconf_client_set_string (config, CALENDAR_CONFIG_DAY_SECOND_ZONE, location ? location : "", NULL);
+ g_settings_set_string (config, "day-second-zone", location ? location : "");
}
/* location of the second time zone user has selected. Free with g_free. */
@@ -384,7 +385,7 @@ calendar_config_get_day_second_zone (void)
{
calendar_config_init ();
- return gconf_client_get_string (config, CALENDAR_CONFIG_DAY_SECOND_ZONE, NULL);
+ return g_settings_get_string (config, "day-second-zone");
}
void
@@ -424,15 +425,12 @@ calendar_config_select_day_second_zone (void)
g_object_unref (tzdlg);
}
-guint
-calendar_config_add_notification_day_second_zone (GConfClientNotifyFunc func,
+void
+calendar_config_add_notification_day_second_zone (CalendarConfigChangedFunc func,
gpointer data)
{
- guint id;
-
calendar_config_init ();
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_SECOND_ZONE, func, data, NULL, NULL);
-
- return id;
+ g_signal_connect (G_OBJECT (config), "changed::day-second-zone",
+ G_CALLBACK (func), data);
}
diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h
index 0be1e203c9..483fbbd667 100644
--- a/calendar/gui/calendar-config.h
+++ b/calendar/gui/calendar-config.h
@@ -28,9 +28,9 @@
#ifndef _CALENDAR_CONFIG_H_
#define _CALENDAR_CONFIG_H_
+#include <gio/gio.h>
#include <gdk/gdk.h>
#include <libecal/e-cal-client.h>
-#include <gconf/gconf-client.h>
#include <e-util/e-util-enums.h>
/* These are used to get/set the working days in the week. The bit-flags are
@@ -47,7 +47,11 @@ typedef enum
CAL_SATURDAY = 1 << 6
} CalWeekdays;
-void calendar_config_remove_notification (guint id);
+typedef void (* CalendarConfigChangedFunc) (GSettings *settings,
+ const gchar *key,
+ gpointer user_data);
+
+void calendar_config_remove_notification (CalendarConfigChangedFunc func, gpointer data);
/*
* Calendar Settings.
@@ -79,10 +83,11 @@ void calendar_config_free_day_second_zones (GSList *zones);
void calendar_config_set_day_second_zone (const gchar *location);
gchar * calendar_config_get_day_second_zone (void);
void calendar_config_select_day_second_zone (void);
-guint calendar_config_add_notification_day_second_zone (GConfClientNotifyFunc func, gpointer data);
+
+void calendar_config_add_notification_day_second_zone (CalendarConfigChangedFunc func, gpointer data);
/* Scroll in a month view by a week, not by a month */
gboolean calendar_config_get_month_scroll_by_week (void);
-guint calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc func, gpointer data);
+void calendar_config_add_notification_month_scroll_by_week (CalendarConfigChangedFunc func, gpointer data);
#endif /* _CALENDAR_CONFIG_H_ */
diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
index 4c92d6d8fc..8342475620 100644
--- a/calendar/gui/calendar-view-factory.c
+++ b/calendar/gui/calendar-view-factory.c
@@ -30,7 +30,6 @@
#include "calendar-view-factory.h"
#include "calendar-view.h"
-
/* Private part of the CalendarViewFactory structure */
struct _CalendarViewFactoryPrivate {
/* Type of views created by this factory */
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
index d238daf3df..6f9f2951f3 100644
--- a/calendar/gui/calendar-view.c
+++ b/calendar/gui/calendar-view.c
@@ -28,7 +28,6 @@
#include "calendar-view.h"
-
/* Private part of the CalendarView structure */
struct _CalendarViewPrivate {
/* Type of the view */
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 8bb5500f23..f768335c3c 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -39,7 +39,6 @@
#include "shell/e-shell-window.h"
#include "shell/e-shell-view.h"
-
/**
* cal_comp_util_add_exdate:
* @comp: A calendar component object.
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index 4576f3df6f..1c76c79d83 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -45,7 +45,6 @@
#include "comp-editor-util.h"
#include "alarm-dialog.h"
-
typedef struct {
GtkBuilder *builder;
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index 4fb5884026..065e865f92 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -42,7 +42,6 @@
#include "alarm-dialog.h"
#include "alarm-list-dialog.h"
-
typedef struct {
GtkBuilder *builder;
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index c5caa9371d..1bb37acf4b 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -31,7 +31,6 @@
#include "e-util/e-alert-dialog.h"
#include "cancel-comp.h"
-
/* is_past_event:
*
* returns TRUE if @comp is in the past, FALSE otherwise.
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index bc25188f5d..f8a98c9908 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include "changed-comp.h"
-
/**
* changed_component_dialog:
* @parent: Parent window for the dialog.
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index 2c087bb2f6..58c649b7ee 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -37,7 +37,6 @@
#include <shell/e-shell.h>
#include "comp-editor-util.h"
-
/**
* comp_editor_dates:
* @dates: A structure to be filled out with dates of a component
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 4fa0250838..d5eee61a87 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -34,13 +34,13 @@
#include <unistd.h>
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
+#include <gio/gio.h>
#include <gdk/gdkkeysyms.h>
#include <libebackend/e-extensible.h>
#include <e-util/e-util.h>
#include <e-util/e-alert-sink.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
-#include <e-util/gconf-bridge.h>
#include <shell/e-shell.h>
#include <libedataserver/e-data-server-util.h>
@@ -71,6 +71,8 @@ struct _CompEditorPrivate {
gpointer shell; /* weak pointer */
+ GSettings *calendar_settings;
+
/* EFocusTracker keeps selection actions up-to-date. */
EFocusTracker *focus_tracker;
@@ -1637,6 +1639,7 @@ comp_editor_finalize (GObject *object)
priv = COMP_EDITOR (object)->priv;
+ g_object_unref (priv->calendar_settings);
g_free (priv->summary);
/* Chain up to parent's finalize() method. */
@@ -1653,39 +1656,35 @@ comp_editor_constructed (GObject *object)
}
static void
-comp_editor_bind_gconf (CompEditor *editor)
+comp_editor_bind_settings (CompEditor *editor)
{
- GConfBridge *bridge;
GtkAction *action;
- const gchar *key;
g_return_if_fail (editor != NULL);
- bridge = gconf_bridge_get ();
-
- key = "/apps/evolution/calendar/display/show_categories";
action = comp_editor_get_action (editor, "view-categories");
- gconf_bridge_bind_property (bridge, key, G_OBJECT (action), "active");
+ g_settings_bind (editor->priv->calendar_settings, "editor-show-categories",
+ G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
- key = "/apps/evolution/calendar/display/show_role";
action = comp_editor_get_action (editor, "view-role");
- gconf_bridge_bind_property (bridge, key, G_OBJECT (action), "active");
+ g_settings_bind (editor->priv->calendar_settings, "editor-show-role",
+ G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
- key = "/apps/evolution/calendar/display/show_rsvp";
action = comp_editor_get_action (editor, "view-rsvp");
- gconf_bridge_bind_property (bridge, key, G_OBJECT (action), "active");
+ g_settings_bind (editor->priv->calendar_settings, "editor-show-rsvp",
+ G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
- key = "/apps/evolution/calendar/display/show_status";
action = comp_editor_get_action (editor, "view-status");
- gconf_bridge_bind_property (bridge, key, G_OBJECT (action), "active");
+ g_settings_bind (editor->priv->calendar_settings, "editor-show-status",
+ G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
- key = "/apps/evolution/calendar/display/show_timezone";
action = comp_editor_get_action (editor, "view-time-zone");
- gconf_bridge_bind_property (bridge, key, G_OBJECT (action), "active");
+ g_settings_bind (editor->priv->calendar_settings, "editor-show-timezone",
+ G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
- key = "/apps/evolution/calendar/display/show_type";
action = comp_editor_get_action (editor, "view-type");
- gconf_bridge_bind_property (bridge, key, G_OBJECT (action), "active");
+ g_settings_bind (editor->priv->calendar_settings, "editor-show-type",
+ G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
}
static gboolean
@@ -1981,6 +1980,8 @@ comp_editor_init (CompEditor *editor)
active_editors = g_list_prepend (active_editors, editor);
+ priv->calendar_settings = g_settings_new ("org.gnome.evolution.calendar");
+
/* Each editor window gets its own window group. */
window = GTK_WINDOW (editor);
priv->window_group = gtk_window_group_new ();
@@ -2190,7 +2191,7 @@ comp_editor_init (CompEditor *editor)
store, "row-inserted",
G_CALLBACK (attachment_store_changed_cb), editor);
- comp_editor_bind_gconf (editor);
+ comp_editor_bind_settings (editor);
gtk_application_add_window (
GTK_APPLICATION (shell), GTK_WINDOW (editor));
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index 44c133afbe..87330ed0dd 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -30,7 +30,6 @@
#include "e-util/e-alert-dialog.h"
#include "delete-comp.h"
-
/**
* delete_component_dialog:
* @comp: A calendar component if a single component is to be deleted, or NULL
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index a68fed8e1d..7dc53253fa 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -30,7 +30,6 @@
#include <glib/gi18n.h>
#include "delete-error.h"
-
/**
* delete_error_dialog:
*
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index 9652553ee3..434d552a40 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include "recur-comp.h"
-
gboolean
recur_component_dialog (ECalClient *client,
ECalComponent *comp,
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index 524f4c8097..4e5e1668c1 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -30,7 +30,6 @@
#include "e-util/e-alert-dialog.h"
#include "send-comp.h"
-
static gboolean
component_has_new_attendees (ECalComponent *comp)
{
diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c
index 8269a1067e..99a2487f98 100644
--- a/calendar/gui/e-cal-config.c
+++ b/calendar/gui/e-cal-config.c
@@ -70,8 +70,8 @@ ecp_target_free (EConfig *ec,
break; }
case EC_CONFIG_TARGET_PREFS: {
ECalConfigTargetPrefs *s = (ECalConfigTargetPrefs *) t;
- if (s->gconf)
- g_object_unref (s->gconf);
+ if (s->settings)
+ g_object_unref (s->settings);
break; }
}
@@ -172,7 +172,7 @@ e_cal_config_target_new_prefs (ECalConfig *ecp)
t = e_config_target_new (
&ecp->config, EC_CONFIG_TARGET_PREFS, sizeof (*t));
- t->gconf = gconf_client_get_default ();
+ t->settings = g_settings_new ("org.gnome.evolution.calendar");
return t;
}
diff --git a/calendar/gui/e-cal-config.h b/calendar/gui/e-cal-config.h
index 582bdf6a53..28109ab394 100644
--- a/calendar/gui/e-cal-config.h
+++ b/calendar/gui/e-cal-config.h
@@ -80,7 +80,7 @@ struct _ECalConfigTargetSource {
struct _ECalConfigTargetPrefs {
EConfigTarget target;
- struct _GConfClient *gconf;
+ GSettings *settings;
};
typedef struct _EConfigItem ECalConfigItem;
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 928a91bbfb..9b61f11649 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -65,7 +65,6 @@ struct _EDayViewTimeItemPrivate {
gboolean dragging_selection;
/* The second timezone if shown, or else NULL. */
- guint second_zone_changed_id;
icaltimezone *second_zone;
};
@@ -109,9 +108,8 @@ static gint e_day_view_time_item_convert_position_to_row
(EDayViewTimeItem *time_item,
gint y);
-static void edvti_second_zone_changed_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
+static void edvti_second_zone_changed_cb (GSettings *settings,
+ const gchar *key,
gpointer user_data);
enum {
@@ -178,9 +176,7 @@ day_view_time_item_finalize (GObject *object)
time_item = E_DAY_VIEW_TIME_ITEM (object);
- if (time_item->priv->second_zone_changed_id)
- calendar_config_remove_notification (time_item->priv->second_zone_changed_id);
- time_item->priv->second_zone_changed_id = 0;
+ calendar_config_remove_notification ((CalendarConfigChangedFunc) edvti_second_zone_changed_cb, time_item);
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -238,9 +234,9 @@ day_view_time_item_init (EDayViewTimeItem *time_item)
g_free (last);
}
- time_item->priv->second_zone_changed_id =
- calendar_config_add_notification_day_second_zone (
- edvti_second_zone_changed_cb, time_item);
+ calendar_config_add_notification_day_second_zone (
+ (CalendarConfigChangedFunc) edvti_second_zone_changed_cb,
+ time_item);
}
GType
@@ -732,9 +728,8 @@ e_day_view_time_item_event (GnomeCanvasItem *item,
}
static void
-edvti_second_zone_changed_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
+edvti_second_zone_changed_cb (GSettings *settings,
+ const gchar *key,
gpointer user_data)
{
EDayViewTimeItem *time_item = user_data;
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 036b6192f5..4b2eeb02bf 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -638,6 +638,22 @@ week_view_cursor_key_right (EWeekView *week_view)
}
static void
+month_scrol_by_week_changed_cb (GSettings *settings,
+ const gchar *key,
+ gpointer user_data)
+{
+ EWeekView *week_view = user_data;
+
+ g_return_if_fail (week_view != NULL);
+ g_return_if_fail (E_IS_WEEK_VIEW (week_view));
+
+ if (week_view->multi_week_view && week_view->month_scroll_by_week != calendar_config_get_month_scroll_by_week ()) {
+ week_view->multi_week_view = FALSE;
+ e_week_view_set_multi_week_view (week_view, TRUE);
+ }
+}
+
+static void
e_week_view_class_init (EWeekViewClass *class)
{
GObjectClass *object_class;
@@ -895,10 +911,7 @@ e_week_view_dispose (GObject *object)
week_view->resize_width_cursor = NULL;
}
- if (week_view->scroll_by_week_notif_id) {
- calendar_config_remove_notification (week_view->scroll_by_week_notif_id);
- week_view->scroll_by_week_notif_id = 0;
- }
+ calendar_config_remove_notification (month_scrol_by_week_changed_cb, week_view);
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_week_view_parent_class)->dispose (object);
@@ -1875,23 +1888,6 @@ e_week_view_recalc_day_starts (EWeekView *week_view,
}
}
-static void
-month_scrol_by_week_changed_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- EWeekView *week_view = user_data;
-
- g_return_if_fail (week_view != NULL);
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (week_view->multi_week_view && week_view->month_scroll_by_week != calendar_config_get_month_scroll_by_week ()) {
- week_view->multi_week_view = FALSE;
- e_week_view_set_multi_week_view (week_view, TRUE);
- }
-}
-
gboolean
e_week_view_get_multi_week_view (EWeekView *week_view)
{
@@ -1919,8 +1915,7 @@ e_week_view_set_multi_week_view (EWeekView *week_view,
gtk_widget_show (week_view->titles_canvas);
week_view->month_scroll_by_week = calendar_config_get_month_scroll_by_week ();
- if (!week_view->scroll_by_week_notif_id)
- week_view->scroll_by_week_notif_id = calendar_config_add_notification_month_scroll_by_week (month_scrol_by_week_changed_cb, week_view);
+ calendar_config_add_notification_month_scroll_by_week (month_scrol_by_week_changed_cb, week_view);
if (week_view->month_scroll_by_week) {
page_increment = 1;
@@ -1934,7 +1929,7 @@ e_week_view_set_multi_week_view (EWeekView *week_view,
page_increment = page_size = 1;
if (week_view->scroll_by_week_notif_id) {
- calendar_config_remove_notification (week_view->scroll_by_week_notif_id);
+ calendar_config_remove_notification (month_scrol_by_week_changed_cb, week_view);
week_view->scroll_by_week_notif_id = 0;
}
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 66c90fb1c2..aa0aebf08a 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -103,7 +103,6 @@ struct _GnomeCalendarPrivate {
* was selected in the date navigator to show the view. */
ECalendarView *views[GNOME_CAL_LAST_VIEW];
GnomeCalendarViewType current_view_type;
- GList *notifications;
gboolean range_selected;
@@ -1481,7 +1480,6 @@ gnome_calendar_init (GnomeCalendar *gcal)
static void
gnome_calendar_do_dispose (GObject *object)
{
- GList *l;
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
gint ii;
@@ -1508,11 +1506,6 @@ gnome_calendar_do_dispose (GObject *object)
}
}
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
free_dn_queries (gcal);
if (priv->sexp) {
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 187757cece..4b2a8d262d 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -577,11 +577,11 @@ comp_to_list (ECalComponentItipMethod method,
ECalComponentAttendee *att = l->data;
/* Bugfix: 688711 - Varadhan
- Resource is also considered as a "attendee". If the respective backend
- is able to successfully book resources automagically, it will appear
- in the users list and thereby won't get added to the list of destinations
- to send the meeting invite, otherwise, as a safety measure, a meeting
- invite will be sent to the resources as well. */
+ * Resource is also considered as a "attendee". If the respective backend
+ * is able to successfully book resources automagically, it will appear
+ * in the users list and thereby won't get added to the list of destinations
+ * to send the meeting invite, otherwise, as a safety measure, a meeting
+ * invite will be sent to the resources as well. */
if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
att->cutype != ICAL_CUTYPE_GROUP &&
att->cutype != ICAL_CUTYPE_RESOURCE)
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index 449cab0d24..3887780ed7 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -1023,13 +1023,13 @@ gnome_calendar_getwidget (EImport *ei,
EImportImporter *im)
{
GtkWidget *hbox, *w;
- GConfClient *gconf;
+ GSettings *settings;
gboolean done_cal, done_tasks;
- gconf = gconf_client_get_default ();
- done_cal = gconf_client_get_bool (gconf, "/apps/evolution/importer/gnome-calendar/calendar", NULL);
- done_tasks = gconf_client_get_bool (gconf, "/apps/evolution/importer/gnome-calendar/tasks", NULL);
- g_object_unref (gconf);
+ settings = g_settings_new ("org.gnome.evolution.importer");
+ done_cal = g_settings_get_boolean (settings, "gnome-calendar-done-calendar");
+ done_tasks = g_settings_get_boolean (settings, "gnome-calendar-done-tasks");
+ g_object_unref (settings);
g_datalist_set_data(&target->data, "gnomecal-do-cal", GINT_TO_POINTER(!done_cal));
g_datalist_set_data(&target->data, "gnomecal-do-tasks", GINT_TO_POINTER(!done_tasks));
@@ -1380,11 +1380,11 @@ get_users_timezone (void)
if (e_shell_settings_get_boolean (shell_settings, "cal-use-system-timezone")) {
location = e_cal_util_get_system_timezone_location ();
} else {
- GConfClient *client = gconf_client_get_default ();
+ GSettings *settings = g_settings_new ("org.gnome.evolution.calendar");
- location = gconf_client_get_string (client, CALENDAR_CONFIG_TIMEZONE, NULL);
+ location = g_settings_get_string (settings, "timezone");
- g_object_unref (client);
+ g_object_unref (settings);
}
if (location) {
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
index 85afccd837..594744021b 100644
--- a/capplet/settings/mail-account-view.c
+++ b/capplet/settings/mail-account-view.c
@@ -237,6 +237,29 @@ sanitize_user_mail (const gchar *user)
}
static void
+add_selected_calendar (const gchar *uid)
+{
+ gchar **ids;
+ gint i;
+ GPtrArray *array;
+ GSettings *settings;
+
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ ids = g_settings_get_strv (settings, "selected-calendars");
+
+ array = g_ptr_array_new ();
+ for (i = 0; ids[i] != NULL; i++)
+ g_ptr_array_add (array, ids[i]);
+ g_ptr_array_add (array, (gpointer) uid);
+ g_ptr_array_add (array, NULL);
+
+ g_settings_set_strv (settings, "selected-calendars", (const gchar* const *) array->pdata);
+
+ g_ptr_array_free (array, TRUE);
+ g_object_unref (settings);
+}
+
+static void
setup_yahoo_account (MailAccountView *mav)
{
GConfClient *gconf = gconf_client_get_default ();
@@ -249,7 +272,6 @@ setup_yahoo_account (MailAccountView *mav)
ESourceGroup *sgrp;
ESource *calendar;
gchar *sanitize_uname, *abs_uri, *rel_uri;
- GSList *ids, *temp;
const gchar *email = e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_ADDRESS);
slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
@@ -285,14 +307,7 @@ setup_yahoo_account (MailAccountView *mav)
e_source_group_add_source (sgrp, calendar, -1);
e_source_list_sync (slist, NULL);
- ids = gconf_client_get_list (gconf, SELECTED_CALENDARS, GCONF_VALUE_STRING, NULL);
- ids = g_slist_append (ids, g_strdup (e_source_peek_uid (calendar)));
- gconf_client_set_list (gconf, SELECTED_CALENDARS, GCONF_VALUE_STRING, ids, NULL);
- temp = ids;
-
- for (; temp != NULL; temp = g_slist_next (temp))
- g_free (temp->data);
- g_slist_free (ids);
+ add_selected_calendar (e_source_peek_uid (calendar));
g_free (abs_uri);
g_free (rel_uri);
@@ -354,7 +369,6 @@ setup_google_accounts (MailAccountView *mav)
ESourceGroup *sgrp;
ESource *calendar;
gchar *sanitize_uname, *abs_uri, *rel_uri;
- GSList *ids, *temp;
slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
sgrp = e_source_list_ensure_group (slist, _("Google"), "google://", TRUE);
@@ -384,14 +398,7 @@ setup_google_accounts (MailAccountView *mav)
e_source_list_sync (slist, NULL);
- ids = gconf_client_get_list (gconf, SELECTED_CALENDARS, GCONF_VALUE_STRING, NULL);
- ids = g_slist_append (ids, g_strdup (e_source_peek_uid (calendar)));
- gconf_client_set_list (gconf, SELECTED_CALENDARS, GCONF_VALUE_STRING, ids, NULL);
- temp = ids;
-
- for (; temp != NULL; temp = g_slist_next (temp))
- g_free (temp->data);
- g_slist_free (ids);
+ add_selected_calendar (e_source_peek_uid (calendar));
g_free (abs_uri);
g_free (rel_uri);
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 2dd94eb875..5083ef38a1 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -25,7 +25,6 @@
#include <libedataserverui/e-name-selector.h>
#include <shell/e-shell.h>
-#include <e-util/gconf-bridge.h>
#include <misc/e-signature-combo-box.h>
#include "e-msg-composer.h"
@@ -63,7 +62,6 @@ enum {
struct _EComposerHeaderTablePrivate {
EComposerHeader *headers[E_COMPOSER_NUM_HEADERS];
- guint gconf_bindings[E_COMPOSER_NUM_HEADERS];
GtkWidget *signature_label;
GtkWidget *signature_combo_box;
ENameSelector *name_selector;
@@ -305,35 +303,30 @@ from_header_should_be_visible (EComposerHeaderTable *table)
static void
composer_header_table_setup_mail_headers (EComposerHeaderTable *table)
{
- GConfBridge *bridge;
+ GSettings *settings;
gint ii;
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
for (ii = 0; ii < E_COMPOSER_NUM_HEADERS; ii++) {
EComposerHeader *header;
const gchar *key;
- guint binding_id;
gboolean sensitive;
gboolean visible;
- binding_id = table->priv->gconf_bindings[ii];
header = e_composer_header_table_get_header (table, ii);
- if (binding_id > 0)
- gconf_bridge_unbind (bridge, binding_id);
-
switch (ii) {
case E_COMPOSER_HEADER_BCC:
- key = COMPOSER_GCONF_PREFIX "/show_mail_bcc";
+ key = "composer-show-bcc";
break;
case E_COMPOSER_HEADER_CC:
- key = COMPOSER_GCONF_PREFIX "/show_mail_cc";
+ key = "composer-show-cc";
break;
case E_COMPOSER_HEADER_REPLY_TO:
- key = COMPOSER_GCONF_PREFIX "/show_mail_reply_to";
+ key = "composer-show-reply-to";
break;
default:
@@ -365,42 +358,36 @@ composer_header_table_setup_mail_headers (EComposerHeaderTable *table)
e_composer_header_set_sensitive (header, sensitive);
e_composer_header_set_visible (header, visible);
- if (key != NULL)
- binding_id = gconf_bridge_bind_property (
- bridge, key, G_OBJECT (header), "visible");
- else
- binding_id = 0;
-
- table->priv->gconf_bindings[ii] = binding_id;
+ if (key != NULL) {
+ g_settings_unbind (settings, key);
+ g_settings_bind (settings, key, G_OBJECT (header), "visible", G_SETTINGS_BIND_DEFAULT);
+ }
}
+
+ g_object_unref (settings);
}
static void
composer_header_table_setup_post_headers (EComposerHeaderTable *table)
{
- GConfBridge *bridge;
+ GSettings *settings;
gint ii;
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
for (ii = 0; ii < E_COMPOSER_NUM_HEADERS; ii++) {
EComposerHeader *header;
const gchar *key;
- guint binding_id;
- binding_id = table->priv->gconf_bindings[ii];
header = e_composer_header_table_get_header (table, ii);
- if (binding_id > 0)
- gconf_bridge_unbind (bridge, binding_id);
-
switch (ii) {
case E_COMPOSER_HEADER_FROM:
- key = COMPOSER_GCONF_PREFIX "/show_post_from";
+ key = "composer-show-post-from";
break;
case E_COMPOSER_HEADER_REPLY_TO:
- key = COMPOSER_GCONF_PREFIX "/show_post_reply_to";
+ key = "composer-show-post-reply-to";
break;
default:
@@ -423,14 +410,13 @@ composer_header_table_setup_post_headers (EComposerHeaderTable *table)
break;
}
- if (key != NULL)
- binding_id = gconf_bridge_bind_property (
- bridge, key, G_OBJECT (header), "visible");
- else
- binding_id = 0;
-
- table->priv->gconf_bindings[ii] = binding_id;
+ if (key != NULL) {
+ g_settings_unbind (settings, key);
+ g_settings_bind (settings, key, G_OBJECT (header), "visible", G_SETTINGS_BIND_DEFAULT);
+ }
}
+
+ g_object_unref (settings);
}
static void
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index bd7b46a4ee..467d5c6731 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -216,9 +216,6 @@ e_composer_private_constructed (EMsgComposer *composer)
priv->extra_hdr_names = g_ptr_array_new ();
priv->extra_hdr_values = g_ptr_array_new ();
- priv->gconf_bridge_binding_ids = g_array_new (
- FALSE, FALSE, sizeof (guint));
-
priv->inline_images = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
@@ -499,24 +496,6 @@ e_composer_private_constructed (EMsgComposer *composer)
void
e_composer_private_dispose (EMsgComposer *composer)
{
- if (composer->priv->gconf_bridge_binding_ids) {
- GConfBridge *bridge;
- GArray *array;
- guint binding_id;
-
- bridge = gconf_bridge_get ();
- array = composer->priv->gconf_bridge_binding_ids;
-
- while (array->len > 0) {
- binding_id = g_array_index (array, guint, 0);
- gconf_bridge_unbind (bridge, binding_id);
- g_array_remove_index_fast (array, 0);
- }
-
- g_array_free (composer->priv->gconf_bridge_binding_ids, TRUE);
- composer->priv->gconf_bridge_binding_ids = NULL;
- }
-
if (composer->priv->shell != NULL) {
g_object_remove_weak_pointer (
G_OBJECT (composer->priv->shell),
@@ -631,36 +610,26 @@ e_composer_find_data_file (const gchar *basename)
gchar *
e_composer_get_default_charset (void)
{
- GConfClient *client;
+ GSettings *settings;
gchar *charset;
- GError *error = NULL;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
- charset = gconf_client_get_string (
- client, COMPOSER_GCONF_CHARSET_KEY, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_clear_error (&error);
- }
+ charset = g_settings_get_string (settings, "composer-charset");
/* See what charset the mailer is using.
- * XXX We should not have to know where this lives in GConf.
+ * XXX We should not have to know where this lives in GSettings.
* Need a mail_config_get_default_charset() that does this. */
if (!charset || charset[0] == '\0') {
g_free (charset);
- charset = gconf_client_get_string (
- client, MAIL_GCONF_CHARSET_KEY, NULL);
+ charset = g_settings_get_string (settings, "charset");
if (charset != NULL && *charset == '\0') {
g_free (charset);
charset = NULL;
- } else if (error != NULL) {
- g_warning ("%s", error->message);
- g_clear_error (&error);
}
}
- g_object_unref (client);
+ g_object_unref (settings);
if (charset == NULL)
charset = g_strdup (camel_iconv_locale_charset ());
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 69e3169de3..695510949a 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -30,9 +30,6 @@
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
#include <libebackend/e-extensible.h>
#include "e-composer-actions.h"
@@ -45,7 +42,6 @@
#include "e-util/e-plugin-ui.h"
#include "e-util/e-selection.h"
#include "e-util/e-util.h"
-#include "e-util/gconf-bridge.h"
#include "widgets/misc/e-activity-bar.h"
#include "widgets/misc/e-alert-bar.h"
#include "widgets/misc/e-attachment.h"
@@ -62,34 +58,6 @@
#include <X11/XF86keysym.h>
#endif
-/* Mail configuration keys */
-#define MAIL_GCONF_PREFIX \
- "/apps/evolution/mail"
-#define MAIL_GCONF_CHARSET_KEY \
- MAIL_GCONF_PREFIX "/format/charset"
-
-/* Composer configuration keys */
-#define COMPOSER_GCONF_PREFIX \
- MAIL_GCONF_PREFIX "/composer"
-#define COMPOSER_GCONF_CHARSET_KEY \
- COMPOSER_GCONF_PREFIX "/charset"
-#define COMPOSER_GCONF_INLINE_SPELLING_KEY \
- COMPOSER_GCONF_PREFIX "/inline_spelling"
-#define COMPOSER_GCONF_MAGIC_LINKS_KEY \
- COMPOSER_GCONF_PREFIX "/magic_links"
-#define COMPOSER_GCONF_MAGIC_SMILEYS_KEY \
- COMPOSER_GCONF_PREFIX "/magic_smileys"
-#define COMPOSER_GCONF_REQUEST_RECEIPT_KEY \
- COMPOSER_GCONF_PREFIX "/request_receipt"
-#define COMPOSER_GCONF_TOP_SIGNATURE_KEY \
- COMPOSER_GCONF_PREFIX "/top_signature"
-#define COMPOSER_GCONF_SEND_HTML_KEY \
- COMPOSER_GCONF_PREFIX "/send_html"
-#define COMPOSER_GCONF_SPELL_LANGUAGES_KEY \
- COMPOSER_GCONF_PREFIX "/spell_languages"
-#define COMPOSER_GCONF_WINDOW_PREFIX \
- COMPOSER_GCONF_PREFIX "/window"
-
/* Shorthand, requires a variable named "composer". */
#define ACTION(name) (E_COMPOSER_ACTION_##name (composer))
@@ -121,7 +89,6 @@ struct _EMsgComposerPrivate {
GPtrArray *extra_hdr_names;
GPtrArray *extra_hdr_values;
- GArray *gconf_bridge_binding_ids;
GtkWidget *focused_entry;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 5ed9fad575..b7aaf883a5 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -128,8 +128,6 @@ static void handle_multipart_signed (EMsgComposer *composer,
static void e_msg_composer_alert_sink_init (EAlertSinkInterface *interface);
-gboolean check_blacklisted_file (gchar *filename);
-
G_DEFINE_TYPE_WITH_CODE (
EMsgComposer,
e_msg_composer,
@@ -2065,10 +2063,8 @@ msg_composer_constructed (GObject *object)
EWebView *web_view;
GtkUIManager *ui_manager;
GtkToggleAction *action;
- GArray *array;
const gchar *id;
gboolean active;
- guint binding_id;
editor = GTKHTML_EDITOR (object);
composer = E_MSG_COMPOSER (object);
@@ -2110,13 +2106,14 @@ msg_composer_constructed (GObject *object)
/* Restore Persistent State */
- array = composer->priv->gconf_bridge_binding_ids;
+ /* FIXME: need to bind this to GSettings */
+ /* array = composer->priv->gconf_bridge_binding_ids; */
- binding_id = gconf_bridge_bind_window (
- gconf_bridge_get (),
- COMPOSER_GCONF_WINDOW_PREFIX,
- GTK_WINDOW (composer), TRUE, FALSE);
- g_array_append_val (array, binding_id);
+ /* binding_id = gconf_bridge_bind_window ( */
+ /* gconf_bridge_get (), */
+ /* COMPOSER_GCONF_WINDOW_PREFIX, */
+ /* GTK_WINDOW (composer), TRUE, FALSE); */
+ /* g_array_append_val (array, binding_id); */
/* Honor User Preferences */
@@ -4007,25 +4004,24 @@ merge_always_cc_and_bcc (EComposerHeaderTable *table,
e_destination_freev (addrv);
}
-static const gchar *blacklisted_files [] = {".", "etc", ".."};
+static const gchar *blacklisted_files [] = { ".", "etc", ".." };
-gboolean check_blacklisted_file (gchar *filename)
+static gboolean
+check_blacklisted_file (gchar *filename)
{
gboolean blacklisted = FALSE;
- gint i,j,len;
+ guint ii, jj, length;
gchar **filename_part;
filename_part = g_strsplit (filename, G_DIR_SEPARATOR_S, -1);
- len = g_strv_length(filename_part);
- for(i = 0; !blacklisted && i < G_N_ELEMENTS(blacklisted_files); i++)
- {
- for (j = 0; !blacklisted && j < len;j++)
- if (g_str_has_prefix (filename_part[j], blacklisted_files[i]))
+ length = g_strv_length (filename_part);
+ for (ii = 0; !blacklisted && ii < G_N_ELEMENTS (blacklisted_files); ii++) {
+ for (jj = 0; !blacklisted && jj < length; jj++)
+ if (g_str_has_prefix (filename_part[jj], blacklisted_files[ii]))
blacklisted = TRUE;
}
+ g_strfreev (filename_part);
- g_strfreev(filename_part);
-
return blacklisted;
}
@@ -4120,14 +4116,13 @@ handle_mailto (EMsgComposer *composer,
} else if (!g_ascii_strcasecmp (header, "attach") ||
!g_ascii_strcasecmp (header, "attachment")) {
EAttachment *attachment;
- gboolean check = FALSE;
camel_url_decode (content);
- check = check_blacklisted_file(content);
- if(check)
+ if (check_blacklisted_file (content))
e_alert_submit (
- E_ALERT_SINK (composer),
- "mail:blacklisted-file", content, NULL);
+ E_ALERT_SINK (composer),
+ "mail:blacklisted-file",
+ content, NULL);
if (g_ascii_strncasecmp (content, "file:", 5) == 0)
attachment = e_attachment_new_for_uri (content);
else
@@ -5032,21 +5027,19 @@ e_msg_composer_get_attachment_view (EMsgComposer *composer)
GList *
e_load_spell_languages (void)
{
- GConfClient *client;
+ GSettings *settings;
GList *spell_languages = NULL;
- GSList *list;
- const gchar *key;
- GError *error = NULL;
+ gchar **strv;
+ gint ii;
- /* Ask GConf for a list of spell check language codes. */
- client = gconf_client_get_default ();
- key = COMPOSER_GCONF_SPELL_LANGUAGES_KEY;
- list = gconf_client_get_list (client, key, GCONF_VALUE_STRING, &error);
- g_object_unref (client);
+ /* Ask GSettings for a list of spell check language codes. */
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ strv = g_settings_get_strv (settings, "composer-spell-languages");
+ g_object_unref (settings);
/* Convert the codes to spell language structs. */
- while (list != NULL) {
- gchar *language_code = list->data;
+ for (ii = 0; strv[ii] != NULL; ii++) {
+ gchar *language_code = strv[ii];
const GtkhtmlSpellLanguage *language;
language = gtkhtml_spell_language_lookup (language_code);
@@ -5054,7 +5047,6 @@ e_load_spell_languages (void)
spell_languages = g_list_prepend (
spell_languages, (gpointer) language);
- list = g_slist_delete_link (list, list);
g_free (language_code);
}
@@ -5069,54 +5061,37 @@ e_load_spell_languages (void)
if (language) {
spell_languages = g_list_prepend (
spell_languages, (gpointer) language);
-
- /* Don't overwrite the stored spell check language
- * codes if there was a problem retrieving them. */
- if (error == NULL)
- e_save_spell_languages (spell_languages);
}
}
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
-
return spell_languages;
}
void
e_save_spell_languages (GList *spell_languages)
{
- GConfClient *client;
- GSList *list = NULL;
- const gchar *key;
- GError *error = NULL;
+ GSettings *settings;
+ GPtrArray *lang_array;
/* Build a list of spell check language codes. */
+ lang_array = g_ptr_array_new ();
while (spell_languages != NULL) {
const GtkhtmlSpellLanguage *language;
const gchar *language_code;
language = spell_languages->data;
language_code = gtkhtml_spell_language_get_code (language);
- list = g_slist_prepend (list, (gpointer) language_code);
+ g_ptr_array_add (lang_array, (gpointer) language_code);
spell_languages = g_list_next (spell_languages);
}
- list = g_slist_reverse (list);
-
- /* Save the language codes to GConf. */
- client = gconf_client_get_default ();
- key = COMPOSER_GCONF_SPELL_LANGUAGES_KEY;
- gconf_client_set_list (client, key, GCONF_VALUE_STRING, list, &error);
- g_object_unref (client);
+ g_ptr_array_add (lang_array, NULL);
- g_slist_free (list);
+ /* Save the language codes to GSettings. */
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ g_settings_set_strv (settings, "composer-spell-languages", (const gchar * const *) lang_array->pdata);
+ g_object_unref (settings);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ g_ptr_array_free (lang_array, TRUE);
}
diff --git a/configure.ac b/configure.ac
index 8b64651c06..465e496028 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,6 +161,8 @@ if test "x${GCC}" = "xyes"; then
CFLAGS="$CFLAGS -fno-strict-aliasing"
fi
+GLIB_GSETTINGS
+
dnl ******************************
dnl I18N stuff
dnl ******************************
diff --git a/data/Makefile.am b/data/Makefile.am
index 3b17a94a3a..334de53f80 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -10,6 +10,32 @@ autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
+gsettings_SCHEMAS = \
+ org.gnome.evolution.gschema.xml \
+ org.gnome.evolution.addressbook.gschema.xml \
+ org.gnome.evolution.calendar.gschema.xml \
+ org.gnome.evolution.importer.gschema.xml \
+ org.gnome.evolution.mail.gschema.xml \
+ org.gnome.evolution.shell.gschema.xml \
+ org.gnome.evolution.bogofilter.gschema.xml \
+ org.gnome.evolution.spamassassin.gschema.xml \
+ org.gnome.evolution.plugin.attachment-reminder.gschema.xml \
+ org.gnome.evolution.plugin.autocontacts.gschema.xml \
+ org.gnome.evolution.plugin.email-custom-header.gschema.xml \
+ org.gnome.evolution.plugin.external-editor.gschema.xml \
+ org.gnome.evolution.plugin.face-picture.gschema.xml \
+ org.gnome.evolution.plugin.itip.gschema.xml \
+ org.gnome.evolution.plugin.mail-notification.gschema.xml \
+ org.gnome.evolution.plugin.prefer-plain.gschema.xml \
+ org.gnome.evolution.plugin.templates.gschema.xml
+
+@INTLTOOL_XML_NOMERGE_RULE@
+
+@GSETTINGS_RULES@
+
+convertdir = $(datadir)/GConf/gsettings
+convert_DATA = evolution.convert
+
mimedir = $(datadir)/mime-info
dist_mime_DATA = evolution.mime
@@ -54,6 +80,11 @@ CLEANFILES = \
EXTRA_DIST = \
$(autostart_in_files) \
- $(desktop_in_files)
+ $(desktop_in_files) \
+ $(convert_DATA) \
+ $(gsettings_SCHEMAS:.xml=.xml.in.in)
+
+DISTCLEANFILES = \
+ $(gsettings_SCHEMAS)
-include $(top_srcdir)/git.mk
diff --git a/data/evolution.convert b/data/evolution.convert
new file mode 100644
index 0000000000..46da5db91f
--- /dev/null
+++ b/data/evolution.convert
@@ -0,0 +1,282 @@
+[org.gnome.evolution]
+version = /apps/evolution/version
+last-upgraded-version = /apps/evolution/last_version
+disabled-eplugins = /apps/evolution/eplugin/disabled
+
+[org.gnome.evolution.shell]
+attachment-view = /apps/evolution/shell/attachment_view
+buttons-style = /apps/evolution/shell/view_defaults/buttons_style
+buttons-visible = /apps/evolution/shell/view_defaults/buttons_visible
+default-component-id = /apps/evolution/shell/view_defaults/component_id
+express-mode = /apps/evolution/shell/express_mode
+file-chooser-folder = /apps/evolution/shell/file_chooser_folder
+folder-bar-width = /apps/evolution/shell/view_defaults/folder_bar/width
+folder-paths = /apps/evolution/shell/offline/folder_paths
+sidebar-visible = /apps/evolution/shell/view_defaults/sidebar_visible
+skip-warning-dialog = /apps/evolution/shell/skip_warning_dialog
+start-offline = /apps/evolution/shell/start_offline
+statusbar-visible = /apps/evolution/shell/view_defaults/statusbar_visible
+toolbar-visible = /apps/evolution/shell/view_defaults/toolbar_visible
+window-height = /apps/evolution/shell/view_defaults/window_height
+window-maximized = /apps/evolution/shell/view_defaults/window_maximized
+window-width = /apps/evolution/shell/view_defaults/window_width
+window-x = /apps/evolution/shell/view_defaults/window_x
+window-y = /apps/evolution/shell/view_defaults/window_y
+
+[org.gnome.evolution.addressbook]
+address-formatting = /apps/evolution/addressbook/display/address_formatting
+completion-minimum-query-length = /apps/evolution/addressbook/completion/minimum_query_length
+completion-show-address = /apps/evolution/addressbook/completion/show_address
+hpane-position = /apps/evolution/addressbook/display/hpane_position
+layout = /apps/evolution/addressbook/display/layout
+preview-show-maps = /apps/evolution/addressbook/display/preview_show_maps
+primary-addressbook = /apps/evolution/addressbook/display/primary_addressbook
+select-names-last-used-uri = /apps/evolution/addressbook/select_names/last_used_uri
+show-preview = /apps/evolution/addressbook/display/show_preview
+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-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
+day-start-hour = /apps/evolution/calendar/display/day_start_hour
+day-start-minute = /apps/evolution/calendar/display/day_start_minute
+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
+editor-show-status = /apps/evolution/calendar/display/show_status
+editor-show-timezone = /apps/evolution/calendar/display/show_timezone
+editor-show-type = /apps/evolution/calendar/display/show_type
+hide-completed-tasks = /apps/evolution/calendar/tasks/hide_completed
+hide-completed-tasks-units = /apps/evolution/calendar/tasks/hide_completed_units
+hide-completed-tasks-value = /apps/evolution/calendar/tasks/hide_completed_value
+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
+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-layout = /apps/evolution/calendar/display/task_layout
+task-overdue-color = /apps/evolution/calendar/tasks/colors/overdue
+task-vpane-position = /apps/evolution/calendar/display/task_vpane_position
+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]
+gnome-calendar-done-calendar = /apps/evolution/importer/gnome-calendar/calendar
+gnome-calendar-done-tasks = /apps/evolution/importer/gnome-calendar/tasks
+
+[org.gnome.evolution.mail]
+address-compress = /apps/evolution/mail/display/address_compress
+address-count = /apps/evolution/mail/display/address_count
+animate-images = /apps/evolution/mail/display/animate_images
+caret-mode = /apps/evolution/mail/display/caret_mode
+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
+composer-inline-spelling = /apps/evolution/mail/composer/inline_spelling
+composer-magic-links = /apps/evolution/mail/composer/magic_links
+composer-magic-smileys = /apps/evolution/mail/composer/magic_smileys
+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
+composer-show-bcc = /apps/evolution/mail/composer/show_mail_bcc
+composer-show-cc = /apps/evolution/mail/composer/show_mail_cc
+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-show-reply-to = /apps/evolution/mail/composer/show_mail_reply_to
+composer-sign-reply-if-signed = /apps/evolution/mail/composer/sign_reply_if_signed
+composer-spell-color = /apps/evolution/mail/composer/spell_color
+composer-spell-languages = /apps/evolution/mail/composer/spell_languages
+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
+filter-editor-height = /apps/evolution/mail/filter_editor_height
+filter-editor-maximized = /apps/evolution/mail/filter_editor_maximized
+filter-editor-width = /apps/evolution/mail/filter_editor_width
+filters-log-actions = /apps/evolution/mail/filters/log
+filters-log-file = /apps/evolution/mail/filters/logfile
+flush-outbox = /apps/evolution/mail/filters/flush-outbox
+force-message-limit = /apps/evolution/mail/display/force_message_limit
+forward-style = /apps/evolution/mail/format/forward_style
+global-view-setting = /apps/evolution/mail/display/global_view_setting
+headers = /apps/evolution/mail/display/headers
+hpaned-size = /apps/evolution/mail/display/hpaned_size
+junk-check-custom-header = /apps/evolution/mail/junk/check_custom_header
+junk-check-incoming = /apps/evolution/mail/junk/check_incoming
+junk-custom-header = /apps/evolution/mail/junk/custom_header
+junk-default-plugin = /apps/evolution/mail/junk/default_plugin
+junk-empty-date = /apps/evolution/mail/junk/empty_date
+junk-empty-on-exit = /apps/evolution/mail/junk/empty_on_exit
+junk-empty-on-exit-days = /apps/evolution/mail/junk/empty_on_exit_days
+junk-lookup-addressbook = /apps/evolution/mail/junk/lookup_addressbook
+junk-lookup-addressbook-local-only = /apps/evolution/mail/junk/lookup_addressbook_local_only
+labels = /apps/evolution/mail/labels
+layout = /apps/evolution/mail/display/layout
+load-http-images = /apps/evolution/mail/display/load_http_images
+magic-spacebar = /apps/evolution/mail/display/magic_spacebar
+mail-browser-height = /apps/evolution/mail/mail_browser_height
+mail-browser-maximized = /apps/evolution/mail/mail_browser_maximized
+mail-browser-width = /apps/evolution/mail/mail_browser_width
+mark-citations = /apps/evolution/mail/display/mark_citations
+mark-seen = /apps/evolution/mail/display/mark_seen
+mark-seen-timeout = /apps/evolution/mail/display/mark_seen_timeout
+message-display-style = /apps/evolution/mail/format/message_display_style
+message-text-part-limit = /apps/evolution/mail/display/message_text_part_limit
+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
+prompt-on-empty-subject = /apps/evolution/mail/prompts/empty_subject
+prompt-on-empty-trash = /apps/evolution/mail/prompts/empty_trash
+prompt-on-expunge = /apps/evolution/mail/prompts/expunge
+prompt-on-invalid-recip = /apps/evolution/mail/prompts/send_invalid_recip
+prompt-on-list-reply-to = /apps/evolution/mail/prompts/list_reply_to
+prompt-on-mark-all-read = /apps/evolution/mail/prompts/mark_all_read
+prompt-on-only-bcc = /apps/evolution/mail/prompts/only_bcc
+prompt-on-open-many = /apps/evolution/mail/prompts/open_many
+prompt-on-private-list-reply = /apps/evolution/mail/prompts/private_list_reply
+prompt-on-reply-close-browser = /apps/evolution/mail/prompts/reply_close_browser
+prompt-on-reply-many-recips = /apps/evolution/mail/prompts/reply_many_recips
+prompt-on-unwanted-html = /apps/evolution/mail/prompts/unwanted_html
+reply-style = /apps/evolution/mail/format/reply_style
+safe-list = /apps/evolution/mail/display/safe_list
+save-dir = /apps/evolution/mail/save_dir
+send-recv-all-on-start = /apps/evolution/mail/send_recv_all_on_start
+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-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
+show-deleted = /apps/evolution/mail/display/show_deleted
+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
+sync-interval = /apps/evolution/mail/sync_interval
+thread-expand = /apps/evolution/mail/display/thread_expand
+thread-latest = /apps/evolution/mail/display/thread_latest
+thread-subject = /apps/evolution/mail/display/thread_subject
+trash-empty-date = /apps/evolution/mail/trash/empty_date
+trash-empty-on-exit = /apps/evolution/mail/trash/empty_on_exit
+trash-empty-on-exit-days = /apps/evolution/mail/trash/empty_on_exit_days
+use-custom-font = /apps/evolution/mail/display/fonts/use_custom
+variable-width-font = /apps/evolution/mail/display/fonts/variable
+vertical-view-fonts = /apps/evolution/mail/display/vertical_view_fonts
+vfolder-editor-height = /apps/evolution/mail/vfolder_editor_height
+vfolder-editor-maximized = /apps/evolution/mail/vfolder_editor_maximized
+vfolder-editor-width = /apps/evolution/mail/vfolder_editor_width
+
+[org.gnome.evolution.bogofilter]
+utf8-for-spam-filter = /apps/evolution/mail/junk/bogofilter/unicode
+
+[org.gnome.evolution.spamassassin]
+local-only = /apps/evolution/mail/junk/sa/local_only
+socket-path = "/apps/evolution/mail/junk/sa/socket_path
+spamc-binary = /apps/evolution/mail/junk/sa/spamc_binary
+spamd-binary = /apps/evolution/mail/junk/sa/spamd_binary
+use-daemon = /apps/evolution/mail/junk/sa/use_daemon
+
+[org.gnome.evolution.plugin.attachment-reminder]
+attachment-reminder-clues = /apps/evolution/mail/attachment_reminder_clues
+
+[org.gnome.evolution.plugin.autocontacts]
+addressbook-source = /apps/evolution/autocontacts/addressbook_source
+auto-sync-gaim = /apps/evolution/autocontacts/auto_sync_gaim
+enable = /apps/evolution/autocontacts/enable_autocontacts
+gaim-addressbook-source = /apps/evolution/autocontacts/gaim_addressbook_source
+gaim-check-interval = /apps/evolution/autocontacts/gaim_check_interval
+gaim-last-sync-md5 = /apps/evolution/autocontacts/gaim_last_sync_md5
+gaim-last-sync-time = /apps/evolution/autocontacts/gaim_last_sync_time
+
+[org.gnome.evolution.plugin.email-custom-header]
+custom-header = /apps/evolution/eplugin/email_custom_header/customHeader
+
+[org.gnome.evolution.plugin.external-editor]
+command = /apps/evolution/eplugin/external-editor/editor-command
+launch-on-key-press = /apps/evolution/eplugin/external-editor/launch-on-key-press
+
+[org.gnome.evolution.plugin.face-picture]
+insert-face-picture = /apps/evolution/eplugin/face/insert_by_default
+
+[org.gnome.evolution.plugin.itip]
+delete-processed = /apps/evolution/itip/delete_processed
+
+[org.gnome.evolution.plugin.mail-notification]
+notify-dbus-enabled = /apps/evolution/eplugin/mail-notification/dbus-enabled
+notify-only-inbox = /apps/evolution/eplugin/mail-notification/notify-only-inbox
+notify-sound-beep = /apps/evolution/eplugin/mail-notification/sound-beep
+notify-sound-enabled = /apps/evolution/eplugin/mail-notification/sound-enabled
+notify-sound-file = /apps/evolution/eplugin/mail-notification/sound-file
+notify-sound-play-file = /apps/evolution/eplugin/mail-notification/sound-play-file
+notify-sound-use-theme = /apps/evolution/eplugin/mail-notification/sound-use-theme
+notify-status-enabled = /apps/evolution/eplugin/mail-notification/status-enabled
+notify-status-notification = /apps/evolution/eplugin/mail-notification/status-notification
+
+[org.gnome.evolution.plugin.prefer-plain]
+mode = /apps/evolution/eplugin/prefer_plain/mode"
+show-suppressed = /apps/evolution/eplugin/prefer_plain/show_suppressed
+
+[org.gnome.evolution.plugin.templates]
+template-placeholders = /apps/evolution/mail/template_placeholders
diff --git a/data/org.gnome.evolution.addressbook.gschema.xml.in b/data/org.gnome.evolution.addressbook.gschema.xml.in
new file mode 100644
index 0000000000..0dcaeddbe0
--- /dev/null
+++ b/data/org.gnome.evolution.addressbook.gschema.xml.in
@@ -0,0 +1,54 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.addressbook" path="/org/gnome/evolution/addressbook/">
+ <key name="address-formatting" type="b">
+ <default>false</default>
+ <_summary>Enable address formatting</_summary>
+ <_description>Whether addresses should be formatted according to standard in their destination country</_description>
+ </key>
+ <key name="completion-minimum-query-length" type="i">
+ <default>3</default>
+ <_summary>Autocomplete length</_summary>
+ <_description>The number of characters that must be typed before Evolution will attempt to autocomplete.</_description>
+ </key>
+ <key name="completion-show-address" type="b">
+ <default>false</default>
+ <_summary>Show autocompleted name with an address</_summary>
+ <_description>Whether force showing the mail address with the name of the autocompleted contact in the entry.</_description>
+ </key>
+ <key name="select-names-last-used-uri" type="s">
+ <default>''</default>
+ <_summary>URI for the folder last used in the select names dialog</_summary>
+ <_description>URI for the folder last used in the select names dialog.</_description>
+ </key>
+ <key name="layout" type="i">
+ <default>0</default>
+ <_summary>Contact layout style</_summary>
+ <_description>The layout style determines where to place the preview pane in relation to the contact list. "0" (Classic View) places the preview pane below the contact list. "1" (Vertical View) places the preview pane next to the contact list.</_description>
+ </key>
+ <key name="hpane-position" type="i">
+ <default>200</default>
+ <_summary>Contact preview pane position (horizontal)</_summary>
+ <_description>Position of the contact preview pane when oriented horizontally.</_description>
+ </key>
+ <key name="vpane-position" type="i">
+ <default>400</default>
+ <_summary>Contact preview pane position (vertical)</_summary>
+ <_description>Position of the contact preview pane when oriented vertically.</_description>
+ </key>
+ <key name="preview-show-maps" type="b">
+ <default>false</default>
+ <_summary>Show maps</_summary>
+ <_description>Whether to show maps in preview pane</_description>
+ </key>
+ <key name="primary-addressbook" type="s">
+ <default>''</default>
+ <_summary>Primary address book</_summary>
+ <_description>The UID of the selected (or "primary") address book in the sidebar of the "Contacts" view</_description>
+ </key>
+ <key name="show-preview" type="b">
+ <default>true</default>
+ <_summary>Show preview pane</_summary>
+ <_description>Whether to show the preview pane.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.bogofilter.gschema.xml.in b/data/org.gnome.evolution.bogofilter.gschema.xml.in
new file mode 100644
index 0000000000..25ada49b56
--- /dev/null
+++ b/data/org.gnome.evolution.bogofilter.gschema.xml.in
@@ -0,0 +1,9 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.bogofilter" path="/org/gnome/evolution/bogofilter/">
+ <key name="utf8-for-spam-filter" type="b">
+ <default>true</default>
+ <_summary>Convert mail messages to Unicode</_summary>
+ <_description>Convert message text to Unicode UTF-8 to unify spam/ham tokens coming from different character sets.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.calendar.gschema.xml.in b/data/org.gnome.evolution.calendar.gschema.xml.in
new file mode 100644
index 0000000000..6217ce22d2
--- /dev/null
+++ b/data/org.gnome.evolution.calendar.gschema.xml.in
@@ -0,0 +1,319 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.calendar" path="/org/gnome/evolution/calendar/">
+ <key name="audio-dir" type="s">
+ <default>''</default>
+ <_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>
+ <_description>Shows the second time zone in a Day View, if set. Value is similar to one used in a 'timezone' key</_description>
+ </key>
+ <key name="day-second-zones" type="as">
+ <default>[]</default>
+ <_summary>Recently used second time zones in a Day View</_summary>
+ <_description>List of recently used second time zones in a Day View</_description>
+ </key>
+ <key name="day-second-zones-max" type="i">
+ <default>5</default>
+ <_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>
+ <_description>Whether to show categories field in the event/meeting editor</_description>
+ </key>
+ <key name="editor-show-role" type="b">
+ <default>true</default>
+ <_summary>Show Role field in the event/task/meeting editor</_summary>
+ <_description>Whether to show role field in the event/task/meeting editor</_description>
+ </key>
+ <key name="editor-show-rsvp" type="b">
+ <default>false</default>
+ <_summary>Show RSVP field in the event/task/meeting editor</_summary>
+ <_description>Whether to show RSVP field in the event/task/meeting editor</_description>
+ </key>
+ <key name="editor-show-status" type="b">
+ <default>false</default>
+ <_summary>Show status field in the event/task/meeting editor</_summary>
+ <_description>Whether to show status field in the event/task/meeting editor</_description>
+ </key>
+ <key name="editor-show-timezone" type="b">
+ <default>false</default>
+ <_summary>Show timezone field in the event/meeting editor</_summary>
+ <_description>Whether to show timezone field in the event/meeting editor</_description>
+ </key>
+ <key name="editor-show-type" type="b">
+ <default>false</default>
+ <_summary>Show type field in the event/task/meeting editor</_summary>
+ <_description>Whether to show type field in the event/task/meeting editor</_description>
+ </key>
+ <key name="hide-completed-tasks" type="b">
+ <default>false</default>
+ <_summary>Hide completed tasks</_summary>
+ <_description>Whether to hide completed tasks in the tasks view</_description>
+ </key>
+ <key name="hide-completed-tasks-units" type="s">
+ <default>'days'</default>
+ <_summary>Hide task units</_summary>
+ <_description>Units for determining when to hide tasks, "minutes", "hours" or "days"</_description>
+ </key>
+ <key name="hide-completed-tasks-value" type="i">
+ <default>1</default>
+ <_summary>Hide task value</_summary>
+ <_description>Number of units for determining when to hide tasks</_description>
+ </key>
+ <key name="hpane-position" type="i">
+ <default>400</default>
+ <_summary>Horizontal pane position</_summary>
+ <_description>Position of the horizontal pane, between the date navigator calendar and the task list when not in the month view, in pixels</_description>
+ </key>
+ <key name="last-notification-time" type="i">
+ <default>1</default>
+ <_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>
+ <_description>Position of the task preview pane when oriented horizontally</_description>
+ </key>
+ <key name="memo-layout" type="i">
+ <default>0</default>
+ <_summary>Memo layout style</_summary>
+ <_description>The layout style determines where to place the preview pane in relation to the memo list. "0" (Classic View) places the preview pane below the memo list. "1" (Vertical View) places the preview pane next to the memo list</_description>
+ </key>
+ <key name="memo-vpane-position" type="i">
+ <default>400</default>
+ <_summary>Memo preview pane position (vertical)</_summary>
+ <_description>Position of the memo preview pane when oriented vertically</_description>
+ </key>
+ <key name="month-hpane-position" type="i">
+ <default>32000</default>
+ <_summary>Month view horizontal pane position</_summary>
+ <_description>Position of the horizontal pane, between the view and the date navigator calendar and task list in the month view, in pixels</_description>
+ </key>
+ <key name="month-scroll-by-week" type="b">
+ <default>true</default>
+ <_summary>Scroll Month View by a week, not by a month</_summary>
+ <_description>Whether to scroll a Month View by a week, not by a month</_description>
+ </key>
+ <key name="notify-programs" type="as">
+ <default>[]</default>
+ <_summary>Reminder programs</_summary>
+ <_description>Programs that are allowed to be run by reminders</_description>
+ </key>
+ <key name="notify-with-tray" type="b">
+ <default>false</default>
+ <_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>
+ <_description>List of calendars to load</_description>
+ </key>
+ <key name="selected-memos" type="as">
+ <default>[]</default>
+ <_summary>List of selected memo lists</_summary>
+ <_description>List of memo lists to load</_description>
+ </key>
+ <key name="selected-tasks" type="as">
+ <default>[]</default>
+ <_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>
+ <_description>If "true", show the memo preview pane in the main window</_description>
+ </key>
+ <key name="show-task-preview" type="b">
+ <default>true</default>
+ <_summary>Show the task preview pane</_summary>
+ <_description>If "true", show the task preview pane in the main window</_description>
+ </key>
+ <key name="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>
+ <_description>Position of the task preview pane when oriented horizontally</_description>
+ </key>
+ <key name="task-layout" type="i">
+ <default>0</default>
+ <_summary>Task layout style</_summary>
+ <_description>The layout style determines where to place the preview pane in relation to the task list. "0" (Classic View) places the preview pane below the task list. "1" (Vertical View) places the preview pane next to the task list</_description>
+ </key>
+ <key name="task-vpane-position" type="i">
+ <default>400</default>
+ <_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>
+ <_description>The default timezone to use for dates and times in the calendar, as an untranslated Olsen timezone database location like "America/New York"</_description>
+ </key>
+ <key name="use-24hour-format" type="b">
+ <default>false</default>
+ <_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>
+ <_description>Days on which the start and end of work hours should be indicated</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.gschema.xml.in b/data/org.gnome.evolution.gschema.xml.in
new file mode 100644
index 0000000000..49e940d622
--- /dev/null
+++ b/data/org.gnome.evolution.gschema.xml.in
@@ -0,0 +1,19 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution" path="/org/gnome/evolution/">
+ <key name="version" type="s">
+ <default>''</default>
+ <_summary>Configuration version</_summary>
+ <_description>The configuration version of Evolution, with major/minor/configuration level (for example "2.6.0").</_description>
+ </key>
+ <key name="last-upgraded-version" type="s">
+ <default>''</default>
+ <_summary>Last upgraded configuration version</_summary>
+ <_description>The last upgraded configuration version of Evolution, with major/minor/configuration level (for example "2.6.0").</_description>
+ </key>
+ <key name="disabled-eplugins" type="as">
+ <default>[]</default>
+ <_summary>List of disabled plugins</_summary>
+ <_description>The list of disabled plugins in Evolution</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.importer.gschema.xml.in b/data/org.gnome.evolution.importer.gschema.xml.in
new file mode 100644
index 0000000000..83b3de78a2
--- /dev/null
+++ b/data/org.gnome.evolution.importer.gschema.xml.in
@@ -0,0 +1,14 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.importer" path="/org/gnome/evolution/importer/">
+ <key name="gnome-calendar-done-calendar" type="b">
+ <default>false</default>
+ <_summary>Gnome Calendar's calendar import done</_summary>
+ <_description>Whether calendar from Gnome Calendar has been imported or not</_description>
+ </key>
+ <key name="gnome-calendar-done-tasks" type="b">
+ <default>false</default>
+ <_summary>Gnome Calendar's tasks import done</_summary>
+ <_description>Whether tasks from Gnome Calendar have been imported or not</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.mail.gschema.xml.in b/data/org.gnome.evolution.mail.gschema.xml.in
new file mode 100644
index 0000000000..fdd1e14947
--- /dev/null
+++ b/data/org.gnome.evolution.mail.gschema.xml.in
@@ -0,0 +1,619 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.mail" path="/org/gnome/evolution/mail/">
+ <key name="prompt-check-if-default-mailer" type="b">
+ <default>true</default>
+ <_summary>Check whether Evolution is the default mailer</_summary>
+ <_description>Every time Evolution starts, check whether or not it is the default mailer.</_description>
+ </key>
+ <key name="composer-charset" type="s">
+ <default>''</default>
+ <_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>
+ <_description>Draw spelling error indicators on words as you type.</_description>
+ </key>
+ <key name="composer-magic-links" type="b">
+ <default>true</default>
+ <_summary>Automatic link recognition</_summary>
+ <_description>Recognize links in text and replace them.</_description>
+ </key>
+ <key name="composer-magic-smileys" type="b">
+ <default>false</default>
+ <_summary>Automatic emoticon recognition</_summary>
+ <_description>Recognize emoticons in text and replace them with images.</_description>
+ </key>
+ <key name="composer-message-attribution" type="s">
+ <default>''</default>
+ <_summary>Attribute message</_summary>
+ <_description>The text that is inserted when replying to a message, attributing the message to the original author</_description>
+ </key>
+ <key name="composer-message-forward" type="s">
+ <default>''</default>
+ <_summary>Forward message</_summary>
+ <_description>The text that is inserted when forwarding a message, saying that the forwarded message follows</_description>
+ </key>
+ <key name="composer-message-original" type="s">
+ <default>''</default>
+ <_summary>Original message</_summary>
+ <_description>The text that is inserted when replying to a message (top posting), saying that the original message follows</_description>
+ </key>
+ <key name="composer-group-reply-to-list" type="b">
+ <default>false</default>
+ <_summary>Group Reply replies to list</_summary>
+ <_description>Instead of the normal "Reply to All" behaviour, this option will make the 'Group Reply' toolbar button try to reply only to the mailing list through which you happened to receive the copy of the message to which you're replying.</_description>
+ </key>
+ <key name="composer-reply-start-bottom" type="b">
+ <default>false</default>
+ <_summary>Put the cursor at the bottom of replies</_summary>
+ <_description>Users get all up in arms over where the cursor should go when replying to a message. This determines whether the cursor is placed at the top of the message or the bottom.</_description>
+ </key>
+ <key name="composer-request-receipt" type="b">
+ <default>false</default>
+ <_summary>Always request read receipt</_summary>
+ <_description>Whether a read receipt request gets added to every message by default.</_description>
+ </key>
+ <key name="composer-send-html" type="b">
+ <default>false</default>
+ <_summary>Send HTML mail by default</_summary>
+ <_description>Send HTML mail by default.</_description>
+ </key>
+ <key name="composer-spell-color" type="s">
+ <default>'#FFFF00000000'</default>
+ <_summary>Spell checking color</_summary>
+ <_description>Underline color for misspelled words when using inline spelling.</_description>
+ </key>
+ <key name="composer-spell-languages" type="as">
+ <default>[]</default>
+ <_summary>Spell checking languages</_summary>
+ <_description>List of dictionary language codes used for spell checking.</_description>
+ </key>
+ <key name="composer-show-bcc" type="b">
+ <default>false</default>
+ <_summary>Show "Bcc" field when sending a mail message</_summary>
+ <_description>Show the "Bcc" field when sending a mail message. This is controlled from the View menu when a mail account is chosen.</_description>
+ </key>
+ <key name="composer-show-cc" type="b">
+ <default>true</default>
+ <_summary>Show "Cc" field when sending a mail message</_summary>
+ <_description>Show the "Cc" field when sending a mail message. This is controlled from the View menu when a mail account is chosen.</_description>
+ </key>
+ <key name="composer-show-reply-to" type="b">
+ <default>false</default>
+ <_summary>Show "Reply To" field when sending a mail message</_summary>
+ <_description>Show the "Reply To" field when sending a mail message. This is controlled from the View menu when a mail account is chosen.</_description>
+ </key>
+ <key name="composer-show-post-from" type="b">
+ <default>true</default>
+ <_summary>Show "From" field when posting to a newsgroup</_summary>
+ <_description>Show the "From" field when posting to a newsgroup. This is controlled from the View menu when a news account is chosen.</_description>
+ </key>
+ <key name="composer-show-post-reply-to" type="b">
+ <default>false</default>
+ <_summary>Show "Reply To" field when posting to a newsgroup</_summary>
+ <_description>Show the "Reply To" field when posting to a newsgroup. This is controlled from the View menu when a news account is chosen.</_description>
+ </key>
+ <key name="composer-sign-reply-if-signed" type="b">
+ <default>false</default>
+ <_summary>Digitally sign replies when the original message is signed</_summary>
+ <_description>Automatically enable PGP or S/MIME signatures when replying to a message which is also PGP or S/MIME signed.</_description>
+ </key>
+ <key name="composer-outlook-filenames" type="b">
+ <default>false</default>
+ <_summary>Encode file names in an Outlook/GMail way</_summary>
+ <_description>Encode file names in the mail headers same as Outlook or GMail do, to let them display correctly file names with UTF-8 letters sent by Evolution, because they do not follow the RFC 2231, but use the incorrect RFC 2047 standard.</_description>
+ </key>
+ <key name="composer-top-signature" type="b">
+ <default>false</default>
+ <_summary>Put personalized signatures at the top of replies</_summary>
+ <_description>Users get all up in arms over where their signature should go when replying to a message. This determines whether the signature is placed at the top of the message or the bottom.</_description>
+ </key>
+ <key name="composer-no-signature-delim" type="b">
+ <default>false</default>
+ <_summary>Do not add signature delimiter</_summary>
+ <_description>Set to TRUE in case you do not want to add signature delimiter before your signature when composing a mail.</_description>
+ </key>
+ <key name="composer-width" type="i">
+ <default>600</default>
+ <_summary>Composer Window default width</_summary>
+ <_description>Default width of the Composer Window.</_description>
+ </key>
+ <key name="composer-height" type="i">
+ <default>500</default>
+ <_summary>Composer Window default height</_summary>
+ <_description>Default height of the Composer Window.</_description>
+ </key>
+ <key name="composer-ignore-list-reply-to" type="b">
+ <default>false</default>
+ <_summary>Ignore list Reply-To:</_summary>
+ <_description>Some mailing lists set a Reply-To: header to trick users into sending replies to the list, even when they ask Evolution to make a private reply. Setting this option to TRUE will attempt to ignore such Reply-To: headers, so that Evolution will do as you ask it. If you use the private reply action, it will reply privately, while if you use the 'Reply to List' action it will do that. It works by comparing the Reply-To: header with a List-Post: header, if there is one.</_description>
+ </key>
+ <key name="show-animated-images" type="b">
+ <default>false</default>
+ <_summary>Show image animations</_summary>
+ <_description>Enable animated images in HTML mail. Many users find animated images annoying and prefer to see a static image instead.</_description>
+ </key>
+ <key name="side-bar-search" type="b">
+ <default>true</default>
+ <_summary>Enable or disable type ahead search feature</_summary>
+ <_description>Enable the side bar search feature to allow interactive searching of folder names.</_description>
+ </key>
+ <key name="no-folder-dots" type="b">
+ <default>false</default>
+ <_summary>Disable or enable ellipsizing of folder names in side bar</_summary>
+ <_description>Whether disable ellipsizing feature of folder names in side bar.</_description>
+ </key>
+ <key name="magic-spacebar" type="b">
+ <default>true</default>
+ <_summary>Enable or disable magic space bar</_summary>
+ <_description>Enable this to use Space bar key to scroll in message preview, message list and folders.</_description>
+ </key>
+ <key name="global-view-setting" type="b">
+ <default>false</default>
+ <_summary>Enable to use a similar message list view settings for all folders</_summary>
+ <_description>Enable to use a similar message list view settings for all folders.</_description>
+ </key>
+ <key name="mark-citations" type="b">
+ <default>true</default>
+ <_summary>Mark citations in the message "Preview"</_summary>
+ <_description>Mark citations in the message "Preview".</_description>
+ </key>
+ <key name="citation-colour" type="s">
+ <default>'#737373'</default>
+ <_summary>Citation highlight color</_summary>
+ <_description>Citation highlight color.</_description>
+ </key>
+ <key name="caret-mode" type="b">
+ <default>false</default>
+ <_summary>Enable/disable caret mode</_summary>
+ <_description>Enable caret mode, so that you can see a cursor when reading mail.</_description>
+ </key>
+ <key name="charset" type="s">
+ <default>''</default>
+ <_summary>Default charset in which to display messages</_summary>
+ <_description>Default charset in which to display messages.</_description>
+ </key>
+ <key name="load-http-images" type="i">
+ <default>0</default>
+ <_summary>Load images for HTML messages over HTTP</_summary>
+ <_description>
+ Load images for HTML messages over HTTP(S). Possible values are:
+ "0" - Never load images off the net.
+ "1" - Load images in messages from contacts.
+ "2" - Always load images off the net.
+ </_description>
+ </key>
+ <key name="animate-images" type="b">
+ <default>true</default>
+ <_summary>Show Animations</_summary>
+ <_description>Show animated images as animations.</_description>
+ </key>
+ <key name="show-all-headers" type="b">
+ <default>false</default>
+ <_summary>Show all message headers</_summary>
+ <_description>Show all the headers when viewing a messages.</_description>
+ </key>
+ <key name="headers" type="as">
+ <default>[]</default>
+ <_summary>List of custom headers and whether they are enabled.</_summary>
+ <_description>This key should contain a list of XML structures specifying custom headers, and whether they are to be displayed. The format of the XML structure is &lt;header enabled&gt; - set enabled if the header is to be displayed in the mail view.</_description>
+ </key>
+ <key name="show-sender-photo" type="b">
+ <default>false</default>
+ <_summary>Show photo of the sender</_summary>
+ <_description>Show the photo of the sender in the message reading pane.</_description>
+ </key>
+ <key name="photo-local" type="b">
+ <default>true</default>
+ <_summary>Search for the sender photo in local address books </_summary>
+ <_description>This option would help in improving the speed of fetching.</_description>
+ </key>
+ <key name="mime-types" type="as">
+ <default>[]</default>
+ <_summary>List of MIME types to check for Bonobo component viewers</_summary>
+ <_description>If there isn't a builtin viewer for a particular MIME type inside Evolution, any MIME types appearing in this list which map to a Bonobo component viewer in GNOME's MIME type database may be used for displaying content.</_description>
+ </key>
+ <key name="mark-seen" type="b">
+ <default>true</default>
+ <_summary>Mark as Seen after specified timeout</_summary>
+ <_description>Mark as Seen after specified timeout.</_description>
+ </key>
+ <key name="mark-seen-timeout" type="i">
+ <default>1500</default>
+ <_summary>Timeout for marking message as seen</_summary>
+ <_description>Timeout for marking message as seen.</_description>
+ </key>
+ <key name="show-email" type="b">
+ <default>false</default>
+ <_summary>Sender email-address column in the message list</_summary>
+ <_description>Show the email-address of the sender in a separate column in the message list.</_description>
+ </key>
+ <key name="vertical-view-fonts" type="b">
+ <default>false</default>
+ <_summary>Determines whether to use the same fonts for both "From" and "Subject" lines in the "Messages" column in vertical view</_summary>
+ <_description>Determines whether to use the same fonts for both "From" and "Subject" lines in the "Messages" column in vertical view.</_description>
+ </key>
+ <key name="show-deleted" type="b">
+ <default>false</default>
+ <_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>
+ <_description>Enable search folders on startup.</_description>
+ </key>
+ <key name="safe-list" type="b">
+ <default>false</default>
+ <_summary>Hides the per-folder preview and removes the selection</_summary>
+ <_description>This key is read only once and reset to "false" after read. This unselects the mail in the list and removes the preview for that folder.</_description>
+ </key>
+ <key name="paned-size" type="i">
+ <default>144</default>
+ <_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>
+ <_description>Width of the message-list pane.</_description>
+ </key>
+ <key name="layout" type="i">
+ <default>0</default>
+ <_summary>Layout style</_summary>
+ <_description>The layout style determines where to place the preview pane in relation to the message list. "0" (Classic View) places the preview pane below the message list. "1" (Vertical View) places the preview pane next to the message list.</_description>
+ </key>
+ <key name="variable-width-font" type="s">
+ <default>'Sans 12'</default>
+ <_summary>Variable width font</_summary>
+ <_description>The variable width font for mail display.</_description>
+ </key>
+ <key name="monospace-font" type="s">
+ <default>'Monospace 12'</default>
+ <_summary>Terminal font</_summary>
+ <_description>The terminal font for mail display.</_description>
+ </key>
+ <key name="use-custom-font" type="b">
+ <default>false</default>
+ <_summary>Use custom fonts</_summary>
+ <_description>Use custom fonts for displaying mail.</_description>
+ </key>
+ <key name="address-compress" type="b">
+ <default>true</default>
+ <_summary>Compress display of addresses in TO/CC/BCC</_summary>
+ <_description>Compress display of addresses in TO/CC/BCC to the number specified in address_count.</_description>
+ </key>
+ <key name="force-message-limit" type="b">
+ <default>true</default>
+ <_summary>Display only message texts not exceeding certain size</_summary>
+ <_description>Enable to display only message texts not exceeding size defined in 'message_text_part_limit' key.</_description>
+ </key>
+ <key name="message-text-part-limit" type="i">
+ <default>4096</default>
+ <_summary>Message text limit for display</_summary>
+ <_description>This decides the max size of the message text that will be displayed under Evolution, specified in terms of KB. The default is 4096 (4MB). This value is used only when 'force_message_limit' key is activated.</_description>
+ </key>
+ <key name="address-count" type="i">
+ <default>5</default>
+ <_summary>Number of addresses to display in TO/CC/BCC</_summary>
+ <_description>This sets the number of addresses to show in default message list view, beyond which a '...' is shown.</_description>
+ </key>
+ <key name="thread-subject" type="b">
+ <default>false</default>
+ <_summary>Thread the message-list based on Subject</_summary>
+ <_description>Whether or not to fall back on threading by subjects when the messages do not contain In-Reply-To or References headers.</_description>
+ </key>
+ <key name="thread-expand" type="b">
+ <default>true</default>
+ <_summary>Default value for thread expand state</_summary>
+ <_description>This setting specifies whether the threads should be in expanded or collapsed state by default. Evolution requires a restart.</_description>
+ </key>
+ <key name="thread-latest" type="b">
+ <default>true</default>
+ <_summary>Whether sort threads based on latest message in that thread</_summary>
+ <_description>This setting specifies whether the threads should be sorted based on latest message in each thread, rather than by message's date. Evolution requires a restart.</_description>
+ </key>
+ <key name="mail-browser-width" type="i">
+ <default>600</default>
+ <_summary>Mail browser width</_summary>
+ <_description>Default width of the mail browser window.</_description>
+ </key>
+ <key name="mail-browser-height" type="i">
+ <default>400</default>
+ <_summary>Mail browser height</_summary>
+ <_description>Default height of the mail browser window.</_description>
+ </key>
+ <key name="mail-browser-maximized" type="b">
+ <default>false</default>
+ <_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>
+ <_description>Initial height of the "Folder Subscriptions" window. The value updates as the user resizes the window vertically.</_description>
+ </key>
+ <key name="subscription-editor-maximized" type="b">
+ <default>false</default>
+ <_summary>"Folder Subscriptions" window maximize state</_summary>
+ <_description>Initial maximize state of the "Folder Subscriptions" window. The value updates when the user maximizes or unmaximizes the window. Note, this particular value is not used by Evolution since the "Folder Subscriptions" window cannot be maximized. This key exists only as an implementation detail.</_description>
+ </key>
+ <key name="subscription-editor-width" type="i">
+ <default>600</default>
+ <_summary>"Folder Subscriptions" window width</_summary>
+ <_description>Initial width of the "Folder Subscriptions" window. The value updates as the user resizes the window horizontally.</_description>
+ </key>
+ <key name="filters-log-actions" type="b">
+ <default>false</default>
+ <_summary>Log filter actions</_summary>
+ <_description>Log filter actions to the specified log file.</_description>
+ </key>
+ <key name="filters-log-file" type="s">
+ <default>''</default>
+ <_summary>Logfile to log filter actions</_summary>
+ <_description>Logfile to log filter actions.</_description>
+ </key>
+ <key name="flush-outbox" type="b">
+ <default>false</default>
+ <_summary>Flush Outbox after filtering</_summary>
+ <_description>Whether to flush Outbox after filtering is done. Outbox flush will happen only when there was used any 'Forward to' filter action and approximately one minute after the last action invocation.</_description>
+ </key>
+ <key name="forward-style" type="i">
+ <default>0</default>
+ <_summary>Default forward style</_summary>
+ <_description></_description>
+ </key>
+ <key name="reply-style" type="i">
+ <default>0</default>
+ <_summary>Default forward style</_summary>
+ <_description></_description>
+ </key>
+ <key name="message-display-style" type="i">
+ <default>0</default>
+ <_summary>Message-display style ("normal", "full headers", "source")</_summary>
+ <_description></_description>
+ </key>
+ <key name="prompt-on-empty-subject" type="b">
+ <default>true</default>
+ <_summary>Prompt on empty subject</_summary>
+ <_description>Prompt the user when he or she tries to send a message without a Subject.</_description>
+ </key>
+ <key name="prompt-on-empty-trash" type="b">
+ <default>true</default>
+ <_summary>Prompt when emptying the trash</_summary>
+ <_description>Prompt the user when he or she tries to empty the trash.</_description>
+ </key>
+ <key name="prompt-on-expunge" type="b">
+ <default>true</default>
+ <_summary>Prompt when user expunges</_summary>
+ <_description>Prompt the user when he or she tries to expunge a folder.</_description>
+ </key>
+ <key name="prompt-on-invalid-recip" type="b">
+ <default>true</default>
+ <_summary>Prompt before sending to recipients not entered as mail addresses</_summary>
+ <_description>It disables/enables the repeated prompts to warn that you are trying to send a message to recipients not entered as mail addresses</_description>
+ </key>
+ <key name="prompt-on-only-bcc" type="b">
+ <default>true</default>
+ <_summary>Prompt when user only fills Bcc</_summary>
+ <_description>Prompt when user tries to send a message with no To or Cc recipients.</_description>
+ </key>
+ <key name="prompt-on-unwanted-html" type="b">
+ <default>true</default>
+ <_summary>Prompt when user tries to send unwanted HTML</_summary>
+ <_description>Prompt when user tries to send HTML mail to recipients that may not want to receive HTML mail.</_description>
+ </key>
+ <key name="prompt-on-open-many" type="b">
+ <default>true</default>
+ <_summary>Prompt when user tries to open 10 or more messages at once</_summary>
+ <_description>If a user tries to open 10 or more messages at one time, ask the user if they really want to do it.</_description>
+ </key>
+ <key name="prompt-on-mark-all-read" type="b">
+ <default>true</default>
+ <_summary>Prompt while marking multiple messages</_summary>
+ <_description>Enable or disable the prompt whilst marking multiple messages.</_description>
+ </key>
+ <key name="prompt-on-delete-in-vfolder" type="b">
+ <default>false</default>
+ <_summary>Prompt when deleting messages in search folder</_summary>
+ <_description>It disables/enables the repeated prompts to warn that deleting messages from a search folder permanently deletes the message, not simply removing it from the search results.</_description>
+ </key>
+ <key name="prompt-on-private-list-reply" type="b">
+ <default>true</default>
+ <_summary>Prompt when replying privately to list messages</_summary>
+ <_description>It disables/enables the repeated prompts to warn that you are sending a private reply to a message which arrived via a mailing list.</_description>
+ </key>
+ <key name="prompt-on-list-reply-to" type="b">
+ <default>true</default>
+ <_summary>Prompt when mailing list hijacks private replies</_summary>
+ <_description>It disables/enables the repeated prompts to warn that you are trying sending a private reply to a message which arrived via a mailing list, but the list sets a Reply-To: header which redirects your reply back to the list</_description>
+ </key>
+ <key name="prompt-on-reply-many-recips" type="b">
+ <default>true</default>
+ <_summary>Prompt when replying to many recipients</_summary>
+ <_description>It disables/enables the repeated prompts to warn that you are sending a reply to many people.</_description>
+ </key>
+ <key name="prompt-on-reply-close-browser" type="s">
+ <default>'ask'</default>
+ <_summary>Asks whether to close the message window when the user forwards or replies to the message shown in the window</_summary>
+ <_description>Possible values are: 'never' - to never close browser window, 'always' - to always close browser window or 'ask' - (or any other value) will ask user.</_description>
+ </key>
+ <key name="trash-empty-on-exit" type="b">
+ <default>false</default>
+ <_summary>Empty Trash folders on exit</_summary>
+ <_description>Empty all Trash folders when exiting Evolution.</_description>
+ </key>
+ <key name="trash-empty-on-exit-days" type="i">
+ <default>0</default>
+ <_summary>Minimum days between emptying the trash on exit</_summary>
+ <_description>Minimum time between emptying the trash on exit, in days.</_description>
+ </key>
+ <key name="trash-empty-date" type="i">
+ <default>0</default>
+ <_summary>Last time Empty Trash was run</_summary>
+ <_description>The last time Empty Trash was run, in days since January 1st, 1970 (Epoch).</_description>
+ </key>
+ <key name="error-timeout" type="i">
+ <default>60</default>
+ <_summary>Amount of time in seconds the error should be shown on the status bar.</_summary>
+ <_description>Amount of time in seconds the error should be shown on the status bar.</_description>
+ </key>
+ <key name="error-level" type="i">
+ <default>0</default>
+ <_summary>Level beyond which the message should be logged.</_summary>
+ <_description>This can have three possible values. "0" for errors. "1" for warnings. "2" for debug messages.</_description>
+ </key>
+ <key name="show-real-date" type="b">
+ <default>true</default>
+ <_summary>Show original "Date" header value.</_summary>
+ <_description>Show the original "Date" header (with a local time only if the time zone differs). Otherwise always show "Date" header value in a user preferred format and local time zone.</_description>
+ </key>
+ <key name="labels" type="as">
+ <default>['I_mportant:#EF2929','_Work:#F57900','_Personal:#4E9A06','_To Do:#3465A4','_Later:#75507B']</default>
+ <_summary>List of Labels and their associated colors</_summary>
+ <_description>List of labels known to the mail component of Evolution. The list contains strings containing name:color where color uses the HTML hex encoding.</_description>
+ </key>
+ <key name="junk-check-incoming" type="b">
+ <default>true</default>
+ <_summary>Check incoming mail being junk</_summary>
+ <_description>Run junk test on incoming mail.</_description>
+ </key>
+ <key name="junk-empty-on-exit" type="b">
+ <default>false</default>
+ <_summary>Empty Junk folders on exit</_summary>
+ <_description>Empty all Junk folders when exiting Evolution.</_description>
+ </key>
+ <key name="junk-empty-on-exit-days" type="i">
+ <default>0</default>
+ <_summary>Minimum days between emptying the junk on exit</_summary>
+ <_description>Minimum time between emptying the junk on exit, in days.</_description>
+ </key>
+ <key name="junk-empty-date" type="i">
+ <default>0</default>
+ <_summary>Last time Empty Junk was run</_summary>
+ <_description>The last time Empty Junk was run, in days since January 1st, 1970 (Epoch).</_description>
+ </key>
+ <key name="junk-default-plugin" type="s">
+ <default>'Bogofilter'</default>
+ <_summary>The default plugin for Junk hook</_summary>
+ <_description>This is the default junk plugin, even though there are multiple plugins enabled. If the default listed plugin is disabled, then it won't fall back to the other available plugins.</_description>
+ </key>
+ <key name="junk-lookup-addressbook" type="b">
+ <default>false</default>
+ <_summary>Determines whether to lookup in address book for sender email</_summary>
+ <_description>Determines whether to lookup the sender email in address book. If found, it shouldn't be a spam. It looks up in the books marked for autocompletion. It can be slow, if remote address books (like LDAP) are marked for autocompletion.</_description>
+ </key>
+ <key name="junk-lookup-addressbook-local-only" type="b">
+ <default>false</default>
+ <_summary>Determines whether to look up addresses for junk filtering in local address book only</_summary>
+ <_description>This option is related to the key lookup_addressbook and is used to determine whether to look up addresses in local address book only to exclude mail sent by known contacts from junk filtering.</_description>
+ </key>
+ <key name="junk-check-custom-header" type="b">
+ <default>true</default>
+ <_summary>Determines whether to use custom headers to check for junk</_summary>
+ <_description>Determines whether to use custom headers to check for junk. If this option is enabled and the headers are mentioned, it will be improve the junk checking speed.</_description>
+ </key>
+ <key name="junk-custom-header" type="as">
+ <default>['X-Spam-Flag=YES','X-Spam-Level=*****']</default>
+ <_summary>Custom headers to use while checking for junk.</_summary>
+ <_description>Custom headers to use while checking for junk. The list elements are string in the format "headername=value".</_description>
+ </key>
+ <key name="default-account" type="s">
+ <default>''</default>
+ <_summary>UID string of the default account.</_summary>
+ <_description>UID string of the default account.</_description>
+ </key>
+ <key name="save-dir" type="s">
+ <default>''</default>
+ <_summary>Save directory</_summary>
+ <_description>Directory for saving mail component files.</_description>
+ </key>
+ <key name="composer-current-folder" type="s">
+ <default>''</default>
+ <_summary>Composer load/attach directory</_summary>
+ <_description>Directory for loading/attaching files to composer.</_description>
+ </key>
+ <key name="filter-editor-height" type="i">
+ <default>650</default>
+ <_summary>"Filter Editor" window height</_summary>
+ <_description>Initial height of the "Filter Editor" window. The value updates as the user resizes the window vertically.</_description>
+ </key>
+ <key name="filter-editor-maximized" type="b">
+ <default>false</default>
+ <_summary>"Filter Editor" window maximize state</_summary>
+ <_description>Initial maximize state of the "Filter Editor" window. The value updates when the user maximizes or unmaximizes the window. Note, this particular value is not used by Evolution since the "Filter Editor" window cannot be maximized. This key exists only as an implementation detail.</_description>
+ </key>
+ <key name="filter-editor-width" type="i">
+ <default>400</default>
+ <_summary>"Filter Editor" window width</_summary>
+ <_description>Initial width of the "Filter Editor" window. The value updates as the user resizes the window horizontally.</_description>
+ </key>
+ <key name="send-recv-height" type="i">
+ <default>200</default>
+ <_summary>"Send and Receive Mail" window height</_summary>
+ <_description>Initial height of the "Send and Receive Mail" window. The value updates as the user resizes the window vertically.</_description>
+ </key>
+ <key name="send-recv-maximized" type="b">
+ <default>false</default>
+ <_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>
+ <_description>Initial width of the "Send and Receive Mail" window. The value updates as the user resizes the window horizontally.</_description>
+ </key>
+ <key name="vfolder-editor-height" type="i">
+ <default>650</default>
+ <_summary>"Search Folder Editor" window height</_summary>
+ <_description>Initial height of the "Search Folder Editor" window. The value updates as the user resizes the window vertically.</_description>
+ </key>
+ <key name="vfolder-editor-maximized" type="b">
+ <default>false</default>
+ <_summary>"Search Folder Editor" window maximize state</_summary>
+ <_description>Initial maximize state of the "Search Folder Editor" window. The value updates when the user maximizes or unmaximizes the window. Note, this particular value is not used by Evolution since the "Search Folder Editor" window cannot be maximized. This key exists only as an implementation detail.</_description>
+ </key>
+ <key name="vfolder-editor-width" type="i">
+ <default>400</default>
+ <_summary>"Search Folder Editor" window width</_summary>
+ <_description>Initial width of the "Search Folder Editor" window. The value updates as the user resizes the window horizontally.</_description>
+ </key>
+ <key name="sync-interval" type="i">
+ <default>600</default>
+ <_summary>Server synchronization interval</_summary>
+ <_description>Controls how frequently local changes are synchronized with the remote mail server. The interval must be at least 30 seconds.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.attachment-reminder.gschema.xml.in b/data/org.gnome.evolution.plugin.attachment-reminder.gschema.xml.in
new file mode 100644
index 0000000000..51779d478d
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.attachment-reminder.gschema.xml.in
@@ -0,0 +1,9 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.attachment-reminder" path="/org/gnome/evolution/plugin/attachment-reminder/">
+ <key name="attachment-reminder-clues" type="as">
+ <default>['attachment','attaching','attached','enclosed']</default>
+ <_summary>List of clues for the attachment reminder plugin to look for in a message body</_summary>
+ <_description>List of clues for the attachment reminder plugin to look for in a message body.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.autocontacts.gschema.xml.in b/data/org.gnome.evolution.plugin.autocontacts.gschema.xml.in
new file mode 100644
index 0000000000..7d9aefc9e9
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.autocontacts.gschema.xml.in
@@ -0,0 +1,39 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.autocontacts" path="/org/gnome/evolution/plugin/autocontacts/">
+ <key name="addressbook-source" type="s">
+ <default>''</default>
+ <_summary>Address book source</_summary>
+ <_description>Address book to use for storing automatically synced contacts</_description>
+ </key>
+ <key name="auto-sync-gaim" type="b">
+ <default>false</default>
+ <_summary>Auto sync GAIM contacts</_summary>
+ <_description>Whether GAIM contacts should be automaticall synced</_description>
+ </key>
+ <key name="enable" type="b">
+ <default>false</default>
+ <_summary>Enable autocontacts</_summary>
+ <_description>Whether contacts should be automatically added to the user's addressbook</_description>
+ </key>
+ <key name="gaim-addressbook-source" type="s">
+ <default>''</default>
+ <_summary>GAIM address book source</_summary>
+ <_description>Address book to use for storing automatically synced contacts from GAIM</_description>
+ </key>
+ <key name="gaim-check-interval" type="i">
+ <default>10</default>
+ <_summary>GAIM check interval</_summary>
+ <_description>Check interval for GAIM syncing of contacts</_description>
+ </key>
+ <key name="gaim-last-sync-md5" type="s">
+ <default>''</default>
+ <_summary>GAIM last sync MD5</_summary>
+ <_description>GAIM last sync MD5</_description>
+ </key>
+ <key name="gaim-last-sync-time" type="s">
+ <default>''</default>
+ <_summary>GAIM last sync time</_summary>
+ <_description>GAIM last sync time</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.email-custom-header.gschema.xml.in b/data/org.gnome.evolution.plugin.email-custom-header.gschema.xml.in
new file mode 100644
index 0000000000..87e526fdb1
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.email-custom-header.gschema.xml.in
@@ -0,0 +1,9 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.email-custom-header" path="/org/gnome/evolution/plugin/email-custom-header/">
+ <key name="custom-header" type="as">
+ <default>['Security=Personal;Unclassified;Protected;InConfidence;Secret;Topsecret']</default>
+ <_summary>List of Custom Headers</_summary>
+ <_description>The key specifies the list of custom headers that you can add to an outgoing message. The format for specifying a Header and Header value is: Name of the custom header followed by "=" and the values separated by ";"</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.external-editor.gschema.xml.in b/data/org.gnome.evolution.plugin.external-editor.gschema.xml.in
new file mode 100644
index 0000000000..f69cc1bc4f
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.external-editor.gschema.xml.in
@@ -0,0 +1,14 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.external-editor" path="/org/gnome/evolution/plugin/external-editor/">
+ <key name="command" type="s">
+ <default>'gedit'</default>
+ <_summary>Default External Editor</_summary>
+ <_description>The default command that must be used as the editor.</_description>
+ </key>
+ <key name="launch-on-key-press" type="b">
+ <default>false</default>
+ <_summary>Automatically launch when a new mail is edited</_summary>
+ <_description>Automatically launch editor when key is pressed in the mail composer.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.face-picture.gschema.xml.in b/data/org.gnome.evolution.plugin.face-picture.gschema.xml.in
new file mode 100644
index 0000000000..b7c7682c52
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.face-picture.gschema.xml.in
@@ -0,0 +1,9 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.face-picture" path="/org/gnome/evolution/plugin/face-picture/">
+ <key name="insert-face-picture" type="b">
+ <default>false</default>
+ <_summary>Insert Face picture by default</_summary>
+ <_description>Whether insert Face picture to outgoing messages by default. The picture should be set before checking this, otherwise nothing happens.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.itip.gschema.xml.in b/data/org.gnome.evolution.plugin.itip.gschema.xml.in
new file mode 100644
index 0000000000..af7513a5e3
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.itip.gschema.xml.in
@@ -0,0 +1,9 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.itip" path="/org/gnome/evolution/plugin/itip/">
+ <key name="delete-processed" type="b">
+ <default>false</default>
+ <_summary>Delete processed</_summary>
+ <_description>Whether to delete processed iTip objects</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.mail-notification.gschema.xml.in b/data/org.gnome.evolution.plugin.mail-notification.gschema.xml.in
new file mode 100644
index 0000000000..c49d8b0e07
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.mail-notification.gschema.xml.in
@@ -0,0 +1,49 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.mail-notification" path="/org/gnome/evolution/plugin/mail-notification/">
+ <key name="notify-only-inbox" type="b">
+ <default>true</default>
+ <_summary>Notify new messages for Inbox only.</_summary>
+ <_description>Whether to notify new messages in Inbox folder only.</_description>
+ </key>
+ <key name="notify-dbus-enabled" type="b">
+ <default>true</default>
+ <_summary>Enable D-Bus messages.</_summary>
+ <_description>Generates a D-Bus message when new mail messages arrive.</_description>
+ </key>
+ <key name="notify-status-enabled" type="b">
+ <default>true</default>
+ <_summary>Enable icon in notification area.</_summary>
+ <_description>Show new mail icon in notification area when new messages arrive.</_description>
+ </key>
+ <key name="notify-status-notification" type="b">
+ <default>true</default>
+ <_summary>Popup message together with the icon.</_summary>
+ <_description>Whether show message over the icon when new messages arrive.</_description>
+ </key>
+ <key name="notify-sound-enabled" type="b">
+ <default>true</default>
+ <_summary>Play sound when new messages arrive.</_summary>
+ <_description>Whether play sound or beep when new messages arrive.</_description>
+ </key>
+ <key name="notify-sound-beep" type="b">
+ <default>true</default>
+ <_summary>Beep or play sound file.</_summary>
+ <_description>If "true", then beep, otherwise will play sound file when new messages arrive.</_description>
+ </key>
+ <key name="notify-sound-file" type="s">
+ <default>''</default>
+ <_summary>Sound file name to be played.</_summary>
+ <_description>Sound file to be played when new messages arrive, if not in beep mode.</_description>
+ </key>
+ <key name="notify-sound-play-file" type="b">
+ <default>false</default>
+ <_summary>FIXME</_summary>
+ <_description>FIXME</_description>
+ </key>
+ <key name="notify-sound-use-theme" type="b">
+ <default>false</default>
+ <_summary>Use sound theme</_summary>
+ <_description>Play themed sound when new messages arrive, if not in beep mode.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.prefer-plain.gschema.xml.in b/data/org.gnome.evolution.plugin.prefer-plain.gschema.xml.in
new file mode 100644
index 0000000000..2cb7477a0d
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.prefer-plain.gschema.xml.in
@@ -0,0 +1,14 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.prefer-plain" path="/org/gnome/evolution/plugin/prefer-plain/">
+ <key name="mode" type="s">
+ <default>'normal'</default>
+ <_summary>Mode to use when displaying mails</_summary>
+ <_description>The mode to use for displaying mails. "normal" makes Evolution choose the best part to show, "prefer_plain" makes it use the text part, if present, and "only_plain" forces Evolution to only show plain text</_description>
+ </key>
+ <key name="show-suppressed" type="b">
+ <default>true</default>
+ <_summary>Whether to show suppressed HTML output</_summary>
+ <_description>Whether to show suppressed HTML output</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.plugin.templates.gschema.xml.in b/data/org.gnome.evolution.plugin.templates.gschema.xml.in
new file mode 100644
index 0000000000..e0163ef8df
--- /dev/null
+++ b/data/org.gnome.evolution.plugin.templates.gschema.xml.in
@@ -0,0 +1,9 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.plugin.templates" path="/org/gnome/evolution/plugin/templates/">
+ <key name="template-placeholders" type="as">
+ <default>['myphone=012345','myplace=Abcd','myname=Alice']</default>
+ <_summary>List of keyword/value pairs for the Templates plugin to substitute in a message body.</_summary>
+ <_description>List of keyword/value pairs for the Templates plugin to substitute in a message body.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.shell.gschema.xml.in b/data/org.gnome.evolution.shell.gschema.xml.in
new file mode 100644
index 0000000000..36e2c99523
--- /dev/null
+++ b/data/org.gnome.evolution.shell.gschema.xml.in
@@ -0,0 +1,94 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.shell" path="/org/gnome/evolution/shell/">
+ <key name="skip-warning-dialog" type="b">
+ <default>false</default>
+ <_summary>Skip development warning dialog</_summary>
+ <_description>Whether the warning dialog in development versions of Evolution is skipped.</_description>
+ </key>
+ <key name="attachment-view" type="i">
+ <default>0</default>
+ <_summary>Initial attachment view</_summary>
+ <_description>Initial view for attachment bar widgets. "0" is Icon View, "1" is List View.</_description>
+ </key>
+ <key name="file-chooser-folder" type="s">
+ <default>''</default>
+ <_summary>Initial file chooser folder</_summary>
+ <_description>Initial folder for GtkFileChooser dialogs.</_description>
+ </key>
+ <key name="start-offline" type="b">
+ <default>false</default>
+ <_summary>Start in offline mode</_summary>
+ <_description> Whether Evolution will start up in offline mode instead of online mode.</_description>
+ </key>
+ <key name="folder-paths" type="as">
+ <default>[]</default>
+ <_summary>Offline folder paths</_summary>
+ <_description>List of paths for the folders to be synchronized to disk for offline usage.</_description>
+ </key>
+ <key name="express-mode" type="b">
+ <default>false</default>
+ <_summary>Enable express mode</_summary>
+ <_description>Flag that enables a much simplified user interface.</_description>
+ </key>
+ <key name="window-y" type="i">
+ <default>0</default>
+ <_summary>Default window Y coordinate</_summary>
+ <_description>The default Y coordinate for the main window.</_description>
+ </key>
+ <key name="window-x" type="i">
+ <default>0</default>
+ <_summary>Default window X coordinate</_summary>
+ <_description>The default X coordinate for the main window.</_description>
+ </key>
+ <key name="window-width" type="i">
+ <default>640</default>
+ <_summary>Default window width</_summary>
+ <_description>The default width for the main window, in pixels.</_description>
+ </key>
+ <key name="window-height" type="i">
+ <default>480</default>
+ <_summary>Default window height</_summary>
+ <_description>The default height for the main window, in pixels.</_description>
+ </key>
+ <key name="window-maximized" type="b">
+ <default>true</default>
+ <_summary>Default window state</_summary>
+ <_description>Whether or not the window should be maximized.</_description>
+ </key>
+ <key name="buttons-visible" type="b">
+ <default>true</default>
+ <_summary>Window buttons are visible</_summary>
+ <_description>Whether the window buttons should be visible.</_description>
+ </key>
+ <key name="buttons-style" type="s">
+ <default>'toolbar'</default>
+ <_summary>Window button style</_summary>
+ <_description>The style of the window buttons. Can be "text", "icons", "both", "toolbar". If "toolbar" is set, the style of the buttons is determined by the GNOME toolbar setting.</_description>
+ </key>
+ <key name="toolbar-visible" type="b">
+ <default>true</default>
+ <_summary>Toolbar is visible</_summary>
+ <_description>Whether the toolbar should be visible.</_description>
+ </key>
+ <key name="sidebar-visible" type="b">
+ <default>true</default>
+ <_summary>Sidebar is visible</_summary>
+ <_description>Whether the sidebar should be visible.</_description>
+ </key>
+ <key name="statusbar-visible" type="b">
+ <default>true</default>
+ <_summary>Statusbar is visible</_summary>
+ <_description>Whether the status bar should be visible.</_description>
+ </key>
+ <key name="default-component-id" type="s">
+ <default>'mail'</default>
+ <_summary>ID or alias of the component to be shown by default at start-up.</_summary>
+ <_description>ID or alias of the component to be shown by default at start-up.</_description>
+ </key>
+ <key name="folder-bar-width" type="i">
+ <default>200</default>
+ <_summary>Default sidebar width</_summary>
+ <_description>The default width for the sidebar, in pixels.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.evolution.spamassassin.gschema.xml.in b/data/org.gnome.evolution.spamassassin.gschema.xml.in
new file mode 100644
index 0000000000..7a95d07a35
--- /dev/null
+++ b/data/org.gnome.evolution.spamassassin.gschema.xml.in
@@ -0,0 +1,29 @@
+<schemalist>
+ <schema gettext-domain="evolution" id="org.gnome.evolution.spamassassin" path="/org/gnome/evolution/spamassassin/">
+ <key name="local-only" type="b">
+ <default>true</default>
+ <_summary>Use only local spam tests.</_summary>
+ <_description>Use only the local spam tests (no DNS).</_description>
+ </key>
+ <key name="socket-path" type="s">
+ <default>''</default>
+ <_summary>Socket path for SpamAssassin</_summary>
+ <_description>Socket path for SpamAssassin</_description>
+ </key>
+ <key name="use-daemon" type="b">
+ <default>true</default>
+ <_summary>Use SpamAssassin daemon and client</_summary>
+ <_description>Use SpamAssassin daemon and client (spamc/spamd).</_description>
+ </key>
+ <key name="spamc-binary" type="s">
+ <default>'spamc'</default>
+ <_summary>SpamAssassin client binary</_summary>
+ <_description>SpamAssassin client binary</_description>
+ </key>
+ <key name="spamd-binary" type="s">
+ <default>'spamd'</default>
+ <_summary>SpamAssassin daemon binary</_summary>
+ <_description>SpamAssassin daemon binary</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c
index 877b170218..a1fb490fdd 100644
--- a/e-util/e-datetime-format.c
+++ b/e-util/e-datetime-format.c
@@ -664,7 +664,9 @@ e_datetime_format_format_tm (const gchar *component,
}
gboolean
-e_datetime_format_includes_day_name (const gchar *component, const gchar *part, DTFormatKind kind)
+e_datetime_format_includes_day_name (const gchar *component,
+ const gchar *part,
+ DTFormatKind kind)
{
gchar *key;
const gchar *fmt;
diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c
index a19dc879b3..a125e6832d 100644
--- a/e-util/e-plugin.c
+++ b/e-util/e-plugin.c
@@ -25,8 +25,6 @@
#include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
-
#include <libebackend/e-module.h>
#include <libedataserver/e-data-server-util.h>
#include <libedataserver/e-xml-utils.h>
@@ -73,7 +71,7 @@ static GHashTable *ep_types;
static GSList *ep_path;
/* global table of plugins by plugin.id */
static GHashTable *ep_plugins;
-/* the list of disabled plugins from gconf */
+/* the list of disabled plugins from GSettings */
static GSList *ep_disabled;
/* All classes which implement EPluginHooks, by class.id */
@@ -108,7 +106,9 @@ static void
ep_set_enabled (const gchar *id,
gint state)
{
- GConfClient *client;
+ GSettings *settings;
+ GSList *link;
+ GPtrArray *array;
/* Bail out if no change to state, when expressed as a boolean: */
if ((state == 0) == (ep_check_enabled (id) == 0))
@@ -126,11 +126,16 @@ ep_set_enabled (const gchar *id,
} else
ep_disabled = g_slist_prepend (ep_disabled, g_strdup (id));
- client = gconf_client_get_default ();
- gconf_client_set_list (
- client, "/apps/evolution/eplugin/disabled",
- GCONF_VALUE_STRING, ep_disabled, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution");
+ array = g_ptr_array_new ();
+ for (link = ep_disabled; link != NULL; link = link->next)
+ g_ptr_array_add (array, link->data);
+ g_ptr_array_add (array, NULL);
+ g_settings_set_strv (
+ settings, "disabled-eplugins",
+ (const gchar * const *) array->pdata);
+ g_ptr_array_free (array, TRUE);
+ g_object_unref (settings);
}
static gint
@@ -523,8 +528,9 @@ plugin_hook_load_subclass (GType type,
gint
e_plugin_load_plugins (void)
{
- GConfClient *client;
+ GSettings *settings;
GSList *l;
+ gchar **strv;
gint i;
if (eph_types != NULL)
@@ -544,11 +550,12 @@ e_plugin_load_plugins (void)
E_TYPE_PLUGIN_HOOK, (ETypeFunc)
plugin_hook_load_subclass, eph_types);
- client = gconf_client_get_default ();
- ep_disabled = gconf_client_get_list (
- client, "/apps/evolution/eplugin/disabled",
- GCONF_VALUE_STRING, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution");
+ strv = g_settings_get_strv (settings, "disabled-eplugins");
+ for (i = 0, ep_disabled = NULL; strv[i] != NULL; i++)
+ ep_disabled = g_slist_append (ep_disabled, g_strdup (strv[i]));
+ g_strfreev (strv);
+ g_object_unref (settings);
for (i = 0; i < 3; i++) {
for (l = ep_path; l; l = g_slist_next (l)) {
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 037db0fa63..afc1d9eefd 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -264,7 +264,6 @@ free_func (gpointer data,
/**
* e_signature_list_new:
- * @gconf: a #GConfClient
*
* Reads the list of signaturess from @gconf and listens for changes.
* Will emit #signature_added, #signature_changed, and #signature_removed
@@ -278,14 +277,16 @@ free_func (gpointer data,
* Return value: the list of signatures
**/
ESignatureList *
-e_signature_list_new (GConfClient *gconf)
+e_signature_list_new (void)
{
ESignatureList *signature_list;
-
- g_return_val_if_fail (GCONF_IS_CLIENT (gconf), NULL);
+ GConfClient *client;
signature_list = g_object_new (E_TYPE_SIGNATURE_LIST, NULL);
- e_signature_list_construct (signature_list, gconf);
+
+ client = gconf_client_get_default ();
+ e_signature_list_construct (signature_list, client);
+ g_object_unref (client);
return signature_list;
}
diff --git a/e-util/e-signature-list.h b/e-util/e-signature-list.h
index f2c9df7865..866bc73b65 100644
--- a/e-util/e-signature-list.h
+++ b/e-util/e-signature-list.h
@@ -24,11 +24,10 @@
#ifndef E_SIGNATURE_LIST_H
#define E_SIGNATURE_LIST_H
+#include <gconf/gconf-client.h>
#include <libedataserver/e-list.h>
#include <e-util/e-signature.h>
-#include <gconf/gconf-client.h>
-
/* Standard GObject macros */
#define E_TYPE_SIGNATURE_LIST \
(e_signature_list_get_type ())
@@ -72,7 +71,7 @@ struct _ESignatureListClass {
};
GType e_signature_list_get_type (void);
-ESignatureList *e_signature_list_new (GConfClient *client);
+ESignatureList *e_signature_list_new (void);
void e_signature_list_construct (ESignatureList *signature_list,
GConfClient *client);
void e_signature_list_save (ESignatureList *signature_list);
diff --git a/e-util/e-signature-utils.c b/e-util/e-signature-utils.c
index fca51d3799..7a5a7829ac 100644
--- a/e-util/e-signature-utils.c
+++ b/e-util/e-signature-utils.c
@@ -26,7 +26,6 @@
#include <errno.h>
#include <camel/camel.h>
#include <glib/gstdio.h>
-#include <gconf/gconf-client.h>
#ifndef G_OS_WIN32
#include <sys/wait.h>
@@ -39,13 +38,8 @@ static ESignatureList *global_signature_list;
ESignatureList *
e_get_signature_list (void)
{
- if (G_UNLIKELY (global_signature_list == NULL)) {
- GConfClient *client;
-
- client = gconf_client_get_default ();
- global_signature_list = e_signature_list_new (client);
- g_object_unref (client);
- }
+ if (G_UNLIKELY (global_signature_list == NULL))
+ global_signature_list = e_signature_list_new ();
g_return_val_if_fail (global_signature_list != NULL, NULL);
diff --git a/e-util/e-signature.c b/e-util/e-signature.c
index 185378d565..1b49389a82 100644
--- a/e-util/e-signature.c
+++ b/e-util/e-signature.c
@@ -29,7 +29,6 @@
#include <libxml/xmlmemory.h>
#include <glib/gi18n-lib.h>
-#include <gconf/gconf-client.h>
#include <libedataserver/e-uid.h>
#include <libedataserver/e-data-server-util.h>
diff --git a/e-util/e-util.c b/e-util/e-util.c
index d41f43630e..0db804a618 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1394,7 +1394,7 @@ e_binding_transform_color_to_string (GBinding *binding,
g_value_set_string (target_value, "");
} else {
/* encode color manually, because css styles expect colors in #rrggbb,
- not in #rrrrggggbbbb, which is a result of gdk_color_to_string()
+ * not in #rrrrggggbbbb, which is a result of gdk_color_to_string()
*/
string = g_strdup_printf ("#%02x%02x%02x",
(gint) color->red * 256 / 65536,
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
index e6e71187c1..fbbd3bcd78 100644
--- a/em-format/em-format-quote.c
+++ b/em-format/em-format-quote.c
@@ -28,7 +28,6 @@
#include <string.h>
#include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
#include "em-inline-filter.h"
#include "em-stripsig-filter.h"
@@ -88,7 +87,7 @@ emfq_format_clone (EMFormat *emf,
{
EMFormatQuote *emfq = (EMFormatQuote *) emf;
const EMFormatHandler *handle;
- GConfClient *gconf;
+ GSettings *settings;
/* Chain up to parent's format_clone() method. */
EM_FORMAT_CLASS (parent_class)->format_clone (
@@ -98,12 +97,12 @@ emfq_format_clone (EMFormat *emf,
G_SEEKABLE (emfq->priv->stream),
0, G_SEEK_SET, NULL, NULL);
- gconf = gconf_client_get_default ();
- if (gconf_client_get_bool (
- gconf, "/apps/evolution/mail/composer/top_signature", NULL))
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ if (g_settings_get_boolean (
+ settings, "composer-top-signature"))
camel_stream_write_string (
emfq->priv->stream, "<br>\n", cancellable, NULL);
- g_object_unref (gconf);
+ g_object_unref (settings);
handle = em_format_find_handler(emf, "x-evolution/message/prefix");
if (handle)
handle->handler (
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 40f9baa3d5..4647a70a79 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -1363,10 +1363,9 @@ em_format_format_text (EMFormat *emf,
const gchar *charset = NULL;
CamelMimeFilterWindows *windows = NULL;
CamelStream *mem_stream = NULL;
- const gchar *key;
gsize size;
gsize max;
- GConfClient *gconf;
+ GSettings *settings;
if (emf->charset) {
charset = emf->charset;
@@ -1411,15 +1410,13 @@ em_format_format_text (EMFormat *emf,
max = -1;
- gconf = gconf_client_get_default ();
- key = "/apps/evolution/mail/display/force_message_limit";
- if (gconf_client_get_bool (gconf, key, NULL)) {
- key = "/apps/evolution/mail/display/message_text_part_limit";
- max = gconf_client_get_int (gconf, key, NULL);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ if (g_settings_get_boolean (settings, "force-message-limit")) {
+ max = g_settings_get_int (settings, "message-text-part-limit");
if (max == 0)
max = -1;
}
- g_object_unref (gconf);
+ g_object_unref (settings);
size = camel_data_wrapper_decode_to_stream_sync (
emf->mode == EM_FORMAT_MODE_SOURCE ?
diff --git a/help/C/mail-error-failed-to-append-to-sent-folder.page b/help/C/mail-error-failed-to-append-to-sent-folder.page
new file mode 100644
index 0000000000..7cc5923c38
--- /dev/null
+++ b/help/C/mail-error-failed-to-append-to-sent-folder.page
@@ -0,0 +1,32 @@
+<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its"
+ type="topic" id="mail-error-failed-to-append-to-sent-folder">
+
+ <info>
+ <desc>What to do when this error is shown.</desc>
+
+ <link type="guide" xref="index#common-mail-problems" />
+
+ <revision pkgversion="3.0.2" version="0.1" date="2011-07-21" status="final"/>
+ <credit type="author">
+ <name>April Gonzales</name>
+ <email>loonycookie@gmail.com</email>
+ </credit>
+ <credit type="author">
+ <name>Andre Klapper</name>
+ <email>ak-47@gmx.net</email>
+ </credit>
+ <license>
+ <p>Creative Commons Share Alike 3.0</p>
+ </license>
+
+ </info>
+
+<title>Error message "Failed to append to..." after sending message</title>
+
+<p>If the error message "Your message was sent, but an error occurred during post-processing. The reported error was "Failed to append to mbox:///home/user/.local/share/evolution/mail/local#Sent: Cannot get folder 'Sent': folder does not exist. Appending to local 'Sent' folder instead."." is shown, you can fix the problem by editing your default folder settings under <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Mail Accounts</gui><gui style="button">Edit</gui><gui>Defaults</gui><gui>Folder for sent messages</gui></guiseq>.</p>
+<p>This bug is fixed in Evolution versions higher than 3.0.2 (stable series) and 3.1.3 (unstable development series). If this is not the case, please add a comment to the corresponding <link href="https://bugzilla.gnome.org/show_bug.cgi?id=638307">bug report</link>.</p>
+
+
+
+</page>
+
diff --git a/help/C/mail-error-folder-mismatch.page b/help/C/mail-error-folder-mismatch.page
new file mode 100644
index 0000000000..8154e4b20a
--- /dev/null
+++ b/help/C/mail-error-folder-mismatch.page
@@ -0,0 +1,52 @@
+<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its"
+ type="topic" id="mail-error-folder-mismatch">
+
+ <info>
+ <desc>What to do when this error is shown.</desc>
+
+ <link type="guide" xref="index#common-mail-problems" />
+
+ <revision pkgversion="3.1.5" version="0.4" date="2011-07-28" status="final"/>
+ <credit type="author">
+ <name>April Gonzales</name>
+ <email>loonycookie@gmail.com</email>
+ </credit>
+ <credit type="author">
+ <name>Andre Klapper</name>
+ <email>ak-47@gmx.net</email>
+ </credit>
+ <license>
+ <p>Creative Commons Share Alike 3.0</p>
+ </license>
+
+ </info>
+
+<title>Error message "Summary and folder mismatch" after synchronizing folders</title>
+
+<p>If the error message: <gui>Error while Expunging folder. Error storing `~/.local/share/evolution/mail/local/Inbox (mbox)': Summary and folder mismatch, even after a sync.</gui> pops up, perform the following steps:</p>
+
+<note><p>These steps apply to the versions 3.0 and 3.2. Note that Evolution's file locations in 2.30 and 2.32 are different (<file>~/.evolution/mail/local/</file> instead of <file>~/.local/share/evolution/mail/local/</file>).</p></note>
+
+<list>
+<item><p>Open the Terminal application (category <gui>System Tools</gui>) and type in the command <code>evolution --force-shutdown</code>. This command stops Evolution and all the processes related to it.</p></item>
+<item><p>Remove the files ending in:</p>
+ <list>
+ <item><p><file>.ev-summary</file></p></item>
+ <item><p><file>.ibex.index</file></p></item>
+ </list>
+ <p>To do this, navigate to the hidden directory <file>~/.local/share/evolution/mail/local/</file> and locate the specified files. You can do this in the GNOME File Manager (Nautilus) by either showing hidden files, or by entering the directory via <guiseq><gui>Go</gui><gui>Location...</gui></guiseq> from the menu bar.</p>
+</item>
+
+<item><p>Restart Evolution. Note that restarting the application may take some time since it will need to rebuild the indexes deleted in the previous step.</p></item>
+</list>
+
+<note>
+<p>You may lose your mail labels when performing this operation.</p>
+</note>
+
+<note>
+<p>This problem is expected to be fixed in version 3.0 according to the corresponding <link href="https://bugzilla.gnome.org/show_bug.cgi?id=550414">bug report</link>. Please add a comment if this is not the case.</p> <!-- TODO:POST-3-2: Remove from docs once really fixed -->
+</note>
+
+</page>
+
diff --git a/help/C/mail-error-no-provider-available.page b/help/C/mail-error-no-provider-available.page
new file mode 100644
index 0000000000..308a5ff6fb
--- /dev/null
+++ b/help/C/mail-error-no-provider-available.page
@@ -0,0 +1,49 @@
+<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its"
+ type="topic" id="mail-error-no-provider-available">
+
+ <info>
+ <desc>What to do when this error is shown.</desc>
+
+ <link type="guide" xref="index#common-mail-problems" />
+
+ <revision pkgversion="2.28.3" version="0.2" date="2010-12-08" status="review"/>
+ <credit type="author">
+ <name>April Gonzales</name>
+ <email>loonycookie@gmail.com</email>
+ </credit>
+ <license>
+ <p>Creative Commons Share Alike 3.0</p>
+ </license>
+
+ </info>
+
+<title>Error message "No provider available for protocol email"</title>
+
+<p>This error message may be displayed for a number of reasons:</p>
+<list>
+
+<item>
+<p>The filters used do not match the account they are associated with.</p>
+<p>This happens when the <file>filters.xml</file> file is copied and used on a fresh install of Evolution on a new machine.</p>
+<p>Accounts have unique ID numbers, and filters refer to these accounts directly. Simply copying the <file>filters.xml</file> file will cause a version mismatch with Evolution, affecting the filter rules.</p>
+
+</item>
+<item><p>The account settings may not have been copied properly.</p></item>
+<item><p>The account settings were modified.</p></item>
+</list>
+
+<p>To fix this problem, edit the email filters and re-select the folder for each Copy/Move filter. To do this:</p>
+<steps>
+<item><p>Go to <guiseq><gui>Edit</gui><gui>Message Filters</gui></guiseq>.</p></item>
+<item><p>Select the Copy/Move filter and click <gui>Edit</gui>.</p></item>
+<item><p>Refer to the list of folders associated with that particular filter. Click on the button that allows you to modify the folders assigned for that filter. Set the folders again. </p></item>
+</steps>
+
+<note>
+<p>Advanced users may also be interested in this write up: <link href="https://thomas.apestaart.org/thomas/trac/wiki/Evolution">How to keep the Evolution filters in sync on multiple machines by Thomas Vander Stichele </link>
+</p>
+</note>
+
+<!-- The guide referenced above might make a useful addition to the docs. We should consider asking Thomas for permission to include it, if it seems suitable. -->
+
+</page>
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index 71c7d95906..b9ece1f504 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -67,7 +67,6 @@ static void gnome_canvas_pixbuf_bounds (GnomeCanvasItem *item,
G_DEFINE_TYPE (GnomeCanvasPixbuf, gnome_canvas_pixbuf, GNOME_TYPE_CANVAS_ITEM)
-
/* Class initialization function for the pixbuf canvas item */
static void
gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index 8f921a0d3c..d14effacca 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -46,7 +46,6 @@
#include "gnome-canvas-util.h"
#include "gnome-canvas-i18n.h"
-
/* Object argument IDs */
enum {
PROP_0,
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index a48ca30f29..a33f8c98b8 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -27,8 +27,6 @@
#include <glib/gi18n.h>
-#include "e-util/gconf-bridge.h"
-
#include "e-attachment-store.h"
#include "e-attachment-icon-view.h"
#include "e-attachment-tree-view.h"
@@ -272,13 +270,10 @@ static void
mail_attachment_bar_constructed (GObject *object)
{
EMailAttachmentBarPrivate *priv;
- GConfBridge *bridge;
- const gchar *key;
+ GSettings *settings;
priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (object);
- bridge = gconf_bridge_get ();
-
/* Set up property-to-property bindings. */
g_object_bind_property (
@@ -329,10 +324,10 @@ mail_attachment_bar_constructed (GObject *object)
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- /* Set up property-to-GConf bindings. */
-
- key = "/apps/evolution/shell/attachment_view";
- gconf_bridge_bind_property (bridge, key, object, "active-view");
+ /* Set up property-to-GSettings bindings. */
+ settings = g_settings_new ("org.gnome.evolution.shell");
+ g_settings_bind (settings, "attachment-view", object, "active-view", G_SETTINGS_BIND_DEFAULT);
+ g_object_unref (settings);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_mail_attachment_bar_parent_class)->constructed (object);
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index e9c837206f..ec0e9251e0 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -542,7 +542,7 @@ mail_browser_constructed (GObject *object)
EShell *shell;
EFocusTracker *focus_tracker;
ESearchBar *search_bar;
- GConfBridge *bridge;
+ GSettings *settings;
GtkAccelGroup *accel_group;
GtkActionGroup *action_group;
GtkAction *action;
@@ -551,7 +551,6 @@ mail_browser_constructed (GObject *object)
GtkWidget *widget;
EWebView *web_view;
const gchar *domain;
- const gchar *key;
const gchar *id;
guint merge_id;
@@ -698,13 +697,13 @@ mail_browser_constructed (GObject *object)
G_CALLBACK (em_format_queue_redraw),
browser->priv->formatter);
- /* Bind GObject properties to GConf keys. */
+ /* Bind GObject properties to GSettings keys. */
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
object = G_OBJECT (reader);
- key = "/apps/evolution/mail/display/show_deleted";
- gconf_bridge_bind_property (bridge, key, object, "show-deleted");
+ g_settings_bind (settings, "show-deleted", object, "show-deleted", G_SETTINGS_BIND_DEFAULT);
+ g_object_unref (settings);
id = "org.gnome.evolution.mail.browser";
e_plugin_ui_register_manager (ui_manager, id, object);
diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c
index bcc915ccc4..bc9cb5ab3e 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -27,7 +27,6 @@
#include <glib/gi18n.h>
#include <camel/camel.h>
-#include "e-util/gconf-bridge.h"
#define E_MAIL_LABEL_LIST_STORE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -35,6 +34,7 @@
struct _EMailLabelListStorePrivate {
GHashTable *tag_index;
+ GSettings *mail_settings;
};
static struct {
@@ -167,6 +167,23 @@ mail_label_list_store_get_stock_id (EMailLabelListStore *store,
}
static void
+mail_label_list_store_dispose (GObject *object)
+{
+ EMailLabelListStorePrivate *priv;
+
+ priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
+
+ if (priv->mail_settings != NULL) {
+ g_object_unref (priv->mail_settings);
+ priv->mail_settings = NULL;
+ }
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_mail_label_list_store_parent_class)->
+ dispose (object);
+}
+
+static void
mail_label_list_store_finalize (GObject *object)
{
EMailLabelListStorePrivate *priv;
@@ -180,19 +197,104 @@ mail_label_list_store_finalize (GObject *object)
finalize (object);
}
+static void labels_settings_changed_cb (GSettings *settings, const gchar *key, gpointer user_data);
+
+static void
+labels_model_changed_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
+{
+ EMailLabelListStore *store;
+ GPtrArray *array;
+ GtkTreeIter tmp_iter;
+ gboolean res;
+
+ store = E_MAIL_LABEL_LIST_STORE (user_data);
+
+ /* Make sure we don't enter an infinite synchronizing loop */
+ g_signal_handlers_block_by_func (store->priv->mail_settings, labels_settings_changed_cb, store);
+
+ /* Build list to store in GSettings */
+ array = g_ptr_array_new ();
+ res = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &tmp_iter);
+ while (res) {
+ gchar *string;
+
+ gtk_tree_model_get (GTK_TREE_MODEL (store), &tmp_iter,
+ 0, &string, -1);
+ g_ptr_array_add (array, string);
+
+ res = gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &tmp_iter);
+ }
+
+ g_ptr_array_add (array, NULL);
+ g_settings_set_strv (
+ store->priv->mail_settings, "labels",
+ (const gchar * const *) array->pdata);
+
+ g_ptr_array_free (array, TRUE);
+ g_signal_handlers_unblock_by_func (store->priv->mail_settings, labels_settings_changed_cb, store);
+}
+
+static void
+labels_settings_changed_cb (GSettings *settings,
+ const gchar *key,
+ gpointer user_data)
+{
+ EMailLabelListStore *store;
+ gchar **strv;
+ gint i;
+
+ store = E_MAIL_LABEL_LIST_STORE (user_data);
+
+ /* Make sure we don't enter an infinite synchronizing loop */
+ g_signal_handlers_block_by_func (store, labels_model_changed_cb, store);
+
+ gtk_list_store_clear (GTK_LIST_STORE (store));
+
+ strv = g_settings_get_strv (store->priv->mail_settings, "labels");
+ for (i = 0; strv[i] != NULL; i++) {
+ GtkTreeIter iter;
+
+ gtk_list_store_insert_with_values (GTK_LIST_STORE (store),
+ &iter, -1,
+ 0, strv[i],
+ -1);
+ }
+
+ g_strfreev (strv);
+
+ g_signal_handlers_unblock_by_func (store, labels_model_changed_cb, store);
+}
+
static void
mail_label_list_store_constructed (GObject *object)
{
EMailLabelListStore *store;
- GConfBridge *bridge;
- const gchar *key;
store = E_MAIL_LABEL_LIST_STORE (object);
- bridge = gconf_bridge_get ();
- key = "/apps/evolution/mail/labels";
- gconf_bridge_bind_string_list_store (
- bridge, key, GTK_LIST_STORE (store));
+ /* Connect to GSettings' change notifications */
+ store->priv->mail_settings = g_settings_new ("org.gnome.evolution.mail");
+ g_signal_connect (
+ store->priv->mail_settings, "changed::labels",
+ G_CALLBACK (labels_settings_changed_cb), store);
+ labels_settings_changed_cb (store->priv->mail_settings, "labels", store);
+
+ /* Connect to ListStore change notifications */
+ g_signal_connect (
+ store, "row-inserted",
+ G_CALLBACK (labels_model_changed_cb), store);
+ g_signal_connect (
+ store, "row-changed",
+ G_CALLBACK (labels_model_changed_cb), store);
+ g_signal_connect (
+ store, "row-deleted",
+ G_CALLBACK (labels_model_changed_cb), store);
+ g_signal_connect (
+ store, "rows-reordered",
+ G_CALLBACK (labels_model_changed_cb), store);
mail_label_list_store_ensure_defaults (store);
@@ -235,6 +337,7 @@ e_mail_label_list_store_class_init (EMailLabelListStoreClass *class)
g_type_class_add_private (class, sizeof (EMailLabelListStorePrivate));
object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = mail_label_list_store_dispose;
object_class->finalize = mail_label_list_store_finalize;
object_class->constructed = mail_label_list_store_constructed;
@@ -264,10 +367,10 @@ e_mail_label_list_store_init (EMailLabelListStore *store)
/* XXX While it may seem awkward to cram the label name and color
* into a single string column, we do it for the benefit of
- * letting GConfBridge keep the model in sync with GConf.
+ * letting GSettings keep the model in sync.
*
* XXX There's a valid argument to be made that this information
- * doesn't belong in GConf in the first place. A key file
+ * doesn't belong in GSettings in the first place. A key file
* under $(user_data_dir)/mail would work better. */
gtk_list_store_set_column_types (GTK_LIST_STORE (store), 1, &type);
}
@@ -381,7 +484,7 @@ e_mail_label_list_store_get_tag (EMailLabelListStore *store,
strv = g_strsplit_set (encoded, ":|", 3);
/* XXX I guess for historical reasons the default label tags have
- * a "$Label" prefix, but the default list in GConf doesn't
+ * a "$Label" prefix, but the default list in GSettings doesn't
* include tags. That's why the <tag> part is optional.
* So if we're missing the <tag> part, look it up in the
* hard-coded default list above.
@@ -408,7 +511,7 @@ e_mail_label_list_store_get_tag (EMailLabelListStore *store,
}
}
- /* XXX Still no luck? The label list in GConf must be screwed up.
+ /* XXX Still no luck? The label list in GSettings must be screwed up.
* We must not return NULL because the tag is used as a key in
* the index hash table, so generate a tag from the name. */
if (result == NULL)
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index d1811394de..1634044589 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -30,7 +30,6 @@
#include <libedataserver/e-data-server-util.h>
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/menus/gal-view-instance.h"
#include "widgets/misc/e-paned.h"
@@ -219,21 +218,23 @@ mail_paned_view_restore_state_cb (EShellWindow *shell_window,
EShellView *shell_view,
EMailPanedView *view)
{
- GConfBridge *bridge;
+ EMailPanedViewPrivate *priv;
+ GSettings *settings;
GObject *object;
- const gchar *key;
- /* Bind GObject properties to GConf keys. */
+ priv = E_MAIL_PANED_VIEW (view)->priv;
+
+ /* Bind GObject properties to GSettings keys. */
+
+ settings = g_settings_new ("org.gnome.evolution.mail");
- bridge = gconf_bridge_get ();
+ object = G_OBJECT (priv->paned);
+ g_settings_bind (settings, "hpaned-size", object, "hposition", G_SETTINGS_BIND_DEFAULT);
- object = G_OBJECT (view->priv->paned);
- key = "/apps/evolution/mail/display/hpaned_size";
- gconf_bridge_bind_property (bridge, key, object, "hposition");
+ object = G_OBJECT (priv->paned);
+ g_settings_bind (settings, "paned-size", object, "vposition", G_SETTINGS_BIND_DEFAULT);
- object = G_OBJECT (view->priv->paned);
- key = "/apps/evolution/mail/display/paned_size";
- gconf_bridge_bind_property (bridge, key, object, "vposition");
+ g_object_unref (settings);
}
static void
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 799ea1a92c..27af0d2b4b 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -36,7 +36,6 @@
#include "e-util/e-charset.h"
#include "e-util/e-util.h"
#include "e-util/e-alert-dialog.h"
-#include "e-util/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/misc/e-popup-action.h"
#include "widgets/misc/e-menu-tool-action.h"
@@ -485,7 +484,7 @@ action_mail_flag_for_followup_cb (GtkAction *action,
static gboolean
get_close_browser_reader (EMailReader *reader)
{
- GConfClient *client;
+ GSettings *settings;
const gchar *key;
gchar *value;
gboolean close_it = FALSE;
@@ -494,10 +493,10 @@ get_close_browser_reader (EMailReader *reader)
if (!E_IS_MAIL_BROWSER (reader))
return FALSE;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
- key = "/apps/evolution/mail/prompts/reply_close_browser";
- value = gconf_client_get_string (client, key, NULL);
+ key = "prompt-on-reply-close-browser";
+ value = g_settings_get_string (settings, key);
if (value && g_str_equal (value, "always")) {
close_it = TRUE;
@@ -526,13 +525,13 @@ get_close_browser_reader (EMailReader *reader)
close_it = response == GTK_RESPONSE_YES || response == GTK_RESPONSE_OK;
if (response == GTK_RESPONSE_OK)
- gconf_client_set_string (client, key, "always", NULL);
+ g_settings_set_string (settings, key, "always");
else if (response == GTK_RESPONSE_CANCEL)
- gconf_client_set_string (client, key, "never", NULL);
+ g_settings_set_string (settings, key, "never");
}
g_free (value);
- g_object_unref (client);
+ g_object_unref (settings);
return close_it;
}
@@ -1192,13 +1191,11 @@ action_mail_reply_all_check (CamelFolder *folder,
response = gtk_dialog_run (GTK_DIALOG (dialog));
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check))) {
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/prompts/reply_many_recips";
- gconf_client_set_bool (client, key, FALSE, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ g_settings_set_boolean (settings, "prompt-on-reply-many-recips", FALSE);
+ g_object_unref (settings);
}
gtk_widget_destroy (dialog);
@@ -1228,17 +1225,17 @@ static void
action_mail_reply_all_cb (GtkAction *action,
EMailReader *reader)
{
- GConfClient *client;
+ GSettings *settings;
const gchar *key;
guint32 state;
gboolean ask;
state = e_mail_reader_check_state (reader);
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/prompts/reply_many_recips";
- ask = gconf_client_get_bool (client, key, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ key = "prompt-on-reply-many-recips";
+ ask = g_settings_get_boolean (settings, key);
+ g_object_unref (settings);
if (ask && !(state & E_MAIL_READER_SELECTION_IS_MAILING_LIST)) {
EActivity *activity;
@@ -1278,17 +1275,15 @@ static void
action_mail_reply_group_cb (GtkAction *action,
EMailReader *reader)
{
- GConfClient *client;
+ GSettings *settings;
gboolean reply_list;
- const gchar *key;
guint32 state;
state = e_mail_reader_check_state (reader);
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/composer/group_reply_to_list";
- reply_list = gconf_client_get_bool (client, key, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ reply_list = g_settings_get_boolean (settings, "composer-group-reply-to-list");
+ g_object_unref (settings);
if (reply_list && (state & E_MAIL_READER_SELECTION_IS_MAILING_LIST)) {
e_mail_reader_reply_to_message (
@@ -1314,8 +1309,7 @@ action_mail_reply_sender_check (CamelFolder *folder,
EAlertSink *alert_sink;
CamelMimeMessage *message;
EMailReplyType type = E_MAIL_REPLY_TO_SENDER;
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
gboolean ask_ignore_list_reply_to;
gboolean ask_list_reply_to;
gboolean munged_list_message;
@@ -1344,13 +1338,10 @@ action_mail_reply_sender_check (CamelFolder *folder,
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
- key = "/apps/evolution/mail/composer/ignore_list_reply_to";
- ask_ignore_list_reply_to = gconf_client_get_bool (client, key, NULL);
-
- key = "/apps/evolution/mail/prompts/list_reply_to";
- ask_list_reply_to = gconf_client_get_bool (client, key, NULL);
+ ask_ignore_list_reply_to = g_settings_get_boolean (settings, "composer-ignore-list-reply-to");
+ ask_list_reply_to = g_settings_get_boolean (settings, "prompt-on-list-reply-to");
munged_list_message = em_utils_is_munged_list_message (message);
@@ -1382,8 +1373,7 @@ action_mail_reply_sender_check (CamelFolder *folder,
active = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (check));
if (active) {
- key = "/apps/evolution/mail/prompts/private_list_reply";
- gconf_client_set_bool (client, key, FALSE, NULL);
+ g_settings_set_boolean (settings, "prompt-on-private-list-reply", FALSE);
}
gtk_widget_destroy (dialog);
@@ -1429,14 +1419,12 @@ action_mail_reply_sender_check (CamelFolder *folder,
active = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (check_again));
if (active) {
- key = "/apps/evolution/mail/prompts/list_reply_to";
- gconf_client_set_bool (client, key, FALSE, NULL);
+ g_settings_set_boolean (settings, "prompt-on-list-reply-to", FALSE);
}
- key = "/apps/evolution/mail/composer/ignore_list_reply_to";
active = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (check_always_ignore));
- gconf_client_set_bool (client, key, active, NULL);
+ g_settings_set_boolean (settings, "composer-ignore-list-reply-to", active);
gtk_widget_destroy (dialog);
@@ -1459,7 +1447,7 @@ action_mail_reply_sender_check (CamelFolder *folder,
check_close_browser_reader (closure->reader);
exit:
- g_object_unref (client);
+ g_object_unref (settings);
g_object_unref (message);
mail_reader_closure_free (closure);
@@ -1469,21 +1457,18 @@ static void
action_mail_reply_sender_cb (GtkAction *action,
EMailReader *reader)
{
- GConfClient *client;
+ GSettings *settings;
gboolean ask_list_reply_to;
gboolean ask_private_list_reply;
gboolean ask;
- const gchar *key;
guint32 state;
state = e_mail_reader_check_state (reader);
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/prompts/list_reply_to";
- ask_list_reply_to = gconf_client_get_bool (client, key, NULL);
- key = "/apps/evolution/mail/prompts/private_list_reply";
- ask_private_list_reply = gconf_client_get_bool (client, key, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ ask_list_reply_to = g_settings_get_boolean (settings, "prompt-on-list-reply-to");
+ ask_private_list_reply = g_settings_get_boolean (settings, "prompt-on-private-list-reply");
+ g_object_unref (settings);
ask = (ask_private_list_reply || ask_list_reply_to);
@@ -3539,11 +3524,9 @@ e_mail_reader_init (EMailReader *reader,
EWebView *web_view;
GtkActionGroup *action_group;
GtkWidget *message_list;
- GConfBridge *bridge;
GtkAction *action;
gboolean sensitive;
const gchar *action_name;
- const gchar *key;
#ifndef G_OS_WIN32
GSettings *settings;
@@ -3624,19 +3607,19 @@ e_mail_reader_init (EMailReader *reader,
action_group, mail_reader_search_folder_entries,
G_N_ELEMENTS (mail_reader_search_folder_entries), reader);
- /* Bind GObject properties to GConf keys. */
+ /* Bind GObject properties to GSettings keys. */
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
action_name = "mail-caret-mode";
- key = "/apps/evolution/mail/display/caret_mode";
action = e_mail_reader_get_action (reader, action_name);
- gconf_bridge_bind_property (bridge, key, G_OBJECT (action), "active");
+ g_settings_bind (settings, "caret-mode", G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
action_name = "mail-show-all-headers";
- key = "/apps/evolution/mail/display/show_all_headers";
action = e_mail_reader_get_action (reader, action_name);
- gconf_bridge_bind_property (bridge, key, G_OBJECT (action), "active");
+ g_settings_bind (settings, "show-all-headers", G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
/* Fine tuning. */
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 7e9508cf93..03f4961206 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -38,8 +38,6 @@
#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-
#ifdef HAVE_CANBERRA
#include <canberra-gtk.h>
#endif
@@ -53,7 +51,6 @@
#include "e-util/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
#include "e-mail-folder-utils.h"
#include "e-mail-junk-filter.h"
@@ -73,8 +70,6 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_MAIL_SESSION, EMailSessionPrivate))
-static guint session_check_junk_notify_id;
-
typedef struct _AsyncContext AsyncContext;
struct _EMailSessionPrivate {
@@ -320,14 +315,14 @@ main_get_filter_driver (CamelSession *session,
EFilterRule *rule = NULL;
const gchar *config_dir;
gchar *user, *system;
- GConfClient *client;
+ GSettings *settings;
ERuleContext *fc;
shell = e_shell_get_default ();
shell_backend = e_shell_get_backend_by_name (shell, "mail");
g_return_val_if_fail (E_IS_MAIL_BACKEND (shell_backend), NULL);
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "filters.xml", NULL);
@@ -341,12 +336,11 @@ main_get_filter_driver (CamelSession *session,
driver = camel_filter_driver_new (session);
camel_filter_driver_set_folder_func (driver, get_folder, session);
- if (gconf_client_get_bool (client, "/apps/evolution/mail/filters/log", NULL)) {
+ if (g_settings_get_boolean (settings, "filters-log-actions")) {
if (ms->priv->filter_logfile == NULL) {
gchar *filename;
- filename = gconf_client_get_string (
- client, "/apps/evolution/mail/filters/logfile", NULL);
+ filename = g_settings_get_string (settings, "filters-log-file");
if (filename) {
ms->priv->filter_logfile = g_fopen (filename, "a+");
g_free (filename);
@@ -403,7 +397,7 @@ main_get_filter_driver (CamelSession *session,
g_object_unref (fc);
- g_object_unref (client);
+ g_object_unref (settings);
return driver;
}
@@ -435,17 +429,17 @@ ms_forward_to_cb (CamelFolder *folder,
GAsyncResult *result,
EMailSession *session)
{
- GConfClient *client;
+ GSettings *settings;
/* FIXME Poor error handling. */
if (!e_mail_folder_append_message_finish (folder, result, NULL, NULL))
return;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
/* do not call mail send immediately, just pile them all in the outbox */
- if (preparing_flush || gconf_client_get_bool (
- client, "/apps/evolution/mail/filters/flush-outbox", NULL)) {
+ if (preparing_flush || g_settings_get_boolean (
+ settings, "flush-outbox")) {
if (preparing_flush)
g_source_remove (preparing_flush);
@@ -454,7 +448,7 @@ ms_forward_to_cb (CamelFolder *folder,
forward_to_flush_outbox_cb, session);
}
- g_object_unref (client);
+ g_object_unref (settings);
}
static void
@@ -488,24 +482,13 @@ mail_session_make_key (CamelService *service,
}
static void
-mail_session_check_junk_notify (GConfClient *gconf,
- guint id,
- GConfEntry *entry,
+mail_session_check_junk_notify (GSettings *settings,
+ const gchar *key,
CamelSession *session)
{
- gchar *key;
-
- g_return_if_fail (gconf_entry_get_key (entry) != NULL);
- g_return_if_fail (gconf_entry_get_value (entry) != NULL);
-
- key = strrchr (gconf_entry_get_key (entry), '/');
- if (key) {
- key++;
- if (strcmp (key, "check_incoming") == 0)
- camel_session_set_check_junk (
- session, gconf_value_get_bool (
- gconf_entry_get_value (entry)));
- }
+ if (strcmp (key, "junk-check-incoming") == 0)
+ camel_session_set_check_junk (
+ session, g_settings_get_boolean (settings, key));
}
static const gchar *
@@ -533,7 +516,7 @@ mail_session_get_junk_filter_name (EMailSession *session)
"unknown to Evolution of type %s",
G_OBJECT_TYPE_NAME (junk_filter));
- return ""; /* GConfBridge doesn't like NULL strings */
+ return "";
}
static void
@@ -560,7 +543,7 @@ mail_session_set_junk_filter_name (EMailSession *session,
} else {
g_warning (
"Unrecognized junk filter name "
- "'%s' in GConf", junk_filter_name);
+ "'%s' in GSettings", junk_filter_name);
}
}
@@ -631,22 +614,12 @@ static void
mail_session_finalize (GObject *object)
{
EMailSessionPrivate *priv;
- GConfClient *client;
priv = E_MAIL_SESSION_GET_PRIVATE (object);
g_hash_table_destroy (priv->junk_filters);
g_object_unref (priv->proxy);
- client = gconf_client_get_default ();
-
- if (session_check_junk_notify_id != 0) {
- gconf_client_notify_remove (client, session_check_junk_notify_id);
- session_check_junk_notify_id = 0;
- }
-
- g_object_unref (client);
-
g_free (mail_data_dir);
g_free (mail_config_dir);
@@ -673,6 +646,7 @@ mail_session_constructed (GObject *object)
EExtensible *extensible;
GType extension_type;
GList *list, *iter;
+ GSettings *settings;
priv = E_MAIL_SESSION_GET_PRIVATE (object);
@@ -726,13 +700,11 @@ mail_session_constructed (GObject *object)
g_list_free (list);
- /* Bind the "/apps/evolution/mail/junk/default_plugin"
- * GConf key to our "junk-filter-name" property. */
+ /* Bind the "junk-default-plugin" GSettings key to our "junk-filter-name" property. */
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/default_plugin",
- object, "junk-filter-name");
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ g_settings_bind (settings, "junk-default-plugin", object, "junk-filter-name", G_SETTINGS_BIND_DEFAULT);
+ g_object_unref (settings);
}
static CamelService *
@@ -1117,9 +1089,9 @@ mail_session_forward_to (CamelSession *session,
static void
mail_session_get_socks_proxy (CamelSession *session,
- const gchar *for_host,
- gchar **host_ret,
- gint *port_ret)
+ const gchar *for_host,
+ gchar **host_ret,
+ gint *port_ret)
{
EMailSession *mail_session;
gchar *uri;
@@ -1333,7 +1305,7 @@ e_mail_session_class_init (EMailSessionClass *class)
static void
e_mail_session_init (EMailSession *session)
{
- GConfClient *client;
+ GSettings *settings;
session->priv = E_MAIL_SESSION_GET_PRIVATE (session);
session->priv->folder_cache = mail_folder_cache_new ();
@@ -1344,24 +1316,20 @@ e_mail_session_init (EMailSession *session)
/* Initialize the EAccount setup. */
e_account_writable (NULL, E_ACCOUNT_SOURCE_SAVE_PASSWD);
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
- gconf_client_add_dir (
- client, "/apps/evolution/mail/junk",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
camel_session_set_check_junk (
- CAMEL_SESSION (session), gconf_client_get_bool (
- client, "/apps/evolution/mail/junk/check_incoming", NULL));
- session_check_junk_notify_id = gconf_client_notify_add (
- client, "/apps/evolution/mail/junk",
- (GConfClientNotifyFunc) mail_session_check_junk_notify,
- session, NULL, NULL);
+ CAMEL_SESSION (session), g_settings_get_boolean (
+ settings, "junk-check-incoming"));
+ g_signal_connect (
+ settings, "changed",
+ G_CALLBACK (mail_session_check_junk_notify), session);
mail_config_reload_junk_headers (session);
e_proxy_setup_proxy (session->priv->proxy);
- g_object_unref (client);
+ g_object_unref (settings);
}
EMailSession *
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 45dd41fd9a..6bd96ef299 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -3786,8 +3786,12 @@ emae_defaults_page (EConfig *ec,
priv->trash_folder_button, "sensitive",
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "use-real-trash-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "use-real-trash-path");
+ else
+ pspec = NULL;
if (pspec != NULL)
g_object_bind_property (
@@ -3796,12 +3800,20 @@ emae_defaults_page (EConfig *ec,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "real-trash-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "real-trash-path");
+ else
+ pspec = NULL;
if (pspec != NULL) {
- set_real_folder_path (priv->trash_folder_button, settings, "real-trash-path", account);
- g_signal_connect (priv->trash_folder_button, "notify::folder-uri", G_CALLBACK (update_real_folder_cb), emae);
+ set_real_folder_path (
+ priv->trash_folder_button,
+ settings, "real-trash-path", account);
+ g_signal_connect (
+ priv->trash_folder_button, "notify::folder-uri",
+ G_CALLBACK (update_real_folder_cb), emae);
}
flags = CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER;
@@ -3832,8 +3844,12 @@ emae_defaults_page (EConfig *ec,
priv->junk_folder_button, "sensitive",
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "use-real-junk-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "use-real-junk-path");
+ else
+ pspec = NULL;
if (pspec != NULL)
g_object_bind_property (
@@ -3842,12 +3858,20 @@ emae_defaults_page (EConfig *ec,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "real-junk-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "real-junk-path");
+ else
+ pspec = NULL;
if (pspec != NULL) {
- set_real_folder_path (priv->junk_folder_button, settings, "real-junk-path", account);
- g_signal_connect (priv->junk_folder_button, "notify::folder-uri", G_CALLBACK (update_real_folder_cb), emae);
+ set_real_folder_path (
+ priv->junk_folder_button,
+ settings, "real-junk-path", account);
+ g_signal_connect (
+ priv->junk_folder_button, "notify::folder-uri",
+ G_CALLBACK (update_real_folder_cb), emae);
}
flags = CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER;
@@ -3861,7 +3885,9 @@ emae_defaults_page (EConfig *ec,
/* Special Folders "Reset Defaults" button */
priv->restore_folders_button = (GtkButton *)e_builder_get_widget (builder, "default_folders_button");
- g_signal_connect (priv->restore_folders_button, "clicked", G_CALLBACK (default_folders_clicked), emae);
+ g_signal_connect (
+ priv->restore_folders_button, "clicked",
+ G_CALLBACK (default_folders_clicked), emae);
/* Always Cc/Bcc */
emae_account_toggle (emae, "always_cc", E_ACCOUNT_CC_ALWAYS, builder);
@@ -3869,12 +3895,13 @@ emae_defaults_page (EConfig *ec,
emae_account_toggle (emae, "always_bcc", E_ACCOUNT_BCC_ALWAYS, builder);
emae_account_entry (emae, "bcc_addrs", E_ACCOUNT_BCC_ADDRS, builder);
- gtk_widget_set_sensitive ( (GtkWidget *) priv->sent_folder_button,
- (provider ? !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER): TRUE)
- );
+ gtk_widget_set_sensitive (
+ GTK_WIDGET (priv->sent_folder_button),
+ (provider ? !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER) : TRUE));
- gtk_widget_set_sensitive ((GtkWidget *) priv->restore_folders_button,
- (provider && !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
+ gtk_widget_set_sensitive (
+ GTK_WIDGET (priv->restore_folders_button),
+ (provider && !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
/* Receipt policy */
emae_setup_receipt_policy (emae, builder);
@@ -4809,7 +4836,7 @@ forget_password_if_needed (EAccount *original_account,
#define CALENDAR_CALDAV_URI "caldav://%s@www.google.com/calendar/dav/%s/events"
#define GMAIL_CALENDAR_LOCATION "://www.google.com/calendar/feeds/"
#define CALENDAR_DEFAULT_PATH "/private/full"
-#define SELECTED_CALENDARS "/apps/evolution/calendar/display/selected_calendars"
+#define SELECTED_CALENDARS "selected-calendars"
#define YAHOO_CALENDAR_LOCATION "%s@caldav.calendar.yahoo.com/dav/%s/Calendar/%s"
static gchar *
@@ -4896,8 +4923,11 @@ setup_google_calendar (EMAccountEditor *emae)
ESource *calendar;
gchar *sanitize_uname, *username;
gchar *abs_uri, *rel_uri;
- GSList *ids, *temp;
+ gchar **ids;
+ gint i;
+ GPtrArray *array;
CamelURL *url;
+ GSettings *settings;
gconf = gconf_client_get_default ();
slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
@@ -4929,16 +4959,21 @@ setup_google_calendar (EMAccountEditor *emae)
e_source_list_sync (slist, NULL);
- ids = gconf_client_get_list (gconf, SELECTED_CALENDARS, GCONF_VALUE_STRING, NULL);
- ids = g_slist_append (ids, g_strdup (e_source_peek_uid (calendar)));
- gconf_client_set_list (gconf, SELECTED_CALENDARS, GCONF_VALUE_STRING, ids, NULL);
- temp = ids;
-
- for (; temp != NULL; temp = g_slist_next (temp))
- g_free (temp->data);
-
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ ids = g_settings_get_strv (settings, SELECTED_CALENDARS);
+ array = g_ptr_array_new ();
+ for (i = 0; ids[i] != NULL; i++)
+ g_ptr_array_add (array, ids[i]);
+ g_ptr_array_add (array, (gpointer) e_source_peek_uid (calendar));
+ g_ptr_array_add (array, NULL);
+ g_settings_set_strv (
+ settings, SELECTED_CALENDARS,
+ (const gchar * const *) array->pdata);
+
+ g_strfreev (ids);
+ g_ptr_array_free (array, TRUE);
+ g_object_unref (settings);
g_free (username);
- g_slist_free (ids);
g_free (abs_uri);
g_free (rel_uri);
g_free (sanitize_uname);
@@ -4957,8 +4992,11 @@ setup_yahoo_calendar (EMAccountEditor *emae)
ESource *calendar;
gchar *sanitize_uname;
gchar *abs_uri, *rel_uri;
- GSList *ids, *temp;
const gchar *email;
+ GSettings *settings;
+ gchar **ids;
+ gint i;
+ GPtrArray *array;
gconf = gconf_client_get_default ();
email = e_account_get_string (em_account_editor_get_modified_account (emae), E_ACCOUNT_ID_ADDRESS);
@@ -4993,15 +5031,20 @@ setup_yahoo_calendar (EMAccountEditor *emae)
e_source_group_add_source (sgrp, calendar, -1);
e_source_list_sync (slist, NULL);
- ids = gconf_client_get_list (gconf, SELECTED_CALENDARS, GCONF_VALUE_STRING, NULL);
- ids = g_slist_append (ids, g_strdup (e_source_peek_uid (calendar)));
- gconf_client_set_list (gconf, SELECTED_CALENDARS, GCONF_VALUE_STRING, ids, NULL);
- temp = ids;
-
- for (; temp != NULL; temp = g_slist_next (temp))
- g_free (temp->data);
-
- g_slist_free (ids);
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ ids = g_settings_get_strv (settings, SELECTED_CALENDARS);
+ array = g_ptr_array_new ();
+ for (i = 0; ids[i] != NULL; i++)
+ g_ptr_array_add (array, ids[i]);
+ g_ptr_array_add (array, (gpointer) e_source_peek_uid (calendar));
+ g_ptr_array_add (array, NULL);
+ g_settings_set_strv (
+ settings, SELECTED_CALENDARS,
+ (const gchar * const *) array->pdata);
+
+ g_strfreev (ids);
+ g_ptr_array_free (array, TRUE);
+ g_object_unref (settings);
g_free (abs_uri);
g_free (rel_uri);
g_free (sanitize_uname);
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index bc84e5508c..0eceeea228 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -69,9 +69,6 @@
#define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0)
#endif
-#define GCONF_KEY_TEMPLATE_PLACEHOLDERS \
- "/apps/evolution/mail/template_placeholders"
-
typedef struct _AsyncContext AsyncContext;
typedef struct _ForwardData ForwardData;
@@ -159,7 +156,7 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer,
if (str->len)
res = em_utils_prompt_user (
GTK_WINDOW (composer),
- "/apps/evolution/mail/prompts/unwanted_html",
+ "prompt-on-unwanted-html",
"mail:ask-send-html", str->str, NULL);
else
res = TRUE;
@@ -174,7 +171,7 @@ ask_confirm_for_empty_subject (EMsgComposer *composer)
{
return em_utils_prompt_user (
GTK_WINDOW (composer),
- "/apps/evolution/mail/prompts/empty_subject",
+ "prompt-on-empty-subject",
"mail:ask-send-no-subject", NULL);
}
@@ -190,7 +187,7 @@ ask_confirm_for_only_bcc (EMsgComposer *composer,
return em_utils_prompt_user (
GTK_WINDOW (composer),
- "/apps/evolution/mail/prompts/only_bcc",
+ "prompt-on-only-bcc",
hidden_list_case ?
"mail:ask-send-only-bcc-contact" :
"mail:ask-send-only-bcc", NULL);
@@ -333,7 +330,7 @@ composer_presend_check_recipients (EMsgComposer *composer)
if (invalid_addrs) {
if (!em_utils_prompt_user (
GTK_WINDOW (composer),
- "/apps/evolution/mail/prompts/send_invalid_recip",
+ "prompt-on-invalid-recip",
strstr (invalid_addrs->str, ", ") ?
"mail:ask-send-invalid-recip-multi" :
"mail:ask-send-invalid-recip-one",
@@ -453,23 +450,21 @@ composer_presend_check_unwanted_html (EMsgComposer *composer)
{
EDestination **recipients;
EComposerHeaderTable *table;
- GConfClient *client;
+ GSettings *settings;
gboolean check_passed = TRUE;
gboolean html_mode;
gboolean send_html;
gboolean confirm_html;
gint ii;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
table = e_msg_composer_get_header_table (composer);
recipients = e_composer_header_table_get_destinations (table);
html_mode = gtkhtml_editor_get_html_mode (GTKHTML_EDITOR (composer));
- send_html = gconf_client_get_bool (
- client, "/apps/evolution/mail/composer/send_html", NULL);
- confirm_html = gconf_client_get_bool (
- client, "/apps/evolution/mail/prompts/unwanted_html", NULL);
+ send_html = g_settings_get_boolean (settings, "composer-send-html");
+ confirm_html = g_settings_get_boolean (settings, "prompt-on-unwanted-html");
/* Only show this warning if our default is to send html. If it
* isn't, we've manually switched into html mode in the composer
@@ -493,7 +488,7 @@ composer_presend_check_unwanted_html (EMsgComposer *composer)
if (recipients != NULL)
e_destination_freev (recipients);
- g_object_unref (client);
+ g_object_unref (settings);
return check_passed;
}
@@ -1189,11 +1184,11 @@ typedef enum {
} QuotingTextEnum;
static struct {
- const gchar * gconf_key;
+ const gchar * conf_key;
const gchar * message;
} conf_messages[] = {
[QUOTING_ATTRIBUTION] =
- { "/apps/evolution/mail/composer/message_attribution",
+ { "composer-message-attribution",
/* Note to translators: this is the attribution string used
* when quoting messages. Each ${Variable} gets replaced
* with a value. To see a full list of available variables,
@@ -1203,12 +1198,12 @@ static struct {
},
[QUOTING_FORWARD] =
- { "/apps/evolution/mail/composer/message_forward",
+ { "composer-message-forward",
N_("-------- Forwarded Message --------")
},
[QUOTING_ORIGINAL] =
- { "/apps/evolution/mail/composer/message_original",
+ { "composer-message-original",
N_("-----Original Message-----")
}
};
@@ -1216,12 +1211,12 @@ static struct {
static gchar *
quoting_text (QuotingTextEnum type)
{
- GConfClient *client;
+ GSettings *settings;
gchar *text;
- client = gconf_client_get_default ();
- text = gconf_client_get_string (client, conf_messages[type].gconf_key, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ text = g_settings_get_string (settings, conf_messages[type].conf_key);
+ g_object_unref (settings);
if (text && *text)
return text;
@@ -1263,15 +1258,19 @@ em_utils_edit_message (EShell *shell,
/* Template specific code follows. */
if (folder_is_templates) {
CamelDataWrapper *content;
- GConfClient *gconf;
+ GSettings *settings;
+ gchar **strv;
+ gint i;
GSList *clue_list = NULL;
- gconf = gconf_client_get_default ();
- /* Get the list from gconf */
- clue_list = gconf_client_get_list (
- gconf, GCONF_KEY_TEMPLATE_PLACEHOLDERS,
- GCONF_VALUE_STRING, NULL );
- g_object_unref (gconf);
+ settings = g_settings_new ("org.gnome.evolution.plugin.templates");
+
+ /* Get the list from GSettings */
+ strv = g_settings_get_strv (settings, "template-placeholders");
+ for (i = 0; strv[i] != NULL; i++)
+ clue_list = g_slist_append (clue_list, g_strdup (strv[i]));
+ g_object_unref (settings);
+ g_strfreev (strv);
content = camel_medium_get_content (CAMEL_MEDIUM (message));
traverse_parts (clue_list, message, content);
@@ -2085,14 +2084,12 @@ get_reply_to (CamelMimeMessage *message)
reply_to = camel_mime_message_get_reply_to (message);
if (reply_to) {
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
gboolean ignore_list_reply_to;
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/composer/ignore_list_reply_to";
- ignore_list_reply_to = gconf_client_get_bool (client, key, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ ignore_list_reply_to = g_settings_get_boolean (settings, "composer-ignore-list-reply-to");
+ g_object_unref (settings);
if (ignore_list_reply_to && em_utils_is_munged_list_message (message))
reply_to = NULL;
@@ -2529,15 +2526,13 @@ composer_set_body (EMsgComposer *composer,
{
gchar *text, *credits, *original;
CamelMimePart *part;
- GConfClient *client;
+ GSettings *settings;
gboolean start_bottom, has_body_text = FALSE;
guint32 validity_found = 0;
- const gchar *key;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
- key = "/apps/evolution/mail/composer/reply_start_bottom";
- start_bottom = gconf_client_get_bool (client, key, NULL);
+ start_bottom = g_settings_get_boolean (settings, "composer-reply-start-bottom");
switch (style) {
case E_MAIL_REPLY_STYLE_DO_NOT_QUOTE:
@@ -2580,7 +2575,6 @@ composer_set_body (EMsgComposer *composer,
GtkhtmlEditor *editor = GTKHTML_EDITOR (composer);
gboolean move_cursor_to_end;
gboolean top_signature;
- const gchar *key;
/* If we are placing signature on top, then move cursor to the end,
* otherwise try to find the signature place and place cursor just
@@ -2588,8 +2582,7 @@ composer_set_body (EMsgComposer *composer,
gtkhtml_editor_run_command (editor, "block-selection");
gtkhtml_editor_run_command (editor, "cursor-bod");
- key = "/apps/evolution/mail/composer/top_signature";
- top_signature = gconf_client_get_bool (client, key, NULL);
+ top_signature = g_settings_get_boolean (settings, "composer-top-signature");
move_cursor_to_end = top_signature ||
!gtkhtml_editor_search_by_data (
@@ -2602,7 +2595,7 @@ composer_set_body (EMsgComposer *composer,
gtkhtml_editor_run_command (editor, "unblock-selection");
}
- g_object_unref (client);
+ g_object_unref (settings);
}
gchar *
diff --git a/mail/em-config.c b/mail/em-config.c
index 6a133f1c56..352e16b4b1 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -121,7 +121,6 @@ em_config_class_init (EMConfigClass *class)
{
EConfigClass *config_class;
-
config_class = E_CONFIG_CLASS (class);
config_class->set_target = em_config_set_target;
config_class->target_free = em_config_target_free;
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index 6e8e04c26f..310aa76740 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -29,8 +29,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
-
#include "em-folder-properties.h"
#include "em-config.h"
@@ -254,9 +252,8 @@ emfp_dialog_run (AsyncContext *context)
CamelStore *local_store;
CamelStore *parent_store;
gboolean hide_deleted;
- GConfClient *client;
+ GSettings *settings;
const gchar *name;
- const gchar *key;
shell_view = context->shell_view;
shell_window = e_shell_view_get_shell_window (shell_view);
@@ -272,10 +269,9 @@ emfp_dialog_run (AsyncContext *context)
context->unread = camel_folder_summary_get_unread_count (context->folder->summary);
deleted = camel_folder_summary_get_deleted_count (context->folder->summary);
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/display/show_deleted";
- hide_deleted = !gconf_client_get_bool (client, key, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ hide_deleted = !g_settings_get_boolean (settings, "show-deleted");
+ g_object_unref (settings);
/*
* Do the calculation only for those accounts that support VTRASHes
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index d92713f8be..1d201f5d40 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -374,10 +374,9 @@ subscription_editor_subscribe_folder_done (CamelSubscribable *subscribable,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
-
static void
subscription_editor_subscribe_many (EMSubscriptionEditor *editor,
- GSList *async_datas)
+ GSList *async_datas)
{
AsyncData *async_data;
AsyncContext *context;
@@ -499,10 +498,9 @@ subscription_editor_unsubscribe_folder_done (CamelSubscribable *subscribable,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
-
static void
subscription_editor_unsubscribe_many (EMSubscriptionEditor *editor,
- GSList *async_datas)
+ GSList *async_datas)
{
AsyncData *async_data;
AsyncContext *context;
@@ -552,9 +550,9 @@ subscription_editor_unsubscribe_many (EMSubscriptionEditor *editor,
static GtkWidget *
subscription_editor_create_menu_item (const gchar *label,
- gboolean sensitive,
- GCallback activate_cb,
- EMSubscriptionEditor *editor)
+ gboolean sensitive,
+ GCallback activate_cb,
+ EMSubscriptionEditor *editor)
{
GtkWidget *item;
@@ -570,10 +568,10 @@ subscription_editor_create_menu_item (const gchar *label,
static void
position_below_widget_cb (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer under_widget)
+ gint *x,
+ gint *y,
+ gboolean *push_in,
+ gpointer under_widget)
{
GtkRequisition menu_requisition;
GtkTextDirection direction;
@@ -611,9 +609,9 @@ position_below_widget_cb (GtkMenu *menu,
static AsyncData *
subscription_editor_async_data_from_iter (GtkTreeView *tree_view,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- gboolean *is_expanded)
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gboolean *is_expanded)
{
AsyncData *data;
CamelFolderInfo *folder_info = NULL;
@@ -650,7 +648,8 @@ typedef enum {
} EPickMode;
static gboolean
-can_pick_folder_info (CamelFolderInfo *fi, EPickMode mode)
+can_pick_folder_info (CamelFolderInfo *fi,
+ EPickMode mode)
{
if (!FOLDER_CAN_SELECT (fi))
return FALSE;
@@ -670,9 +669,9 @@ struct PickAllData {
static gboolean
pick_all_cb (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
{
struct PickAllData *data = user_data;
AsyncData *async_data;
@@ -696,13 +695,13 @@ pick_all_cb (GtkTreeModel *model,
}
/* skip_folder_infos contains CamelFolderInfo-s to skip;
- these should come from the tree view; can be NULL
- to include everything.
+ * these should come from the tree view; can be NULL
+ * to include everything.
*/
static GSList *
subscription_editor_pick_all (EMSubscriptionEditor *editor,
- EPickMode mode,
- GHashTable *skip_folder_infos)
+ EPickMode mode,
+ GHashTable *skip_folder_infos)
{
GtkTreeView *tree_view;
GtkTreeModel *tree_model;
@@ -723,7 +722,7 @@ subscription_editor_pick_all (EMSubscriptionEditor *editor,
static GSList *
subscription_editor_pick_shown (EMSubscriptionEditor *editor,
- EPickMode mode)
+ EPickMode mode)
{
GtkTreeView *tree_view;
GtkTreeModel *tree_model;
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 1423130772..c15f8b67b5 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -105,7 +105,7 @@ em_utils_ask_open_many (GtkWindow *parent,
"Are you sure you want to open %d messages at once?",
how_many), how_many);
proceed = em_utils_prompt_user (
- parent, "/apps/evolution/mail/prompts/open_many",
+ parent, "prompt-on-open-many",
"mail:ask-open-many", string, NULL);
g_free (string);
@@ -115,7 +115,7 @@ em_utils_ask_open_many (GtkWindow *parent,
/**
* em_utils_prompt_user:
* @parent: parent window
- * @promptkey: gconf key to check if we should prompt the user or not.
+ * @promptkey: settings key to check if we should prompt the user or not.
* @tag: e_alert tag.
*
* Convenience function to query the user with a Yes/No dialog and a
@@ -136,13 +136,13 @@ em_utils_prompt_user (GtkWindow *parent,
GtkWidget *container;
va_list ap;
gint button;
- GConfClient *client;
+ GSettings *settings;
EAlert *alert = NULL;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
- if (promptkey && !gconf_client_get_bool (client, promptkey, NULL)) {
- g_object_unref (client);
+ if (promptkey && !g_settings_get_boolean (settings, promptkey)) {
+ g_object_unref (settings);
return TRUE;
}
@@ -165,14 +165,14 @@ em_utils_prompt_user (GtkWindow *parent,
button = gtk_dialog_run (GTK_DIALOG (dialog));
if (promptkey)
- gconf_client_set_bool (
- client, promptkey,
+ g_settings_set_boolean (
+ settings, promptkey,
!gtk_toggle_button_get_active (
- GTK_TOGGLE_BUTTON (check)), NULL);
+ GTK_TOGGLE_BUTTON (check)));
gtk_widget_destroy (dialog);
- g_object_unref (client);
+ g_object_unref (settings);
return button == GTK_RESPONSE_YES;
}
@@ -1229,16 +1229,15 @@ em_utils_message_to_html (CamelMimeMessage *message,
((EMFormat *) emfq)->composer = TRUE;
if (!source) {
- GConfClient *gconf;
+ GSettings *settings;
gchar *charset;
/* FIXME We should be getting this from the
* current view, not the global setting. */
- gconf = gconf_client_get_default ();
- charset = gconf_client_get_string (
- gconf, "/apps/evolution/mail/display/charset", NULL);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ charset = g_settings_get_string (settings, "charset");
em_format_set_default_charset ((EMFormat *) emfq, charset);
- g_object_unref (gconf);
+ g_object_unref (settings);
g_free (charset);
}
@@ -1279,7 +1278,7 @@ em_utils_expunge_folder (GtkWidget *parent,
if (!em_utils_prompt_user (
GTK_WINDOW (parent),
- "/apps/evolution/mail/prompts/expunge",
+ "prompt-on-expunge",
"mail:ask-expunge", description, NULL))
return;
@@ -1303,7 +1302,7 @@ em_utils_empty_trash (GtkWidget *parent,
g_return_if_fail (E_IS_MAIL_BACKEND (backend));
if (!em_utils_prompt_user ((GtkWindow *) parent,
- "/apps/evolution/mail/prompts/empty_trash",
+ "prompt-on-empty-trash",
"mail:ask-empty-trash", NULL))
return;
diff --git a/mail/mail-autoconfig/Makefile.am b/mail/mail-autoconfig/Makefile.am
index 451101d364..fffd222751 100644
--- a/mail/mail-autoconfig/Makefile.am
+++ b/mail/mail-autoconfig/Makefile.am
@@ -184,3 +184,5 @@ autoconfigdir = $(privdatadir)/mail-autoconfig
EXTRA_DIST = \
$(autoconfig_DATA) \
README
+
+-include $(top_srcdir)/git.mk
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 7356772e99..bbad256d2f 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -34,8 +34,6 @@
#include "e-util/e-account-utils.h"
#include "e-util/e-signature-utils.h"
-#include <gconf/gconf-client.h>
-
#include "e-mail-local.h"
#include "e-mail-folder-utils.h"
#include "mail-config.h"
@@ -56,41 +54,38 @@ typedef struct {
extern gint camel_header_param_encode_filenames_in_rfc_2047;
static MailConfig *config = NULL;
+static GSettings *mail_settings = NULL;
static void
-gconf_outlook_filenames_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+settings_outlook_filenames_changed (GSettings *settings,
+ const gchar *key,
+ gpointer user_data)
{
- const gchar *key;
-
- g_return_if_fail (client != NULL);
-
- key = "/apps/evolution/mail/composer/outlook_filenames";
-
/* pass option to the camel */
- if (gconf_client_get_bool (client, key, NULL))
+ if (g_settings_get_boolean (settings, key))
camel_header_param_encode_filenames_in_rfc_2047 = 1;
else
camel_header_param_encode_filenames_in_rfc_2047 = 0;
}
static void
-gconf_jh_headers_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- EMailSession *session)
+settings_jh_headers_changed (GSettings *settings,
+ const gchar *key,
+ EMailSession *session)
{
GSList *node;
GPtrArray *name, *value;
+ gchar **strv;
+ gint i;
g_slist_foreach (config->jh_header, (GFunc) g_free, NULL);
g_slist_free (config->jh_header);
+ config->jh_header = NULL;
- config->jh_header = gconf_client_get_list (
- client, "/apps/evolution/mail/junk/custom_header",
- GCONF_VALUE_STRING, NULL);
+ strv = g_settings_get_strv (settings, "junk-custom-header");
+ for (i = 0; strv[i] != NULL; i++)
+ config->jh_header = g_slist_append (config->jh_header, g_strdup (strv[i]));
+ g_strfreev (strv);
node = config->jh_header;
name = g_ptr_array_new ();
@@ -114,55 +109,38 @@ gconf_jh_headers_changed (GConfClient *client,
}
static void
-gconf_jh_check_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- EMailSession *session)
+settings_jh_check_changed (GSettings *settings,
+ const gchar *key,
+ EMailSession *session)
{
- config->jh_check = gconf_client_get_bool (
- client, "/apps/evolution/mail/junk/check_custom_header", NULL);
+ config->jh_check = g_settings_get_boolean (settings, "junk-check-custom-header");
if (!config->jh_check) {
camel_session_set_junk_headers (
CAMEL_SESSION (session), NULL, NULL, 0);
} else {
- gconf_jh_headers_changed (client, 0, NULL, session);
+ settings_jh_headers_changed (settings, NULL, session);
}
}
static void
-gconf_bool_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gboolean *save_location)
+settings_bool_value_changed (GSettings *settings,
+ const gchar *key,
+ gboolean *save_location)
{
- GError *error = NULL;
-
- *save_location = gconf_client_get_bool (client, entry->key, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ *save_location = g_settings_get_boolean (settings, key);
}
static void
-gconf_int_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gint *save_location)
+settings_int_value_changed (GSettings *settings,
+ const gchar *key,
+ gint *save_location)
{
- GError *error = NULL;
-
- *save_location = gconf_client_get_int (client, entry->key, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ *save_location = g_settings_get_int (settings, key);
}
void
mail_config_write (void)
{
- GConfClient *client;
EAccountList *account_list;
ESignatureList *signature_list;
@@ -175,9 +153,7 @@ mail_config_write (void)
e_account_list_save (account_list);
e_signature_list_save (signature_list);
- client = gconf_client_get_default ();
- gconf_client_suggest_sync (client, NULL);
- g_object_unref (client);
+ g_settings_sync ();
}
gint
@@ -193,24 +169,16 @@ mail_config_get_address_count (void)
gint
mail_config_get_sync_timeout (void)
{
- GConfClient *client;
gint res = 60;
- GError *error = NULL;
-
- client = gconf_client_get_default ();
- res = gconf_client_get_int (
- client, "/apps/evolution/mail/sync_interval", &error);
+ res = g_settings_get_int (mail_settings, "sync-interval");
/* do not allow recheck sooner than every 30 seconds */
- if (error || res == 0)
+ if (res == 0)
res = 60;
else if (res < 30)
res = 30;
- if (error)
- g_error_free (error);
-
return res;
}
@@ -249,11 +217,7 @@ mail_config_reload_junk_headers (EMailSession *session)
if (config == NULL)
mail_config_init (session);
else {
- GConfClient *client;
-
- client = gconf_client_get_default ();
- gconf_jh_check_changed (client, 0, NULL, session);
- g_object_unref (client);
+ settings_jh_check_changed (mail_settings, NULL, session);
}
}
@@ -277,10 +241,6 @@ mail_config_get_lookup_book_local_only (void)
void
mail_config_init (EMailSession *session)
{
- GConfClient *client;
- GConfClientNotifyFunc func;
- const gchar *key;
-
g_return_if_fail (E_IS_MAIL_SESSION (session));
if (config)
@@ -288,80 +248,48 @@ mail_config_init (EMailSession *session)
config = g_new0 (MailConfig, 1);
- client = gconf_client_get_default ();
-
- gconf_client_add_dir (
- client, "/apps/evolution/mail/prompts",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+ mail_settings = g_settings_new ("org.gnome.evolution.mail");
/* Composer Configuration */
- gconf_client_add_dir (
- client, "/apps/evolution/mail/composer",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- key = "/apps/evolution/mail/composer/outlook_filenames";
- func = (GConfClientNotifyFunc) gconf_outlook_filenames_changed;
- gconf_outlook_filenames_changed (client, 0, NULL, NULL);
- gconf_client_notify_add (client, key, func, NULL, NULL, NULL);
+ settings_outlook_filenames_changed (
+ mail_settings, "composer-outlook-filenames", NULL);
+ g_signal_connect (
+ mail_settings, "changed::composer-outlook-filenames",
+ G_CALLBACK (settings_outlook_filenames_changed), NULL);
/* Display Configuration */
- gconf_client_add_dir (
- client, "/apps/evolution/mail/display",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+ g_signal_connect (
+ mail_settings, "changed::address-compress",
+ G_CALLBACK (settings_bool_value_changed), &config->address_compress);
+ config->address_compress = g_settings_get_boolean (mail_settings, "address-compress");
+
+ g_signal_connect (
+ mail_settings, "changed::address-count",
+ G_CALLBACK (settings_int_value_changed), &config->address_count);
+ config->address_count = g_settings_get_int (mail_settings, "address-count");
- key = "/apps/evolution/mail/display/address_compress";
- func = (GConfClientNotifyFunc) gconf_bool_value_changed;
- gconf_client_notify_add (
- client, key, func,
- &config->address_compress, NULL, NULL);
- config->address_compress = gconf_client_get_bool (client, key, NULL);
+ /* Junk Configuration */
- key = "/apps/evolution/mail/display/address_count";
- func = (GConfClientNotifyFunc) gconf_int_value_changed;
- gconf_client_notify_add (
- client, key, func,
- &config->address_count, NULL, NULL);
- config->address_count = gconf_client_get_int (client, key, NULL);
+ g_signal_connect (
+ mail_settings, "changed::junk-check-custom-header",
+ G_CALLBACK (settings_jh_check_changed), session);
+ config->jh_check = g_settings_get_boolean (mail_settings, "junk-check-custom-header");
- /* Font Configuration */
+ g_signal_connect (
+ mail_settings, "changed::junk-custom-header",
+ G_CALLBACK (settings_jh_headers_changed), session);
- gconf_client_add_dir (
- client, "/apps/evolution/mail/display/fonts",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+ g_signal_connect (
+ mail_settings, "changed::junk-lookup-addressbook",
+ G_CALLBACK (settings_bool_value_changed), &config->book_lookup);
+ config->book_lookup = g_settings_get_boolean (mail_settings, "junk-lookup-addressbook");
- /* Junk Configuration */
+ g_signal_connect (
+ mail_settings, "changed::junk-lookup-addressbook-local-only",
+ G_CALLBACK (settings_bool_value_changed), &config->book_lookup_local_only);
+ config->book_lookup_local_only = g_settings_get_boolean (mail_settings, "junk-lookup-addressbook-local-only");
- gconf_client_add_dir (
- client, "/apps/evolution/mail/junk",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- key = "/apps/evolution/mail/junk/check_custom_header";
- func = (GConfClientNotifyFunc) gconf_jh_check_changed;
- gconf_client_notify_add (client, key, func, session, NULL, NULL);
- config->jh_check = gconf_client_get_bool (client, key, NULL);
-
- key = "/apps/evolution/mail/junk/custom_header";
- func = (GConfClientNotifyFunc) gconf_jh_headers_changed;
- gconf_client_notify_add (client, key, func, session, NULL, NULL);
-
- key = "/apps/evolution/mail/junk/lookup_addressbook";
- func = (GConfClientNotifyFunc) gconf_bool_value_changed;
- gconf_client_notify_add (
- client, key, func,
- &config->book_lookup, NULL, NULL);
- config->book_lookup = gconf_client_get_bool (client, key, NULL);
-
- key = "/apps/evolution/mail/junk/lookup_addressbook_local_only";
- func = (GConfClientNotifyFunc) gconf_bool_value_changed;
- gconf_client_notify_add (
- client, key, func,
- &config->book_lookup_local_only, NULL, NULL);
- config->book_lookup_local_only =
- gconf_client_get_bool (client, key, NULL);
-
- gconf_jh_check_changed (client, 0, NULL, session);
-
- g_object_unref (client);
+ settings_jh_check_changed (mail_settings, NULL, session);
}
diff --git a/mail/mail-config.ui b/mail/mail-config.ui
index 0c4696b3bd..e95a812b59 100644
--- a/mail/mail-config.ui
+++ b/mail/mail-config.ui
@@ -4351,6 +4351,7 @@ For example: "Work" or "Personal"</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 639e75bfe9..80d6f1ec0c 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -1035,7 +1035,7 @@ vfolder_load_storage (EMailBackend *backend)
MailFolderCache *folder_cache;
EMailSession *session;
gchar *xmlfile;
- GConfClient *client;
+ GSettings *settings;
g_return_if_fail (E_IS_MAIL_BACKEND (backend));
@@ -1112,11 +1112,11 @@ vfolder_load_storage (EMailBackend *backend)
}
/* reenable the feature if required */
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/display/enable_vfolders";
- if (!gconf_client_get_bool (client, key, NULL))
- gconf_client_set_bool (client, key, TRUE, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ key = "enable-vfolders";
+ if (!g_settings_get_boolean (settings, key))
+ g_settings_set_boolean (settings, key, TRUE);
+ g_object_unref (settings);
folder_cache = e_mail_session_get_folder_cache (session);
diff --git a/mail/message-list.c b/mail/message-list.c
index a405959de3..c322f56af1 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -36,8 +36,6 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
-#include <gconf/gconf-client.h>
-
#include "e-util/e-icon-factory.h"
#include "e-util/e-poolv.h"
#include "e-util/e-util-private.h"
@@ -1975,18 +1973,21 @@ filter_date (time_t date)
static ECell * create_composite_cell (gint col)
{
ECell *cell_vbox, *cell_hbox, *cell_sub, *cell_date, *cell_from, *cell_tree, *cell_attach;
- GConfClient *client;
+ GSettings *settings;
gchar *fixed_name = NULL;
gboolean show_email;
gint alt_col = (col == COL_FROM) ? COL_SENDER : COL_RECIPIENTS;
gboolean same_font = FALSE;
- client = gconf_client_get_default ();
- show_email = gconf_client_get_bool (client, "/apps/evolution/mail/display/show_email", NULL);
- same_font = gconf_client_get_bool (client, "/apps/evolution/mail/display/vertical_view_fonts", NULL);
- if (!same_font)
- fixed_name = gconf_client_get_string (client, "/desktop/gnome/interface/monospace_font_name", NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ show_email = g_settings_get_boolean (settings, "show-email");
+ same_font = g_settings_get_boolean (settings, "vertical-view-fonts");
+ g_object_unref (settings);
+ if (!same_font) {
+ settings = g_settings_new ("org.gnome.desktop.interface");
+ fixed_name = g_settings_get_string (settings, "monospace-font-name");
+ g_object_unref (settings);
+ }
cell_vbox = e_cell_vbox_new ();
@@ -2842,34 +2843,13 @@ message_list_selectable_init (ESelectableInterface *interface)
interface->select_all = message_list_selectable_select_all;
}
-static gboolean
-read_boolean_with_default (GConfClient *gconf,
- const gchar *key,
- gboolean def_value)
-{
- GConfValue *value;
- gboolean res;
-
- g_return_val_if_fail (gconf != NULL, def_value);
- g_return_val_if_fail (key != NULL, def_value);
-
- value = gconf_client_get (gconf, key, NULL);
- if (!value)
- return def_value;
-
- res = gconf_value_get_bool (value);
- gconf_value_free (value);
-
- return res;
-}
-
static void
message_list_construct (MessageList *message_list)
{
AtkObject *a11y;
gboolean constructed;
gchar *etspecfile;
- GConfClient *client;
+ GSettings *settings;
message_list->model =
e_tree_memory_callbacks_new (ml_tree_icon_at,
@@ -2895,15 +2875,13 @@ message_list_construct (MessageList *message_list)
message_list);
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.mail");
e_tree_memory_set_expanded_default (
E_TREE_MEMORY (message_list->model),
- read_boolean_with_default (
- client, "/apps/evolution/mail/display/thread_expand", TRUE));
+ g_settings_get_boolean (settings, "thread-expand"));
message_list->priv->thread_latest =
- read_boolean_with_default (
- client, "/apps/evolution/mail/display/thread_latest", TRUE);
- g_object_unref (client);
+ g_settings_get_boolean (settings, "thread-latest");
+ g_object_unref (settings);
/*
* The etree
@@ -3879,7 +3857,7 @@ message_list_set_folder (MessageList *message_list,
{
ETreeModel *etm = message_list->model;
gboolean hide_deleted;
- GConfClient *client;
+ GSettings *settings;
g_return_if_fail (IS_MESSAGE_LIST (message_list));
@@ -3968,9 +3946,9 @@ message_list_set_folder (MessageList *message_list,
folder, "changed",
G_CALLBACK (folder_changed), message_list);
- client = gconf_client_get_default ();
- hide_deleted = !gconf_client_get_bool (client, "/apps/evolution/mail/display/show_deleted", NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ hide_deleted = !g_settings_get_boolean (settings, "show-deleted");
+ g_object_unref (settings);
message_list->hidedeleted =
hide_deleted && non_trash_folder;
@@ -5008,8 +4986,7 @@ mail_regen_list (MessageList *ml,
gboolean scroll_to_cursor)
{
struct _regen_list_msg *m;
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
gboolean thread_subject;
/* report empty search as NULL, not as one/two-space string */
@@ -5026,10 +5003,9 @@ mail_regen_list (MessageList *ml,
mail_regen_cancel (ml);
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/display/thread_subject";
- thread_subject = gconf_client_get_bool (client, key, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ thread_subject = g_settings_get_boolean (settings, "thread-subject");
+ g_object_unref (settings);
#ifndef BROKEN_ETREE
/* this can sometimes crash,so ... */
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/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index b1895c4fb8..cb0cf60ab2 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -185,8 +185,8 @@ contacts_removed (EBookShellView *book_shell_view,
static void
model_query_changed_cb (EBookShellView *book_shell_view,
- GParamSpec *param,
- EAddressbookModel *model)
+ GParamSpec *param,
+ EAddressbookModel *model)
{
EBookShellContent *book_shell_content;
EAddressbookView *current_view;
diff --git a/modules/bogofilter/evolution-bogofilter.c b/modules/bogofilter/evolution-bogofilter.c
index 1d0c99abd4..74c1d362ca 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.bogofilter");
+ 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..af1ca215fd 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;
+ gchar **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..c31689fec9 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -645,18 +645,24 @@ 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;
+ gchar **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 +671,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..deca594c08 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;
+ gchar **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..cc94dfb63c 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",
- "/apps/evolution/mail/composer/sign_reply_if_signed");
+ MAIL_SCHEMA,
+ "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..7bed18d8b8 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,9 +1633,8 @@ 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;
g_return_if_fail (E_IS_MAIL_SHELL_VIEW (mail_shell_view));
@@ -1691,17 +1690,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..27f7314f9c 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>
@@ -105,14 +103,8 @@ em_mailer_prefs_finalize (GObject *object)
EMMailerPrefs *prefs = (EMMailerPrefs *) 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,6 +122,9 @@ em_mailer_prefs_class_init (EMMailerPrefsClass *class)
static void
em_mailer_prefs_init (EMMailerPrefs *preferences)
{
+ preferences->settings = g_settings_new ("org.gnome.evolution.mail");
+
+ /* XXX Still need this for a little while longer. */
preferences->gconf = gconf_client_get_default ();
}
@@ -142,13 +137,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 +157,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 +188,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 +201,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 +240,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 +492,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 +529,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 +537,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 +551,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 +565,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 +599,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 +613,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 +650,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 +868,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)
@@ -1089,20 +1087,23 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
prefs->junk_header_remove = (GtkButton *)e_builder_get_widget (prefs->builder, "junk_header_remove");
prefs->junk_book_lookup = (GtkToggleButton *)e_builder_get_widget (prefs->builder, "lookup_book");
prefs->junk_lookup_local_only = (GtkToggleButton *)e_builder_get_widget (prefs->builder, "junk_lookup_local_only");
- toggle_button_init (prefs, prefs->junk_book_lookup, FALSE,
- "/apps/evolution/mail/junk/lookup_addressbook",
- G_CALLBACK (junk_book_lookup_button_toggled));
+ toggle_button_init (
+ prefs, prefs->junk_book_lookup,
+ FALSE, "junk-lookup-addressbook",
+ G_CALLBACK (junk_book_lookup_button_toggled));
- toggle_button_init (prefs, prefs->junk_lookup_local_only, FALSE,
- "/apps/evolution/mail/junk/lookup_addressbook_local_only",
- G_CALLBACK (toggle_button_toggled));
+ toggle_button_init (
+ prefs, prefs->junk_lookup_local_only,
+ FALSE, "junk-lookup-addressbook-local-only",
+ G_CALLBACK (toggle_button_toggled));
junk_book_lookup_button_toggled (prefs->junk_book_lookup, prefs);
prefs->junk_header_list_store = init_junk_tree ((GtkWidget *) prefs->junk_header_tree, prefs);
- toggle_button_init (prefs, prefs->junk_header_check, FALSE,
- "/apps/evolution/mail/junk/check_custom_header",
- G_CALLBACK (custom_junk_button_toggled));
+ toggle_button_init (
+ prefs, prefs->junk_header_check,
+ FALSE, "junk-check-custom-header",
+ G_CALLBACK (custom_junk_button_toggled));
custom_junk_button_toggled (prefs->junk_header_check, prefs);
jh_tree_refill (prefs);
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/online-accounts/e-online-accounts-google.c b/modules/online-accounts/e-online-accounts-google.c
index 07c8923609..e71b8d16cb 100644
--- a/modules/online-accounts/e-online-accounts-google.c
+++ b/modules/online-accounts/e-online-accounts-google.c
@@ -144,7 +144,7 @@ online_accounts_google_sync_mail (GoaObject *goa_object,
if (account) {
/* the account is already configured,
- do not change user's changes */
+ * do not change user's changes */
return;
}
diff --git a/modules/spamassassin/evolution-spamassassin.c b/modules/spamassassin/evolution-spamassassin.c
index b578acf228..1b88d0f558 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,10 +1073,6 @@ 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
- * 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. */
g_object_class_install_property (
object_class,
PROP_LOCAL_ONLY,
@@ -1146,36 +1141,38 @@ 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.spamassassin");
+
+ g_settings_bind (
+ settings, "local-only",
+ G_OBJECT (extension), "local-only",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ settings, "spamc-binary",
+ G_OBJECT (extension), "spamc-binary",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ settings, "spamd-binary",
+ G_OBJECT (extension), "spamd-binary",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ settings, "socket-path",
+ G_OBJECT (extension), "socket-path",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ settings, "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);
diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c
index 7a6a9fce55..9f2837d923 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -28,8 +28,6 @@
#include <glib/gi18n.h>
#include <string.h>
-#include <gconf/gconf-client.h>
-
#include <e-util/e-util.h>
#include <e-util/e-config.h>
#include <mail/em-config.h>
@@ -45,11 +43,11 @@
#include "widgets/misc/e-attachment-view.h"
#include "widgets/misc/e-attachment-store.h"
-#define GCONF_KEY_ATTACH_REMINDER_CLUES "/apps/evolution/mail/attachment_reminder_clues"
+#define CONF_KEY_ATTACH_REMINDER_CLUES "attachment-reminder-clues"
#define SIGNATURE "-- "
typedef struct {
- GConfClient *gconf;
+ GSettings *settings;
GtkWidget *treeview;
GtkWidget *clue_add;
GtkWidget *clue_edit;
@@ -147,21 +145,22 @@ static gboolean
check_for_attachment_clues (gchar *msg)
{
/* TODO : Add more strings. RegEx ??? */
- GConfClient *gconf;
- GSList *clue_list = NULL, *list;
+ GSettings *settings;
+ gchar **clue_list;
+ gint i;
gboolean ret_val = FALSE;
guint msg_length;
- gconf = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.plugin.attachment-reminder");
- /* Get the list from gconf */
- clue_list = gconf_client_get_list ( gconf, GCONF_KEY_ATTACH_REMINDER_CLUES, GCONF_VALUE_STRING, NULL );
+ /* Get the list from GSettings */
+ clue_list = g_settings_get_strv (settings, CONF_KEY_ATTACH_REMINDER_CLUES);
- g_object_unref (gconf);
+ g_object_unref (settings);
msg_length = strlen (msg);
- for (list = clue_list; list && !ret_val; list = g_slist_next (list)) {
- gchar *needle = g_utf8_strdown (list->data, -1);
+ for (i = 0; clue_list[i] != NULL; i++) {
+ gchar *needle = g_utf8_strdown (clue_list[i], -1);
if (g_strstr_len (msg, msg_length, needle)) {
ret_val = TRUE;
}
@@ -169,8 +168,7 @@ check_for_attachment_clues (gchar *msg)
}
if (clue_list) {
- g_slist_foreach (clue_list, (GFunc) g_free, NULL);
- g_slist_free (clue_list);
+ g_strfreev (clue_list);
}
return ret_val;
@@ -221,13 +219,15 @@ static void
commit_changes (UIData *ui)
{
GtkTreeModel *model = NULL;
- GSList *clue_list = NULL;
+ GVariantBuilder b;
+ GVariant *v;
GtkTreeIter iter;
gboolean valid;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview));
valid = gtk_tree_model_get_iter_first (model, &iter);
+ g_variant_builder_init (&b, G_VARIANT_TYPE ("as"));
while (valid) {
gchar *keyword;
@@ -236,14 +236,14 @@ commit_changes (UIData *ui)
/* Check if the keyword is not empty */
if ((keyword) && (g_utf8_strlen (g_strstrip (keyword), -1) > 0))
- clue_list = g_slist_append (clue_list, keyword);
+ g_variant_builder_add (&b, "s", keyword);
valid = gtk_tree_model_iter_next (model, &iter);
}
- gconf_client_set_list (ui->gconf, GCONF_KEY_ATTACH_REMINDER_CLUES, GCONF_VALUE_STRING, clue_list, NULL);
+ v = g_variant_builder_end (&b);
+ g_settings_set_value (ui->settings, CONF_KEY_ATTACH_REMINDER_CLUES, v);
- g_slist_foreach (clue_list, (GFunc) g_free, NULL);
- g_slist_free (clue_list);
+ g_variant_unref (v);
}
static void
@@ -388,7 +388,7 @@ destroy_ui_data (gpointer data)
if (!ui)
return;
- g_object_unref (ui->gconf);
+ g_object_unref (ui->settings);
g_free (ui);
}
@@ -398,9 +398,9 @@ e_plugin_lib_get_configure_widget (EPlugin *plugin)
GtkCellRenderer *renderer;
GtkTreeSelection *selection;
GtkTreeIter iter;
- GConfClient *gconf = gconf_client_get_default ();
GtkWidget *hbox;
- GSList *clue_list = NULL, *list;
+ gchar **clue_list;
+ gint i;
GtkWidget *reminder_configuration_box;
GtkWidget *clue_container;
@@ -452,7 +452,7 @@ e_plugin_lib_get_configure_widget (EPlugin *plugin)
gtk_container_add (GTK_CONTAINER (vbuttonbox2), clue_remove);
gtk_widget_set_can_default (clue_remove, TRUE);
- ui->gconf = gconf_client_get_default ();
+ ui->settings = g_settings_new ("org.gnome.evolution.plugin.attachment-reminder");
ui->treeview = clue_treeview;
@@ -495,17 +495,16 @@ e_plugin_lib_get_configure_widget (EPlugin *plugin)
G_CALLBACK (clue_edit_clicked), ui);
gtk_widget_set_sensitive (ui->clue_edit, FALSE);
- /* Populate tree view with values from gconf */
- clue_list = gconf_client_get_list ( gconf, GCONF_KEY_ATTACH_REMINDER_CLUES, GCONF_VALUE_STRING, NULL );
+ /* Populate tree view with values from GSettings */
+ clue_list = g_settings_get_strv (ui->settings, CONF_KEY_ATTACH_REMINDER_CLUES);
- for (list = clue_list; list; list = g_slist_next (list)) {
+ for (i = 0; clue_list[i] != NULL; i++) {
gtk_list_store_append (ui->store, &iter);
- gtk_list_store_set (ui->store, &iter, CLUE_KEYWORD_COLUMN, list->data, -1);
+ gtk_list_store_set (ui->store, &iter, CLUE_KEYWORD_COLUMN, clue_list[i], -1);
}
if (clue_list) {
- g_slist_foreach (clue_list, (GFunc) g_free, NULL);
- g_slist_free (clue_list);
+ g_strfreev (clue_list);
}
/* Add the list here */
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index d24e75480c..f03c189b21 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -110,29 +110,15 @@ find_esource_by_uri (ESourceList *source_list,
static gint
get_check_interval (void)
{
- GConfClient *gconf;
- GConfValue *value;
+ GSettings *settings;
gint res = BBDB_BLIST_DEFAULT_CHECK_INTERVAL;
- gconf = gconf_client_get_default ();
- value = gconf_client_get (gconf, GCONF_KEY_GAIM_CHECK_INTERVAL, NULL);
-
- if (value) {
- if (value->type == GCONF_VALUE_INT) {
- gint interval = gconf_value_get_int (value);
-
- if (interval > 0)
- res = interval * 60;
- else
- res = interval;
- }
-
- gconf_value_free (value);
- }
+ settings = g_settings_new (CONF_SCHEMA);
+ res = g_settings_get_int (settings, CONF_KEY_GAIM_CHECK_INTERVAL);
- g_object_unref (gconf);
+ g_object_unref (settings);
- return res;
+ return res * 60;
}
gint
@@ -310,12 +296,12 @@ bbdb_handle_send (EPlugin *ep,
EMEventTargetComposer *target)
{
EComposerHeaderTable *table;
- GConfClient *gconf;
+ GSettings *settings;
gboolean enable;
- gconf = gconf_client_get_default ();
- enable = gconf_client_get_bool (gconf, GCONF_KEY_ENABLE, NULL);
- g_object_unref (gconf);
+ settings = g_settings_new (CONF_SCHEMA);
+ enable = g_settings_get_boolean (settings, CONF_KEY_ENABLE);
+ g_object_unref (settings);
if (!enable)
return;
@@ -423,28 +409,29 @@ bbdb_do_it (EBookClient *client,
EBookClient *
bbdb_create_book_client (gint type)
{
- GConfClient *gconf;
+ GSettings *settings;
gchar *uri;
EBookClient *client = NULL;
GError *error = NULL;
gboolean enable = TRUE;
- gconf = gconf_client_get_default ();
+
+ settings = g_settings_new (CONF_SCHEMA);
/* Check to see if we're supposed to be running */
if (type == AUTOMATIC_CONTACTS_ADDRESSBOOK)
- enable = gconf_client_get_bool (gconf, GCONF_KEY_ENABLE, NULL);
+ enable = g_settings_get_boolean (settings, CONF_KEY_ENABLE);
if (!enable) {
- g_object_unref (G_OBJECT (gconf));
+ g_object_unref (G_OBJECT (settings));
return NULL;
}
/* Open the appropriate addresbook. */
if (type == GAIM_ADDRESSBOOK)
- uri = gconf_client_get_string (gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL);
+ uri = g_settings_get_string (settings, CONF_KEY_WHICH_ADDRESSBOOK_GAIM);
else
- uri = gconf_client_get_string (gconf, GCONF_KEY_WHICH_ADDRESSBOOK, NULL);
- g_object_unref (G_OBJECT (gconf));
+ uri = g_settings_get_string (settings, CONF_KEY_WHICH_ADDRESSBOOK);
+ g_object_unref (G_OBJECT (settings));
if (uri == NULL)
client = e_book_client_new_system (&error);
@@ -486,13 +473,13 @@ bbdb_open_book_client (EBookClient *client)
gboolean
bbdb_check_gaim_enabled (void)
{
- GConfClient *gconf;
- gboolean gaim_enabled;
+ GSettings *settings;
+ gboolean gaim_enabled;
- gconf = gconf_client_get_default ();
- gaim_enabled = gconf_client_get_bool (gconf, GCONF_KEY_ENABLE_GAIM, NULL);
+ settings = g_settings_new (CONF_SCHEMA);
+ gaim_enabled = g_settings_get_boolean (settings, CONF_KEY_ENABLE_GAIM);
- g_object_unref (G_OBJECT (gconf));
+ g_object_unref (G_OBJECT (settings));
return gaim_enabled;
}
@@ -518,36 +505,30 @@ enable_toggled_cb (GtkWidget *widget,
gboolean active;
ESource *selected_source;
gchar *addressbook;
+ GSettings *settings = g_settings_new (CONF_SCHEMA);
active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- /* Save the new setting to gconf */
- gconf_client_set_bool (stuff->target->gconf, GCONF_KEY_ENABLE, active, NULL);
+ /* Save the new setting to GSettings */
+ g_settings_set_boolean (settings, CONF_KEY_ENABLE, active);
gtk_widget_set_sensitive (stuff->combo_box, active);
- addressbook = gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, NULL);
+ addressbook = g_settings_get_string (settings, CONF_KEY_WHICH_ADDRESSBOOK);
if (active && !addressbook) {
const gchar *uri = NULL;
- GError *error = NULL;
selected_source = e_source_combo_box_get_active (
E_SOURCE_COMBO_BOX (stuff->combo_box));
if (selected_source != NULL)
uri = e_source_get_uri (selected_source);
- gconf_client_set_string (
- stuff->target->gconf,
- GCONF_KEY_WHICH_ADDRESSBOOK,
- uri ? uri : "", &error);
-
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ g_settings_set_string (settings, CONF_KEY_WHICH_ADDRESSBOOK, uri ? uri : "");
}
+
g_free (addressbook);
+ g_object_unref (settings);
}
static void
@@ -558,21 +539,23 @@ enable_gaim_toggled_cb (GtkWidget *widget,
gboolean active;
ESource *selected_source;
gchar *addressbook_gaim;
+ GSettings *settings = g_settings_new (CONF_SCHEMA);
active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- /* Save the new setting to gconf */
- gconf_client_set_bool (stuff->target->gconf, GCONF_KEY_ENABLE_GAIM, active, NULL);
+ /* Save the new setting to GSettings */
+ g_settings_set_boolean (settings, CONF_KEY_ENABLE_GAIM, active);
- addressbook_gaim = gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL);
+ addressbook_gaim = g_settings_get_string (settings, CONF_KEY_WHICH_ADDRESSBOOK_GAIM);
gtk_widget_set_sensitive (stuff->gaim_combo_box, active);
if (active && !addressbook_gaim) {
selected_source = e_source_combo_box_get_active (
E_SOURCE_COMBO_BOX (stuff->gaim_combo_box));
- gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, e_source_get_uri (selected_source), NULL);
+ g_settings_set_string (settings, CONF_KEY_WHICH_ADDRESSBOOK_GAIM, e_source_get_uri (selected_source));
}
g_free (addressbook_gaim);
+ g_object_unref (settings);
}
static void
@@ -586,19 +569,16 @@ source_changed_cb (ESourceComboBox *source_combo_box,
struct bbdb_stuff *stuff)
{
ESource *source;
- GError *error = NULL;
+ GSettings *settings = g_settings_new (CONF_SCHEMA);
source = e_source_combo_box_get_active (source_combo_box);
- gconf_client_set_string (
- stuff->target->gconf,
- GCONF_KEY_WHICH_ADDRESSBOOK,
- source ? e_source_get_uri (source) : "", &error);
+ g_settings_set_string (
+ settings,
+ CONF_KEY_WHICH_ADDRESSBOOK,
+ source ? e_source_get_uri (source) : "");
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ g_object_unref (settings);
}
static void
@@ -606,19 +586,16 @@ gaim_source_changed_cb (ESourceComboBox *source_combo_box,
struct bbdb_stuff *stuff)
{
ESource *source;
- GError *error = NULL;
+ GSettings *settings = g_settings_new (CONF_SCHEMA);
source = e_source_combo_box_get_active (source_combo_box);
- gconf_client_set_string (
- stuff->target->gconf,
- GCONF_KEY_WHICH_ADDRESSBOOK_GAIM,
- source ? e_source_get_uri (source) : "", &error);
+ g_settings_set_string (
+ settings,
+ CONF_KEY_WHICH_ADDRESSBOOK_GAIM,
+ source ? e_source_get_uri (source) : "");
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ g_object_unref (settings);
}
static GtkWidget *
@@ -628,17 +605,18 @@ create_addressbook_combo_box (struct bbdb_stuff *stuff,
GtkWidget *combo_box;
ESourceList *source_list;
ESource *selected_source;
- gchar *selected_source_uri;
-
- GConfClient *gconf = stuff->target->gconf;
+ gchar *selected_source_uri;
+ GConfClient *gconf;
+ GSettings *settings = g_settings_new (CONF_SCHEMA);
+ gconf = gconf_client_get_default ();
source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources");
combo_box = e_source_combo_box_new (source_list);
if (type == GAIM_ADDRESSBOOK)
- selected_source_uri = gconf_client_get_string (gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL);
+ selected_source_uri = g_settings_get_string (settings, CONF_KEY_WHICH_ADDRESSBOOK_GAIM);
else
- selected_source_uri = gconf_client_get_string (gconf, GCONF_KEY_WHICH_ADDRESSBOOK, NULL);
+ selected_source_uri = g_settings_get_string (settings, CONF_KEY_WHICH_ADDRESSBOOK);
selected_source = find_esource_by_uri (
source_list, selected_source_uri);
g_free (selected_source_uri);
@@ -651,6 +629,8 @@ create_addressbook_combo_box (struct bbdb_stuff *stuff,
stuff->source_list = source_list;
+ g_object_unref (settings);
+
return combo_box;
}
@@ -675,6 +655,7 @@ bbdb_page_factory (EPlugin *ep,
GtkWidget *gaim_label;
GtkWidget *button;
gchar *str;
+ GSettings *settings = g_settings_new (CONF_SCHEMA);
/* A structure to pass some stuff around */
stuff = g_new0 (struct bbdb_stuff, 1);
@@ -708,7 +689,7 @@ bbdb_page_factory (EPlugin *ep,
/* Enable BBDB checkbox */
check = gtk_check_button_new_with_mnemonic (_("Create _address book entries when sending mails"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), gconf_client_get_bool (target->gconf, GCONF_KEY_ENABLE, NULL));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), g_settings_get_boolean (settings, CONF_KEY_ENABLE));
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (enable_toggled_cb), stuff);
gtk_box_pack_start (GTK_BOX (inner_vbox), check, FALSE, FALSE, 0);
stuff->check = check;
@@ -719,7 +700,7 @@ bbdb_page_factory (EPlugin *ep,
/* Source selection combo box */
combo_box = create_addressbook_combo_box (stuff, AUTOMATIC_CONTACTS_ADDRESSBOOK);
g_signal_connect (combo_box, "changed", G_CALLBACK (source_changed_cb), stuff);
- gtk_widget_set_sensitive (combo_box, gconf_client_get_bool (target->gconf, GCONF_KEY_ENABLE, NULL));
+ gtk_widget_set_sensitive (combo_box, g_settings_get_boolean (settings, CONF_KEY_ENABLE));
gtk_box_pack_start (GTK_BOX (inner_vbox), combo_box, FALSE, FALSE, 0);
stuff->combo_box = combo_box;
@@ -744,7 +725,7 @@ bbdb_page_factory (EPlugin *ep,
/* Enable Gaim Checkbox */
check_gaim = gtk_check_button_new_with_mnemonic (_("_Synchronize contact info and images from Pidgin buddy list"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_gaim), gconf_client_get_bool (target->gconf, GCONF_KEY_ENABLE_GAIM, NULL));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_gaim), g_settings_get_boolean (settings, CONF_KEY_ENABLE_GAIM));
g_signal_connect (GTK_TOGGLE_BUTTON (check_gaim), "toggled", G_CALLBACK (enable_gaim_toggled_cb), stuff);
gtk_box_pack_start (GTK_BOX (inner_vbox), check_gaim, FALSE, FALSE, 0);
stuff->check_gaim = check_gaim;
@@ -755,7 +736,7 @@ bbdb_page_factory (EPlugin *ep,
/* Gaim Source Selection Combo Box */
gaim_combo_box = create_addressbook_combo_box (stuff, GAIM_ADDRESSBOOK);
g_signal_connect (gaim_combo_box, "changed", G_CALLBACK (gaim_source_changed_cb), stuff);
- gtk_widget_set_sensitive (gaim_combo_box, gconf_client_get_bool (target->gconf, GCONF_KEY_ENABLE_GAIM, NULL));
+ gtk_widget_set_sensitive (gaim_combo_box, g_settings_get_boolean (settings, CONF_KEY_ENABLE_GAIM));
gtk_box_pack_start (GTK_BOX (inner_vbox), gaim_combo_box, FALSE, FALSE, 0);
stuff->gaim_combo_box = gaim_combo_box;
@@ -769,6 +750,8 @@ bbdb_page_factory (EPlugin *ep,
gtk_widget_show_all (page);
+ g_object_unref (settings);
+
return page;
}
diff --git a/plugins/bbdb/bbdb.h b/plugins/bbdb/bbdb.h
index 82951a7566..9104e0896b 100644
--- a/plugins/bbdb/bbdb.h
+++ b/plugins/bbdb/bbdb.h
@@ -22,14 +22,14 @@
#define __BBDB_H__
/* Where to store the config values */
-#define GCONF_ROOT_PATH "/apps/evolution/autocontacts"
-#define GCONF_KEY_ENABLE GCONF_ROOT_PATH "/enable_autocontacts"
-#define GCONF_KEY_ENABLE_GAIM GCONF_ROOT_PATH "/auto_sync_gaim"
-#define GCONF_KEY_WHICH_ADDRESSBOOK GCONF_ROOT_PATH "/addressbook_source"
-#define GCONF_KEY_WHICH_ADDRESSBOOK_GAIM GCONF_ROOT_PATH "/gaim_addressbook_source"
-#define GCONF_KEY_GAIM_LAST_SYNC_TIME GCONF_ROOT_PATH "/gaim_last_sync_time"
-#define GCONF_KEY_GAIM_LAST_SYNC_MD5 GCONF_ROOT_PATH "/gaim_last_sync_md5"
-#define GCONF_KEY_GAIM_CHECK_INTERVAL GCONF_ROOT_PATH "/gaim_check_interval"
+#define CONF_SCHEMA "org.gnome.evolution.plugin.autocontacts"
+#define CONF_KEY_ENABLE "enable"
+#define CONF_KEY_ENABLE_GAIM "auto-sync-gaim"
+#define CONF_KEY_WHICH_ADDRESSBOOK "addressbook-source"
+#define CONF_KEY_WHICH_ADDRESSBOOK_GAIM "gaim-addressbook-source"
+#define CONF_KEY_GAIM_LAST_SYNC_TIME "gaim-last-sync-time"
+#define CONF_KEY_GAIM_LAST_SYNC_MD5 "gaim-last-sync-md5"
+#define CONF_KEY_GAIM_CHECK_INTERVAL "gaim-check-interval"
/* How often to poll the buddy list for changes (every two minutes is default) */
#define BBDB_BLIST_DEFAULT_CHECK_INTERVAL (2 * 60)
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c
index d2e3c0016c..68e71eed02 100644
--- a/plugins/bbdb/gaimbuddies.c
+++ b/plugins/bbdb/gaimbuddies.c
@@ -112,12 +112,12 @@ get_md5_as_string (const gchar *filename)
void
bbdb_sync_buddy_list_check (void)
{
- GConfClient *gconf;
struct stat statbuf;
time_t last_sync_time;
gchar *md5;
gchar *blist_path;
gchar *last_sync_str;
+ GSettings *settings = g_settings_new (CONF_SCHEMA);
blist_path = get_buddy_filename ();
if (stat (blist_path, &statbuf) < 0) {
@@ -125,11 +125,8 @@ bbdb_sync_buddy_list_check (void)
return;
}
- gconf = gconf_client_get_default ();
-
/* Reprocess the buddy list if it's been updated. */
- last_sync_str = gconf_client_get_string (
- gconf, GCONF_KEY_GAIM_LAST_SYNC_TIME, NULL);
+ last_sync_str = g_settings_get_string (settings, CONF_KEY_GAIM_LAST_SYNC_TIME);
if (last_sync_str == NULL || !strcmp ((const gchar *)last_sync_str, ""))
last_sync_time = (time_t) 0;
else
@@ -138,15 +135,15 @@ bbdb_sync_buddy_list_check (void)
g_free (last_sync_str);
if (statbuf.st_mtime <= last_sync_time) {
- g_object_unref (G_OBJECT (gconf));
+ g_object_unref (G_OBJECT (settings));
g_free (blist_path);
return;
}
- last_sync_str = gconf_client_get_string (
- gconf, GCONF_KEY_GAIM_LAST_SYNC_MD5, NULL);
+ last_sync_str = g_settings_get_string (
+ settings, CONF_KEY_GAIM_LAST_SYNC_MD5);
- g_object_unref (gconf);
+ g_object_unref (settings);
md5 = get_md5_as_string (blist_path);
@@ -164,7 +161,7 @@ bbdb_sync_buddy_list_check (void)
static gboolean
store_last_sync_idle_cb (gpointer data)
{
- GConfClient *gconf;
+ GSettings *settings;
gchar *md5;
gchar *blist_path = get_buddy_filename ();
time_t last_sync;
@@ -175,13 +172,13 @@ store_last_sync_idle_cb (gpointer data)
md5 = get_md5_as_string (blist_path);
- gconf = gconf_client_get_default ();
- gconf_client_set_string (
- gconf, GCONF_KEY_GAIM_LAST_SYNC_TIME, last_sync_time, NULL);
- gconf_client_set_string (
- gconf, GCONF_KEY_GAIM_LAST_SYNC_MD5, md5, NULL);
+ settings = g_settings_new (CONF_SCHEMA);
+ g_settings_set_string (
+ settings, CONF_KEY_GAIM_LAST_SYNC_TIME, last_sync_time);
+ g_settings_set_string (
+ settings, CONF_KEY_GAIM_LAST_SYNC_MD5, md5);
- g_object_unref (G_OBJECT (gconf));
+ g_object_unref (G_OBJECT (settings));
g_free (last_sync_time);
g_free (blist_path);
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index b9386caa87..7d67faa5b6 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -43,15 +43,8 @@
#include <stdlib.h>
#include <string.h>
-#include <gconf/gconf-client.h>
-
#define d(x)
-#define EDITOR_GCONF_KEY_COMMAND \
- "/apps/evolution/eplugin/external-editor/editor-command"
-#define EDITOR_GCONF_KEY_IMMEDIATE \
- "/apps/evolution/eplugin/external-editor/launch-on-key-press"
-
gboolean e_plugin_ui_init (GtkUIManager *manager,
EMsgComposer *composer);
GtkWidget * e_plugin_lib_get_configure_widget
@@ -82,29 +75,29 @@ void
ee_editor_command_changed (GtkWidget *textbox)
{
const gchar *editor;
- GConfClient *gconf;
+ GSettings *settings;
editor = gtk_entry_get_text (GTK_ENTRY (textbox));
d(printf ("\n\aeditor is : [%s] \n\a", editor));
- /* gconf access for every key-press. Sucky ? */
- gconf = gconf_client_get_default ();
- gconf_client_set_string (gconf, EDITOR_GCONF_KEY_COMMAND, editor, NULL);
- g_object_unref (gconf);
+ /* GSettings access for every key-press. Sucky ? */
+ settings = g_settings_new ("org.gnome.evolution.plugin.external-editor");
+ g_settings_set_string (settings, "command", editor);
+ g_object_unref (settings);
}
void
ee_editor_immediate_launch_changed (GtkWidget *checkbox)
{
gboolean immediately;
- GConfClient *gconf;
+ GSettings *settings;
immediately = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox));
d(printf ("\n\aimmediate launch is : [%d] \n\a", immediately));
- gconf = gconf_client_get_default ();
- gconf_client_set_bool (gconf, EDITOR_GCONF_KEY_IMMEDIATE, immediately, NULL);
- g_object_unref (gconf);
+ settings = g_settings_new ("org.gnome.evolution.plugin.external-editor");
+ g_settings_set_boolean (settings, "launch-on-key-press", immediately);
+ g_object_unref (settings);
}
GtkWidget *
@@ -112,7 +105,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
{
GtkWidget *vbox, *textbox, *label, *help;
GtkWidget *checkbox;
- GConfClient *gconf;
+ GSettings *settings;
gchar *editor;
gboolean checked;
@@ -120,9 +113,9 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
textbox = gtk_entry_new ();
label = gtk_label_new (_("Command to be executed to launch the editor: "));
help = gtk_label_new (_("For Emacs use \"xemacs\"\nFor VI use \"gvim -f\""));
- gconf = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.plugin.external-editor");
- editor = gconf_client_get_string (gconf, EDITOR_GCONF_KEY_COMMAND, NULL);
+ editor = g_settings_get_string (settings, "command");
if (editor) {
gtk_entry_set_text (GTK_ENTRY (textbox), editor);
g_free (editor);
@@ -130,10 +123,10 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
checkbox = gtk_check_button_new_with_label (
_("Automatically launch when a new mail is edited"));
- checked = gconf_client_get_bool (gconf, EDITOR_GCONF_KEY_IMMEDIATE, NULL);
+ checked = g_settings_get_boolean (settings, "launch-on-key-press");
if (checked)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), TRUE);
- g_object_unref (gconf);
+ g_object_unref (settings);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), textbox, FALSE, FALSE, 0);
@@ -261,7 +254,7 @@ async_external_editor (EMsgComposer *composer)
{
gchar *filename = NULL;
gint status = 0;
- GConfClient *gconf;
+ GSettings *settings;
gchar *editor_cmd_line = NULL, *editor_cmd = NULL, *content;
gint fd, position = -1, offset = -1;
@@ -289,9 +282,8 @@ async_external_editor (EMsgComposer *composer)
return;
}
- gconf = gconf_client_get_default ();
- editor_cmd = gconf_client_get_string (
- gconf, EDITOR_GCONF_KEY_COMMAND, NULL);
+ settings = g_settings_new ("org.gnome.evolution.plugin.external-editor");
+ editor_cmd = g_settings_get_string (settings, "command");
if (!editor_cmd) {
if (!(editor_cmd = g_strdup (g_getenv ("EDITOR"))) )
/* Make gedit the default external editor,
@@ -299,7 +291,7 @@ async_external_editor (EMsgComposer *composer)
* and no $EDITOR is set. */
editor_cmd = g_strdup ("gedit");
}
- g_object_unref (gconf);
+ g_object_unref (settings);
if (g_strrstr (editor_cmd, "vim") != NULL
&& gtk_html_get_cursor_pos (
@@ -410,7 +402,7 @@ key_press_cb (GtkWidget *widget,
GdkEventKey *event,
EMsgComposer *composer)
{
- GConfClient *gconf;
+ GSettings *settings;
gboolean immediately;
/* we don't want to start the editor on any modifier keys */
@@ -426,9 +418,9 @@ key_press_cb (GtkWidget *widget,
break;
}
- gconf = gconf_client_get_default ();
- immediately = gconf_client_get_bool (gconf, EDITOR_GCONF_KEY_IMMEDIATE, NULL);
- g_object_unref (gconf);
+ settings = g_settings_new ("org.gnome.evolution.plugin.external-editor");
+ immediately = g_settings_get_boolean (settings, "launch-on-key-press");
+ g_object_unref (settings);
if (!immediately)
return FALSE;
diff --git a/plugins/face/face.c b/plugins/face/face.c
index df9eafcd5a..18a1a2d978 100644
--- a/plugins/face/face.c
+++ b/plugins/face/face.c
@@ -35,17 +35,17 @@
#define d(x)
-#define SETTINGS_KEY "/apps/evolution/eplugin/face/insert_by_default"
+#define SETTINGS_KEY "insert-face-picture"
static gboolean
get_include_face_by_default (void)
{
- GConfClient *gconf = gconf_client_get_default ();
+ GSettings *settings = g_settings_new ("org.gnome.evolution.plugin.face-picture");
gboolean res;
- res = gconf_client_get_bool (gconf, SETTINGS_KEY, NULL);
+ res = g_settings_get_boolean (settings, SETTINGS_KEY);
- g_object_unref (gconf);
+ g_object_unref (settings);
return res;
}
@@ -53,11 +53,11 @@ get_include_face_by_default (void)
static void
set_include_face_by_default (gboolean value)
{
- GConfClient *gconf = gconf_client_get_default ();
+ GSettings *settings = g_settings_new ("org.gnome.evolution.plugin.face-picture");
- gconf_client_set_bool (gconf, SETTINGS_KEY, value, NULL);
+ g_settings_set_boolean (settings, SETTINGS_KEY, value);
- g_object_unref (gconf);
+ g_object_unref (settings);
}
static gchar *
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 72535a3a99..e4f32010bd 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -27,7 +27,6 @@
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
#include <libecal/e-cal-client.h>
#include <libecal/e-cal-time-util.h>
#include <libedataserverui/e-source-selector.h>
@@ -51,7 +50,7 @@
#include <misc/e-attachment.h>
#define CLASSID "itip://"
-#define GCONF_KEY_DELETE "/apps/evolution/itip/delete_processed"
+#define CONF_KEY_DELETE "delete-processed"
#define d(x)
@@ -2888,7 +2887,7 @@ void
format_itip (EPlugin *ep,
EMFormatHookTarget *target)
{
- GConfClient *gconf;
+ GSettings *settings;
gchar *classid;
struct _itip_puri *puri;
CamelDataWrapper *content;
@@ -2907,8 +2906,8 @@ format_itip (EPlugin *ep,
em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (EMFormatHTMLPObject), classid, target->part, format_itip_object);
- gconf = gconf_client_get_default ();
- puri->delete_message = gconf_client_get_bool (gconf, GCONF_KEY_DELETE, NULL);
+ settings = g_settings_new ("org.gnome.evolution.plugin.itip");
+ puri->delete_message = g_settings_get_boolean (settings, CONF_KEY_DELETE);
puri->has_organizer = FALSE;
puri->no_reply_wanted = FALSE;
puri->folder = ((EMFormat *) target->format)->folder;
@@ -2918,7 +2917,7 @@ format_itip (EPlugin *ep,
puri->cancellable = g_cancellable_new ();
puri->puri.free = puri_free;
- g_object_unref (gconf);
+ g_object_unref (settings);
/* This is non-gui thread. Download the part for using in the main thread */
content = camel_medium_get_content ((CamelMedium *) target->part);
@@ -2950,9 +2949,13 @@ static void
delete_toggled_cb (GtkWidget *widget,
gpointer data)
{
- EMConfigTargetPrefs *target = data;
+ GSettings *settings;
+ gboolean active;
- gconf_client_set_bool (target->gconf, GCONF_KEY_DELETE, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)), NULL);
+ settings = g_settings_new ("org.gnome.evolution.plugin.itip");
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ g_settings_set_boolean (settings, CONF_KEY_DELETE, active);
+ g_object_unref (settings);
}
static void
@@ -3023,6 +3026,7 @@ itip_formatter_page_factory (EPlugin *ep,
GtkWidget *scrolledwin;
ESourceList *source_list;
gchar *str;
+ GSettings *settings;
/* Create a new notebook page */
page = gtk_vbox_new (FALSE, 0);
@@ -3051,12 +3055,15 @@ itip_formatter_page_factory (EPlugin *ep,
gtk_box_pack_start (GTK_BOX (hbox), inner_vbox, FALSE, FALSE, 0);
/* Delete message after acting */
- /* FIXME Need a schema for this */
+ settings = g_settings_new ("org.gnome.evolution.plugin.itip");
+
check = gtk_check_button_new_with_mnemonic (_("_Delete message after acting"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), gconf_client_get_bool (target->gconf, GCONF_KEY_DELETE, NULL));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), g_settings_get_boolean (settings, CONF_KEY_DELETE));
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (delete_toggled_cb), target);
gtk_box_pack_start (GTK_BOX (inner_vbox), check, FALSE, FALSE, 0);
+ g_object_unref (settings);
+
/* "Conflict searching" */
frame = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (page), frame, TRUE, TRUE, 24);
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index d41f492292..481cf24c97 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -27,7 +27,6 @@
#include <string.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
#include <gio/gio.h>
#ifdef HAVE_CANBERRA
@@ -37,7 +36,6 @@
#include <time.h>
#include <e-util/e-config.h>
-#include <e-util/gconf-bridge.h>
#include <mail/e-mail-folder-utils.h>
#include <mail/em-utils.h>
#include <mail/em-event.h>
@@ -48,11 +46,10 @@
#include <libnotify/notify.h>
#endif
-#define GCONF_KEY_ROOT "/apps/evolution/eplugin/mail-notification/"
-#define GCONF_KEY_NOTIFY_ONLY_INBOX GCONF_KEY_ROOT "notify-only-inbox"
-#define GCONF_KEY_ENABLED_STATUS GCONF_KEY_ROOT "status-enabled"
-#define GCONF_KEY_STATUS_NOTIFICATION GCONF_KEY_ROOT "status-notification"
-#define GCONF_KEY_ENABLED_SOUND GCONF_KEY_ROOT "sound-enabled"
+#define CONF_KEY_NOTIFY_ONLY_INBOX "notify-only-inbox"
+#define CONF_KEY_ENABLED_STATUS "notify-status-enabled"
+#define CONF_KEY_STATUS_NOTIFICATION "notify-status-notification"
+#define CONF_KEY_ENABLED_SOUND "notify-sound-enabled"
static gboolean enabled = FALSE;
static GtkWidget *get_cfg_widget (void);
@@ -72,7 +69,7 @@ static GStaticMutex mlock = G_STATIC_MUTEX_INIT;
* d) GtkWidget *get_config_widget_...(void)
* to obtain config widget for the particular part
*
- * It also should have its own gconf key for enabled state. In each particular
+ * It also should have its own GSettings key for enabled state. In each particular
* function it should do its work as expected. enable_... will be called always
* when disabling plugin, but only when enabling/disabling part itself.
**/
@@ -82,22 +79,17 @@ static GStaticMutex mlock = G_STATIC_MUTEX_INIT;
/* ------------------------------------------------------------------- */
static gboolean
-is_part_enabled (const gchar *gconf_key)
+is_part_enabled (const gchar *key)
{
/* the part is enabled by default */
gboolean res = TRUE;
- GConfClient *client;
- GConfValue *is_key;
+ GSettings *settings;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.plugin.mail-notification");
- is_key = gconf_client_get (client, gconf_key, NULL);
- if (is_key) {
- res = gconf_client_get_bool (client, gconf_key, NULL);
- gconf_value_free (is_key);
- }
+ res = g_settings_get_boolean (settings, key);
- g_object_unref (client);
+ g_object_unref (settings);
return res;
}
@@ -503,10 +495,10 @@ read_notify_status (EMEventTargetMessage *t)
/* min no. seconds between newmail notifications */
#define NOTIFY_THROTTLE 30
-#define GCONF_KEY_SOUND_BEEP GCONF_KEY_ROOT "sound-beep"
-#define GCONF_KEY_SOUND_FILE GCONF_KEY_ROOT "sound-file"
-#define GCONF_KEY_SOUND_PLAY_FILE GCONF_KEY_ROOT "sound-play-file"
-#define GCONF_KEY_SOUND_USE_THEME GCONF_KEY_ROOT "sound-use-theme"
+#define CONF_KEY_SOUND_BEEP "notify-sound-beep"
+#define CONF_KEY_SOUND_FILE "notify-sound-file"
+#define CONF_KEY_SOUND_PLAY_FILE "notify-sound-play-file"
+#define CONF_KEY_SOUND_USE_THEME "notify-sound-use-theme"
#ifdef HAVE_CANBERRA
static ca_context *mailnotification = NULL;
@@ -544,16 +536,14 @@ sound_file_set_cb (GtkFileChooser *file_chooser,
gpointer data)
{
gchar *file;
- GConfClient *client;
+ GSettings *settings;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.plugin.mail-notification");
file = gtk_file_chooser_get_filename (file_chooser);
- gconf_client_set_string (
- client, GCONF_KEY_SOUND_FILE,
- (file != NULL) ? file : "", NULL);
+ g_settings_set_string (settings, CONF_KEY_SOUND_FILE, (file != NULL) ? file : "");
- g_object_unref (client);
+ g_object_unref (settings);
g_free (file);
}
@@ -585,20 +575,20 @@ static gboolean
sound_notify_idle_cb (gpointer user_data)
{
gchar *file;
- GConfClient *client;
+ GSettings *settings;
struct _SoundNotifyData *data = (struct _SoundNotifyData *) user_data;
g_return_val_if_fail (data != NULL, FALSE);
- client = gconf_client_get_default ();
- file = gconf_client_get_string (client, GCONF_KEY_SOUND_FILE, NULL);
+ settings = g_settings_new ("org.gnome.evolution.plugin.mail-notification");
+ file = g_settings_get_string (settings, CONF_KEY_SOUND_FILE);
do_play_sound (
- is_part_enabled (GCONF_KEY_SOUND_BEEP),
- is_part_enabled (GCONF_KEY_SOUND_USE_THEME),
+ is_part_enabled (CONF_KEY_SOUND_BEEP),
+ is_part_enabled (CONF_KEY_SOUND_USE_THEME),
file);
- g_object_unref (client);
+ g_object_unref (settings);
g_free (file);
time (&data->last_notify);
@@ -656,14 +646,11 @@ get_config_widget_sound (void)
GtkWidget *master;
GtkWidget *widget;
gchar *file;
- GConfBridge *bridge;
- GConfClient *client;
+ GSettings *settings;
GSList *group = NULL;
struct _SoundConfigureWidgets *scw;
const gchar *text;
- bridge = gconf_bridge_get ();
-
scw = g_malloc0 (sizeof (struct _SoundConfigureWidgets));
vbox = gtk_vbox_new (FALSE, 6);
@@ -676,9 +663,9 @@ get_config_widget_sound (void)
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- gconf_bridge_bind_property (
- bridge, GCONF_KEY_ENABLED_SOUND,
- G_OBJECT (widget), "active");
+ settings = g_settings_new ("org.gnome.evolution.plugin.mail-notification");
+
+ g_settings_bind (settings, CONF_KEY_ENABLED_SOUND, G_OBJECT (widget), "active", G_SETTINGS_BIND_DEFAULT);
master = widget;
scw->enable = GTK_TOGGLE_BUTTON (widget);
@@ -706,9 +693,7 @@ get_config_widget_sound (void)
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- gconf_bridge_bind_property (
- bridge, GCONF_KEY_SOUND_BEEP,
- G_OBJECT (widget), "active");
+ g_settings_bind (settings, CONF_KEY_SOUND_BEEP, G_OBJECT (widget), "active", G_SETTINGS_BIND_DEFAULT);
scw->beep = GTK_TOGGLE_BUTTON (widget);
@@ -719,9 +704,7 @@ get_config_widget_sound (void)
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- gconf_bridge_bind_property (
- bridge, GCONF_KEY_SOUND_USE_THEME,
- G_OBJECT (widget), "active");
+ g_settings_bind (settings, CONF_KEY_SOUND_USE_THEME, G_OBJECT (widget), "active", G_SETTINGS_BIND_DEFAULT);
scw->use_theme = GTK_TOGGLE_BUTTON (widget);
@@ -738,9 +721,7 @@ get_config_widget_sound (void)
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- gconf_bridge_bind_property (
- bridge, GCONF_KEY_SOUND_PLAY_FILE,
- G_OBJECT (widget), "active");
+ g_settings_bind (settings, CONF_KEY_SOUND_PLAY_FILE, G_OBJECT (widget), "active", G_SETTINGS_BIND_DEFAULT);
text = _("Select sound file");
widget = gtk_file_chooser_button_new (
@@ -761,13 +742,12 @@ get_config_widget_sound (void)
widget, "clicked",
G_CALLBACK (sound_play_cb), scw);
- client = gconf_client_get_default ();
- file = gconf_client_get_string (client, GCONF_KEY_SOUND_FILE, NULL);
+ file = g_settings_get_string (settings, CONF_KEY_SOUND_FILE);
if (file && *file)
gtk_file_chooser_set_filename (scw->filechooser, file);
- g_object_unref (client);
+ g_object_unref (settings);
g_free (file);
g_signal_connect (
@@ -789,10 +769,10 @@ get_cfg_widget (void)
{
GtkWidget *container;
GtkWidget *widget;
- GConfBridge *bridge;
+ GSettings *settings;
const gchar *text;
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.plugin.mail-notification");
widget = gtk_vbox_new (FALSE, 12);
gtk_widget_show (widget);
@@ -804,9 +784,7 @@ get_cfg_widget (void)
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- gconf_bridge_bind_property (
- bridge, GCONF_KEY_NOTIFY_ONLY_INBOX,
- G_OBJECT (widget), "active");
+ g_settings_bind (settings, CONF_KEY_NOTIFY_ONLY_INBOX, G_OBJECT (widget), "active", G_SETTINGS_BIND_DEFAULT);
#ifdef HAVE_LIBNOTIFY
text = _("Show _notification when a new message arrives");
@@ -814,14 +792,14 @@ get_cfg_widget (void)
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- gconf_bridge_bind_property (
- bridge, GCONF_KEY_ENABLED_STATUS,
- G_OBJECT (widget), "active");
+ g_settings_bind (settings, CONF_KEY_ENABLED_STATUS, G_OBJECT (widget), "active", G_SETTINGS_BIND_DEFAULT);
#endif
widget = get_config_widget_sound ();
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+ g_object_unref (settings);
+
return container;
}
@@ -838,7 +816,7 @@ org_gnome_mail_new_notify (EPlugin *ep,
g_return_if_fail (t != NULL);
if (!enabled || !t->new || (!t->is_inbox &&
- is_part_enabled (GCONF_KEY_NOTIFY_ONLY_INBOX)))
+ is_part_enabled (CONF_KEY_NOTIFY_ONLY_INBOX)))
return;
g_static_mutex_lock (&mlock);
@@ -846,11 +824,11 @@ org_gnome_mail_new_notify (EPlugin *ep,
new_notify_dbus (t);
#ifdef HAVE_LIBNOTIFY
- if (is_part_enabled (GCONF_KEY_ENABLED_STATUS))
+ if (is_part_enabled (CONF_KEY_ENABLED_STATUS))
new_notify_status (t);
#endif
- if (is_part_enabled (GCONF_KEY_ENABLED_SOUND))
+ if (is_part_enabled (CONF_KEY_ENABLED_SOUND))
new_notify_sound (t);
g_static_mutex_unlock (&mlock);
@@ -870,11 +848,11 @@ org_gnome_mail_read_notify (EPlugin *ep,
read_notify_dbus (t);
#ifdef HAVE_LIBNOTIFY
- if (is_part_enabled (GCONF_KEY_ENABLED_STATUS))
+ if (is_part_enabled (CONF_KEY_ENABLED_STATUS))
read_notify_status (t);
#endif
- if (is_part_enabled (GCONF_KEY_ENABLED_SOUND))
+ if (is_part_enabled (CONF_KEY_ENABLED_SOUND))
read_notify_sound (t);
g_static_mutex_unlock (&mlock);
@@ -887,7 +865,7 @@ e_plugin_lib_enable (EPlugin *ep,
if (enable) {
enable_dbus (enable);
- if (is_part_enabled (GCONF_KEY_ENABLED_SOUND))
+ if (is_part_enabled (CONF_KEY_ENABLED_SOUND))
enable_sound (enable);
enabled = TRUE;
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 29329d284e..a4713c5447 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -321,9 +321,13 @@ set_organizer (ECalComponent *comp,
gchar *res;
if (folder) {
- CamelStore *store = camel_folder_get_parent_store (folder);
+ CamelStore *store;
+ const gchar *uid;
- account = e_get_account_by_uid (camel_service_get_uid (CAMEL_SERVICE (store)));
+ store = camel_folder_get_parent_store (folder);
+ uid = camel_service_get_uid (CAMEL_SERVICE (store));
+
+ account = e_get_account_by_uid (uid);
}
if (!account)
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 5e48a59920..476172d43e 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -408,7 +408,6 @@ mar_got_folder (CamelStore *store,
g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
camel_folder_freeze (folder);
uids = camel_folder_get_uids (folder);
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index 55f62f8e3d..c46e903ec0 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -26,7 +26,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
-#include <gconf/gconf-client.h>
#include <string.h>
#include <stdio.h>
@@ -44,7 +43,7 @@ enum {
EPP_TEXT
};
-static GConfClient *epp_gconf = NULL;
+static GSettings *epp_settings = NULL;
static gint epp_mode = -1;
static gboolean epp_show_suppressed = TRUE;
@@ -281,7 +280,7 @@ epp_mode_changed (GtkComboBox *dropdown,
if (epp_mode > 2)
epp_mode = 0;
- gconf_client_set_string(epp_gconf, "/apps/evolution/eplugin/prefer_plain/mode", epp_options[epp_mode].key, NULL);
+ g_settings_set_string (epp_settings, "mode", epp_options[epp_mode].key);
update_info_label (info_label, epp_mode);
}
@@ -292,7 +291,7 @@ epp_show_suppressed_toggled (GtkToggleButton *check,
g_return_if_fail (check != NULL);
epp_show_suppressed = gtk_toggle_button_get_active (check);
- gconf_client_set_bool (epp_gconf, "/apps/evolution/eplugin/prefer_plain/show_suppressed", epp_show_suppressed, NULL);
+ g_settings_set_boolean (epp_settings, "show-suppressed", epp_show_suppressed);
}
GtkWidget *
@@ -363,14 +362,13 @@ e_plugin_lib_enable (EPlugin *ep,
gchar *key;
gint i;
- if (epp_gconf || epp_mode != -1)
+ if (epp_settings || epp_mode != -1)
return 0;
if (enable) {
- GConfValue *val;
- epp_gconf = gconf_client_get_default ();
- key = gconf_client_get_string(epp_gconf, "/apps/evolution/eplugin/prefer_plain/mode", NULL);
+ epp_settings = g_settings_new ("org.gnome.evolution.plugin.prefer-plain");
+ key = g_settings_get_string (epp_settings, "mode");
if (key) {
for (i = 0; i < G_N_ELEMENTS (epp_options); i++) {
if (!strcmp (epp_options[i].key, key)) {
@@ -383,16 +381,11 @@ e_plugin_lib_enable (EPlugin *ep,
epp_mode = 0;
}
- val = gconf_client_get (epp_gconf, "/apps/evolution/eplugin/prefer_plain/show_suppressed", NULL);
- if (val) {
- epp_show_suppressed = gconf_value_get_bool (val);
- gconf_value_free (val);
- } else
- epp_show_suppressed = TRUE;
+ epp_show_suppressed = g_settings_get_boolean (epp_settings, "show-suppressed");
} else {
- if (epp_gconf) {
- g_object_unref (epp_gconf);
- epp_gconf = NULL;
+ if (epp_settings) {
+ g_object_unref (epp_settings);
+ epp_settings = NULL;
}
}
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index d4054b573e..8ef601241f 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -385,7 +385,7 @@ add_source_list_with_check (GtkWidget *frame,
EClientSourceType source_type,
GCallback toggle_callback,
EImportTarget *target,
- gboolean active)
+ gboolean active)
{
GtkWidget *check, *hbox;
ESourceList *source_list = NULL;
@@ -1128,7 +1128,10 @@ dequote_string (gchar *str)
}
static gboolean
-lookup_address (pst_item *item, const gchar *str, gboolean is_unique, CamelAddress *addr)
+lookup_address (pst_item *item,
+ const gchar *str,
+ gboolean is_unique,
+ CamelAddress *addr)
{
gboolean res = FALSE;
gchar *address;
@@ -1983,7 +1986,7 @@ static void
pst_process_component (PstImporter *m,
pst_item *item,
const gchar *comp_type,
- ECalComponentVType vtype,
+ ECalComponentVType vtype,
ECalClient *cal)
{
ECalComponent *ec;
diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c
index 968a9d6496..d840177dfe 100644
--- a/plugins/save-calendar/rdf-format.c
+++ b/plugins/save-calendar/rdf-format.c
@@ -54,18 +54,14 @@ static void add_string_to_rdf (xmlNodePtr node,
#define CALENDAR_CONFIG_PREFIX "/apps/evolution/calendar"
#define CALENDAR_CONFIG_TIMEZONE CALENDAR_CONFIG_PREFIX "/display/timezone"
-static GConfClient *config = NULL;
-
static gchar *
calendar_config_get_timezone (void)
{
-
+ GSettings *settings;
gchar *retval = NULL;
- if (!config)
- config = gconf_client_get_default ();
-
- retval = gconf_client_get_string (config, CALENDAR_CONFIG_TIMEZONE, NULL);
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ retval = g_settings_get_string (settings, "timezone");
if (!retval)
retval = g_strdup ("UTC");
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index f68cfc1b26..d8921bcb11 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -30,8 +30,6 @@
#include <glib/gi18n.h>
#include <string.h>
-#include <gconf/gconf-client.h>
-
#include <e-util/e-config.h>
#include <mail/e-mail-folder-utils.h>
@@ -49,7 +47,7 @@
#include <composer/e-msg-composer.h>
-#define GCONF_KEY_TEMPLATE_PLACEHOLDERS "/apps/evolution/mail/template_placeholders"
+#define CONF_KEY_TEMPLATE_PLACEHOLDERS "template-placeholders"
typedef struct _AsyncContext AsyncContext;
@@ -63,7 +61,7 @@ struct _AsyncContext {
};
typedef struct {
- GConfClient *gconf;
+ GSettings *settings;
GtkWidget *treeview;
GtkWidget *clue_add;
GtkWidget *clue_edit;
@@ -149,7 +147,7 @@ destroy_ui_data (gpointer data)
if (!ui)
return;
- g_object_unref (ui->gconf);
+ g_object_unref (ui->settings);
g_free (ui);
}
@@ -157,13 +155,15 @@ static void
commit_changes (UIData *ui)
{
GtkTreeModel *model = NULL;
- GSList *clue_list = NULL;
+ GVariantBuilder b;
GtkTreeIter iter;
gboolean valid;
+ GVariant *v;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview));
valid = gtk_tree_model_get_iter_first (model, &iter);
+ g_variant_builder_init (&b, G_VARIANT_TYPE ("as"));
while (valid) {
gchar *keyword, *value;
gchar *key;
@@ -175,15 +175,14 @@ commit_changes (UIData *ui)
if ((keyword) && (value) && (g_utf8_strlen (g_strstrip (keyword), -1) > 0)
&& (g_utf8_strlen (g_strstrip (value), -1) > 0)) {
key = g_strdup_printf("%s=%s", keyword, value);
- clue_list = g_slist_append (clue_list, key);
+ g_variant_builder_add (&b, "s", key);
}
valid = gtk_tree_model_iter_next (model, &iter);
}
- gconf_client_set_list (ui->gconf, GCONF_KEY_TEMPLATE_PLACEHOLDERS, GCONF_VALUE_STRING, clue_list, NULL);
-
- g_slist_foreach (clue_list, (GFunc) g_free, NULL);
- g_slist_free (clue_list);
+ v = g_variant_builder_end (&b);
+ g_settings_set_value (ui->settings, CONF_KEY_TEMPLATE_PLACEHOLDERS, v);
+ g_variant_unref (v);
}
static void
@@ -396,9 +395,9 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
GtkCellRenderer *renderer_key, *renderer_value;
GtkTreeSelection *selection;
GtkTreeIter iter;
- GConfClient *gconf = gconf_client_get_default ();
GtkWidget *hbox;
- GSList *clue_list = NULL, *list;
+ gchar **clue_list;
+ gint i;
GtkTreeModel *model;
GtkWidget *templates_configuration_box;
GtkWidget *clue_container;
@@ -450,7 +449,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
gtk_container_add (GTK_CONTAINER (vbuttonbox2), clue_remove);
gtk_widget_set_can_default (clue_remove, TRUE);
- ui->gconf = gconf_client_get_default ();
+ ui->settings = g_settings_new ("org.gnome.evolution.plugin.templates");
ui->treeview = clue_treeview;
@@ -499,19 +498,18 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
model, "row-changed",
G_CALLBACK (clue_check_isempty), ui);
- /* Populate tree view with values from gconf */
- clue_list = gconf_client_get_list ( gconf, GCONF_KEY_TEMPLATE_PLACEHOLDERS, GCONF_VALUE_STRING, NULL );
+ /* Populate tree view with values from GSettings */
+ clue_list = g_settings_get_strv (ui->settings, CONF_KEY_TEMPLATE_PLACEHOLDERS);
- for (list = clue_list; list; list = g_slist_next (list)) {
- gchar **temp = g_strsplit (list->data, "=", 2);
+ for (i = 0; clue_list[i] != NULL; i++) {
+ gchar **temp = g_strsplit (clue_list[i], "=", 2);
gtk_list_store_append (ui->store, &iter);
gtk_list_store_set (ui->store, &iter, CLUE_KEYWORD_COLUMN, temp[0], CLUE_VALUE_COLUMN, temp[1], -1);
g_strfreev (temp);
}
if (clue_list) {
- g_slist_foreach (clue_list, (GFunc) g_free, NULL);
- g_slist_free (clue_list);
+ g_strfreev (clue_list);
}
/* Add the list here */
diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c
index d8af58c6b3..e5700d4b2c 100644
--- a/shell/e-shell-backend.c
+++ b/shell/e-shell-backend.c
@@ -41,6 +41,10 @@
#include "e-shell.h"
#include "e-shell-view.h"
+#define E_SHELL_BACKEND_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_BACKEND, EShellBackendPrivate))
+
struct _EShellBackendPrivate {
/* We keep a reference to corresponding EShellView subclass
@@ -171,7 +175,7 @@ shell_backend_dispose (GObject *object)
{
EShellBackendPrivate *priv;
- priv = E_SHELL_BACKEND (object)->priv;
+ priv = E_SHELL_BACKEND_GET_PRIVATE (object);
if (priv->shell_view_class != NULL) {
g_type_class_unref (priv->shell_view_class);
@@ -187,7 +191,7 @@ shell_backend_finalize (GObject *object)
{
EShellBackendPrivate *priv;
- priv = E_SHELL_BACKEND (object)->priv;
+ priv = E_SHELL_BACKEND_GET_PRIVATE (object);
g_warn_if_fail (g_queue_is_empty (priv->activities));
g_queue_free (priv->activities);
@@ -294,8 +298,7 @@ e_shell_backend_class_init (EShellBackendClass *class)
static void
e_shell_backend_init (EShellBackend *shell_backend)
{
- shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_backend, E_TYPE_SHELL_BACKEND, EShellBackendPrivate);
+ shell_backend->priv = E_SHELL_BACKEND_GET_PRIVATE (shell_backend);
shell_backend->priv->activities = g_queue_new ();
}
diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c
index dd75a40b82..b0fa40d146 100644
--- a/shell/e-shell-migrate.c
+++ b/shell/e-shell-migrate.c
@@ -38,9 +38,6 @@
#include "es-event.h"
-#define GCONF_VERSION_KEY "/apps/evolution/version"
-#define GCONF_LAST_VERSION_KEY "/apps/evolution/last_version"
-
/******************** Begin XDG Base Directory Migration ********************/
/* These are the known EShellBackend names as of Evolution 3.0 */
static const gchar *shell_backend_names[] =
@@ -735,23 +732,23 @@ shell_migrate_get_version (EShell *shell,
gint *minor,
gint *micro)
{
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
gchar *string;
*major = 0;
*minor = 0;
*micro = 0;
- key = GCONF_VERSION_KEY;
- client = e_shell_get_gconf_client (shell);
- string = gconf_client_get_string (client, key, NULL);
+ settings = g_settings_new ("org.gnome.evolution");
+ string = g_settings_get_string (settings, "version");
if (string != NULL) {
/* Since 1.4.0 we've kept the version key in GConf. */
sscanf (string, "%d.%d.%d", major, minor, micro);
g_free (string);
}
+
+ g_object_unref (settings);
}
static void
@@ -902,8 +899,8 @@ gboolean
e_shell_migrate_attempt (EShell *shell)
{
ESEvent *ese;
+ GSettings *settings;
GConfClient *client;
- const gchar *key;
gint major, minor, micro;
gint last_major, last_minor, last_micro;
gint curr_major, curr_minor, curr_micro;
@@ -912,7 +909,7 @@ e_shell_migrate_attempt (EShell *shell)
g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
- client = e_shell_get_gconf_client (shell);
+ settings = g_settings_new ("org.gnome.evolution");
if (sscanf (BASE_VERSION, "%d.%d", &curr_major, &curr_minor) != 2) {
g_warning ("Could not parse BASE_VERSION (%s)", BASE_VERSION);
@@ -938,22 +935,23 @@ e_shell_migrate_attempt (EShell *shell)
/* The 2.32.x (except of 2.32.2) lefts duplicate On This Computer/Personal sources,
* thus clean the mess up */
+ client = gconf_client_get_default ();
merge_duplicate_local_sources (client, "/apps/evolution/addressbook/sources");
merge_duplicate_local_sources (client, "/apps/evolution/calendar/sources");
merge_duplicate_local_sources (client, "/apps/evolution/tasks/sources");
merge_duplicate_local_sources (client, "/apps/evolution/memos/sources");
+ g_object_unref (client);
/* Record a successful migration. */
string = g_strdup_printf (
"%d.%d.%d", curr_major, curr_minor, curr_micro);
- gconf_client_set_string (client, GCONF_VERSION_KEY, string, NULL);
+ g_settings_set_string (settings, "version", string);
g_free (string);
migrated = TRUE;
- key = GCONF_LAST_VERSION_KEY;
- /* Try to retrieve the last migrated version from GConf. */
- string = gconf_client_get_string (client, key, NULL);
+ /* Try to retrieve the last migrated version from GSettings. */
+ string = g_settings_get_string (settings, "last-upgraded-version");
if (migrated || string == NULL || sscanf (string, "%d.%d.%d",
&last_major, &last_minor, &last_micro) != 3) {
last_major = major;
@@ -964,9 +962,11 @@ e_shell_migrate_attempt (EShell *shell)
string = g_strdup_printf (
"%d.%d.%d", last_major, last_minor, last_micro);
- gconf_client_set_string (client, key, string, NULL);
+ g_settings_set_string (settings, "last-upgraded-version", string);
g_free (string);
+ g_object_unref (settings);
+
/** @Event: Shell attempted upgrade
* @Id: upgrade.done
* @Target: ESMenuTargetState
diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c
index 370d6b4f5e..ff3f06b403 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -39,6 +39,10 @@
#include "e-shell-window-actions.h"
+#define E_SHELL_SEARCHBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate))
+
#define SEARCH_OPTION_ADVANCED (-1)
/* Default "state key file" group: [Search Bar] */
@@ -629,7 +633,7 @@ shell_searchbar_dispose (GObject *object)
{
EShellSearchbarPrivate *priv;
- priv = E_SHELL_SEARCHBAR (object)->priv;
+ priv = E_SHELL_SEARCHBAR_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -911,8 +915,7 @@ e_shell_searchbar_init (EShellSearchbar *searchbar)
GtkLabel *label;
GtkWidget *widget;
- searchbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- searchbar, E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate);
+ searchbar->priv = E_SHELL_SEARCHBAR_GET_PRIVATE (searchbar);
gtk_box_set_spacing (GTK_BOX (searchbar), 24);
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index 5e5f3428fe..a46123f325 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -31,7 +31,9 @@
#include "e-shell-settings.h"
-#include "e-util/gconf-bridge.h"
+#define E_SHELL_SETTINGS_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate))
struct _EShellSettingsPrivate {
GArray *value_array;
@@ -44,130 +46,90 @@ 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;
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;
- }
+ settings = g_settings_new (schema);
+
+ v = g_settings_get_value (settings, key);
+
+ if (g_variant_is_of_type (v, G_VARIANT_TYPE_STRING)) {
+ pspec = g_param_spec_string (
+ property_name, NULL, NULL,
+ g_variant_get_string (v, NULL),
+ G_PARAM_READWRITE);
+ } else if (g_variant_is_of_type (v, 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 (v, 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 (v, 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 (v, 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 (v, 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 (v, 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 (v, 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 (v, 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 (v, 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 ();
}
@@ -180,7 +142,7 @@ shell_settings_set_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *dest_value;
- priv = E_SHELL_SETTINGS (object)->priv;
+ priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
dest_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@@ -208,7 +170,7 @@ shell_settings_get_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *src_value;
- priv = E_SHELL_SETTINGS (object)->priv;
+ priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
src_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@@ -222,7 +184,7 @@ shell_settings_finalize (GObject *object)
EShellSettingsPrivate *priv;
guint ii;
- priv = E_SHELL_SETTINGS (object)->priv;
+ priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
for (ii = 0; ii < priv->value_array->len; ii++)
g_value_unset (&g_array_index (priv->value_array, GValue, ii));
@@ -260,8 +222,7 @@ shell_settings_init (EShellSettings *shell_settings,
value_array = g_array_new (FALSE, TRUE, sizeof (GValue));
g_array_set_size (value_array, property_count);
- shell_settings->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_settings, E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate);
+ shell_settings->priv = E_SHELL_SETTINGS_GET_PRIVATE (shell_settings);
shell_settings->priv->value_array = value_array;
g_object_freeze_notify (G_OBJECT (shell_settings));
@@ -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,17 @@ 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 +432,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 +490,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 +548,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-sidebar.c b/shell/e-shell-sidebar.c
index 62652dee1f..b7e523f733 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -37,6 +37,10 @@
#include <e-util/e-unicode.h>
#include <shell/e-shell-view.h>
+#define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate))
+
struct _EShellSidebarPrivate {
gpointer shell_view; /* weak pointer */
@@ -157,7 +161,7 @@ shell_sidebar_dispose (GObject *object)
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR (object)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -184,7 +188,7 @@ shell_sidebar_finalize (GObject *object)
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR (object)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
g_free (priv->icon_name);
g_free (priv->primary_text);
@@ -249,7 +253,7 @@ shell_sidebar_get_preferred_height (GtkWidget *widget,
gint child_min, child_nat;
GtkWidget *child;
- priv = E_SHELL_SIDEBAR (widget)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
child = gtk_bin_get_child (GTK_BIN (widget));
gtk_widget_get_preferred_height (child, minimum, natural);
@@ -270,7 +274,7 @@ shell_sidebar_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GtkWidget *child;
- priv = E_SHELL_SIDEBAR (widget)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
gtk_widget_set_allocation (widget, allocation);
@@ -301,7 +305,7 @@ shell_sidebar_forall (GtkContainer *container,
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR (container)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (container);
if (include_internals && callback && priv->event_box)
callback (priv->event_box, callback_data);
@@ -434,8 +438,7 @@ e_shell_sidebar_init (EShellSidebar *shell_sidebar)
const GdkColor *color;
const gchar *icon_name;
- shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_sidebar, E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate);
+ shell_sidebar->priv = E_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
gtk_widget_set_has_window (GTK_WIDGET (shell_sidebar), FALSE);
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c
index 77c1fd2929..3a72851f97 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -34,6 +34,10 @@
#include <glib/gi18n.h>
#include <libebackend/e-extensible.h>
+#define E_SHELL_SWITCHER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate))
+
#define H_PADDING 6
#define V_PADDING 6
@@ -235,7 +239,7 @@ shell_switcher_dispose (GObject *object)
{
EShellSwitcherPrivate *priv;
- priv = E_SHELL_SWITCHER (object)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (object);
while (priv->proxies != NULL) {
GtkWidget *widget = priv->proxies->data;
@@ -255,7 +259,7 @@ shell_switcher_get_preferred_width (GtkWidget *widget,
GtkWidget *child;
GList *iter;
- priv = E_SHELL_SWITCHER (widget)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
*minimum = *natural = 0;
@@ -290,7 +294,7 @@ shell_switcher_get_preferred_height (GtkWidget *widget,
GtkWidget *child;
GList *iter;
- priv = E_SHELL_SWITCHER (widget)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
*minimum = *natural = 0;
@@ -351,7 +355,7 @@ shell_switcher_screen_changed (GtkWidget *widget,
EShellSwitcherPrivate *priv;
GtkSettings *settings;
- priv = E_SHELL_SWITCHER (widget)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
if (gtk_widget_has_screen (widget))
settings = gtk_widget_get_settings (widget);
@@ -386,7 +390,7 @@ shell_switcher_remove (GtkContainer *container,
EShellSwitcherPrivate *priv;
GList *link;
- priv = E_SHELL_SWITCHER (container)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
/* Look in the internal widgets first. */
@@ -413,7 +417,7 @@ shell_switcher_forall (GtkContainer *container,
{
EShellSwitcherPrivate *priv;
- priv = E_SHELL_SWITCHER (container)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
if (include_internals)
g_list_foreach (
@@ -551,8 +555,7 @@ e_shell_switcher_class_init (EShellSwitcherClass *class)
static void
e_shell_switcher_init (EShellSwitcher *switcher)
{
- switcher->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- switcher, E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate);
+ switcher->priv = E_SHELL_SWITCHER_GET_PRIVATE (switcher);
gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c
index adc0d27980..3dd995ded1 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -36,6 +36,10 @@
#include <e-shell-view.h>
#include <misc/e-activity-proxy.h>
+#define E_SHELL_TASKBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate))
+
struct _EShellTaskbarPrivate {
gpointer shell_view; /* weak pointer */
@@ -204,7 +208,7 @@ shell_taskbar_dispose (GObject *object)
{
EShellTaskbarPrivate *priv;
- priv = E_SHELL_TASKBAR (object)->priv;
+ priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
g_hash_table_foreach_remove (
priv->proxy_table, (GHRFunc)
@@ -243,7 +247,7 @@ shell_taskbar_finalize (GObject *object)
{
EShellTaskbarPrivate *priv;
- priv = E_SHELL_TASKBAR (object)->priv;
+ priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
g_hash_table_destroy (priv->proxy_table);
@@ -371,8 +375,7 @@ e_shell_taskbar_init (EShellTaskbar *shell_taskbar)
{
GtkWidget *widget;
- shell_taskbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_taskbar, E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate);
+ shell_taskbar->priv = E_SHELL_TASKBAR_GET_PRIVATE (shell_taskbar);
shell_taskbar->priv->proxy_table = g_hash_table_new (NULL, NULL);
gtk_box_set_spacing (GTK_BOX (shell_taskbar), 12);
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index a2fc00e3b5..89ac929160 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -45,6 +45,10 @@
#include "e-shell-searchbar.h"
#include "e-shell-window-actions.h"
+#define E_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_VIEW, EShellViewPrivate))
+
#define SIMPLE_SEARCHBAR_WIDTH 300
#define STATE_SAVE_TIMEOUT_SECONDS 3
@@ -502,7 +506,7 @@ shell_view_dispose (GObject *object)
{
EShellViewPrivate *priv;
- priv = E_SHELL_VIEW (object)->priv;
+ priv = E_SHELL_VIEW_GET_PRIVATE (object);
/* Expedite any pending state saves. */
if (priv->state_save_timeout_id > 0) {
@@ -568,7 +572,7 @@ shell_view_finalize (GObject *object)
{
EShellViewPrivate *priv;
- priv = E_SHELL_VIEW (object)->priv;
+ priv = E_SHELL_VIEW_GET_PRIVATE (object);
g_key_file_free (priv->state_key_file);
@@ -1107,8 +1111,7 @@ e_shell_view_init (EShellView *shell_view,
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
- shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_view, E_TYPE_SHELL_VIEW, EShellViewPrivate);
+ shell_view->priv = E_SHELL_VIEW_GET_PRIVATE (shell_view);
shell_view->priv->state_key_file = g_key_file_new ();
shell_view->priv->size_group = size_group;
}
diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c
index 2b86bb1ec3..cfee37ddbf 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -30,18 +30,13 @@ shell_window_save_switcher_style_cb (GtkRadioAction *action,
GtkRadioAction *current,
EShellWindow *shell_window)
{
- EShell *shell;
- GConfClient *client;
+ GSettings *settings;
GtkToolbarStyle style;
- const gchar *key;
const gchar *string;
- GError *error = NULL;
- shell = e_shell_window_get_shell (shell_window);
- client = e_shell_get_gconf_client (shell);
+ settings = g_settings_new ("org.gnome.evolution.shell");
style = gtk_radio_action_get_current_value (action);
- key = "/apps/evolution/shell/view_defaults/buttons_style";
switch (style) {
case GTK_TOOLBAR_ICONS:
@@ -62,32 +57,23 @@ shell_window_save_switcher_style_cb (GtkRadioAction *action,
break;
}
- if (!gconf_client_set_string (client, key, string, &error)) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ g_settings_set_string (settings, "buttons-style", string);
+ g_object_unref (settings);
}
static void
shell_window_init_switcher_style (EShellWindow *shell_window)
{
- EShell *shell;
GtkAction *action;
- GConfClient *client;
+ GSettings *settings;
GtkToolbarStyle style;
- const gchar *key;
gchar *string;
- GError *error = NULL;
- /* XXX GConfBridge doesn't let you convert between numeric properties
- * and string keys, so we have to create the binding manually. */
-
- shell = e_shell_window_get_shell (shell_window);
- client = e_shell_get_gconf_client (shell);
+ settings = g_settings_new ("org.gnome.evolution.shell");
action = ACTION (SWITCHER_STYLE_ICONS);
- key = "/apps/evolution/shell/view_defaults/buttons_style";
- string = gconf_client_get_string (client, key, &error);
+ string = g_settings_get_string (settings, "buttons-style");
+ g_object_unref (settings);
if (string != NULL) {
if (strcmp (string, "icons") == 0)
@@ -266,7 +252,6 @@ e_shell_window_private_constructed (EShellWindow *shell_window)
{
EShellWindowPrivate *priv = shell_window->priv;
EShell *shell;
- GConfBridge *bridge;
GtkAction *action;
GtkAccelGroup *accel_group;
GtkUIManager *ui_manager;
@@ -421,37 +406,31 @@ e_shell_window_private_constructed (EShellWindow *shell_window)
action, "sensitive",
G_BINDING_SYNC_CREATE);
- /* Bind GObject properties to GConf keys. */
+ /* Bind GObject properties to GSettings keys. */
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.shell");
object = G_OBJECT (shell_window);
- key = "/apps/evolution/shell/view_defaults/component_id";
- gconf_bridge_bind_property (bridge, key, object, "active-view");
+ g_settings_bind (settings, "default-component-id", object, "active-view", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (priv->content_pane);
- key = "/apps/evolution/shell/view_defaults/folder_bar/width";
- gconf_bridge_bind_property_delayed (bridge, key, object, "position");
+ g_settings_bind (settings, "folder-bar-width", object, "position", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (shell_window);
- key = "/apps/evolution/shell/view_defaults/sidebar_visible";
- gconf_bridge_bind_property (bridge, key, object, "sidebar-visible");
+ g_settings_bind (settings, "sidebar-visible", object, "sidebar-visible", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (shell_window);
- key = "/apps/evolution/shell/view_defaults/statusbar_visible";
- gconf_bridge_bind_property (bridge, key, object, "taskbar-visible");
+ g_settings_bind (settings, "statusbar-visible", object, "taskbar-visible", G_SETTINGS_BIND_DEFAULT);
if (e_shell_get_express_mode (shell)) {
e_shell_window_set_switcher_visible (shell_window, FALSE);
} else {
object = G_OBJECT (shell_window);
- key = "/apps/evolution/shell/view_defaults/buttons_visible";
- gconf_bridge_bind_property (bridge, key, object, "switcher-visible");
+ g_settings_bind (settings, "buttons-visible", object, "switcher-visible", G_SETTINGS_BIND_DEFAULT);
}
object = G_OBJECT (shell_window);
- key = "/apps/evolution/shell/view_defaults/toolbar_visible";
- gconf_bridge_bind_property (bridge, key, object, "toolbar-visible");
+ g_settings_bind (settings, "toolbar-visible", object, "toolbar-visible", G_SETTINGS_BIND_DEFAULT);
/* Configure the initial size and position of the window by way
* of either a user-supplied geometry string or the last recorded
@@ -465,8 +444,9 @@ e_shell_window_private_constructed (EShellWindow *shell_window)
g_free (priv->geometry);
priv->geometry = NULL;
} else {
+ /* FIXME: how to bind this */
key = "/apps/evolution/shell/view_defaults/window";
- gconf_bridge_bind_window (bridge, key, window, TRUE, TRUE);
+ gconf_bridge_bind_window (gconf_bridge_get (), key, window, TRUE, TRUE);
}
shell_window_init_switcher_style (shell_window);
@@ -476,6 +456,8 @@ e_shell_window_private_constructed (EShellWindow *shell_window)
e_plugin_ui_enable_manager (ui_manager, id);
gtk_application_add_window (GTK_APPLICATION (shell), window);
+
+ g_object_unref (settings);
}
void
diff --git a/shell/e-shell-window-private.h b/shell/e-shell-window-private.h
index d36a3e64f6..e3a0e50665 100644
--- a/shell/e-shell-window-private.h
+++ b/shell/e-shell-window-private.h
@@ -49,6 +49,10 @@
#include <e-shell-window-actions.h>
#include <e-shell-utils.h>
+#define E_SHELL_WINDOW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_WINDOW, EShellWindowPrivate))
+
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 1a969de8c9..19178f8292 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -958,8 +958,7 @@ e_shell_window_alert_sink_init (EAlertSinkInterface *interface)
static void
e_shell_window_init (EShellWindow *shell_window)
{
- shell_window->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_window, E_TYPE_SHELL_WINDOW, EShellWindowPrivate);
+ shell_window->priv = E_SHELL_WINDOW_GET_PRIVATE (shell_window);
e_shell_window_private_init (shell_window);
}
diff --git a/shell/e-shell.c b/shell/e-shell.c
index a9c2fdc22f..cc1591337f 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -705,6 +705,12 @@ shell_dispose (GObject *object)
g_object_unref (alert);
}
+ while ((alert = g_queue_pop_head (&priv->alerts)) != NULL) {
+ g_signal_handlers_disconnect_by_func (
+ alert, shell_alert_response_cb, object);
+ g_object_unref (alert);
+ }
+
if (priv->startup_view != NULL) {
g_free (priv->startup_view);
priv->startup_view = NULL;
@@ -1194,7 +1200,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 ***/
@@ -1427,18 +1434,12 @@ e_shell_create_shell_window (EShell *shell,
/* EShellWindow initializes its active view from a GConf key,
* so set the key ahead of time to control the intial view. */
if (view_name != NULL) {
- GConfClient *client;
- const gchar *key;
- GError *error = NULL;
+ GSettings *settings;
- client = e_shell_get_gconf_client (shell);
- key = "/apps/evolution/shell/view_defaults/component_id";
- gconf_client_set_string (client, key, view_name, &error);
-
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ settings = g_settings_new ("org.gnome.evolution.shell");
+ g_settings_set_string (
+ settings, "default-component-id", view_name);
+ g_object_unref (settings);
}
shell_window = e_shell_window_new (
diff --git a/shell/main.c b/shell/main.c
index 6da0745391..c8ce8a014a 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -52,8 +52,6 @@
#endif
#endif
-#include <gconf/gconf-client.h>
-
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
@@ -90,9 +88,6 @@
#define APPLICATION_ID "org.gnome.Evolution"
-#define SKIP_WARNING_DIALOG_KEY \
- "/apps/evolution/shell/skip_warning_dialog"
-
/* STABLE_VERSION is only defined for development versions. */
#ifdef STABLE_VERSION
#define DEVELOPMENT 1
@@ -351,31 +346,28 @@ static EShell *
create_default_shell (void)
{
EShell *shell;
- GConfClient *client;
+ GSettings *settings;
GApplicationFlags flags;
- const gchar *key;
gboolean online = TRUE;
gboolean is_meego = FALSE;
gboolean small_screen = FALSE;
GError *error = NULL;
- client = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.shell");
/* Requesting online or offline mode from the command-line
* should be persistent, just like selecting it in the UI. */
- key = "/apps/evolution/shell/start_offline";
-
if (start_online || force_online) {
online = TRUE;
- gconf_client_set_bool (client, key, FALSE, &error);
+ g_settings_set_boolean (settings, "start-offline", FALSE);
} else if (start_offline) {
online = FALSE;
- gconf_client_set_bool (client, key, TRUE, &error);
+ g_settings_set_boolean (settings, "start-offline", TRUE);
} else {
gboolean value;
- value = gconf_client_get_bool (client, key, &error);
+ value = g_settings_get_boolean (settings, "start-offline");
if (error == NULL)
online = !value;
}
@@ -387,10 +379,8 @@ create_default_shell (void)
/* Determine whether to run Evolution in "express" mode. */
- key = "/apps/evolution/shell/express_mode";
-
if (!express_mode)
- express_mode = gconf_client_get_bool (client, key, &error);
+ express_mode = g_settings_get_boolean (settings, "express-mode");
if (express_mode)
e_shell_detect_meego (&is_meego, &small_screen);
@@ -422,7 +412,7 @@ create_default_shell (void)
if (force_online)
e_shell_lock_network_available (shell);
- g_object_unref (client);
+ g_object_unref (settings);
return shell;
}
@@ -432,7 +422,7 @@ main (gint argc,
gchar **argv)
{
EShell *shell;
- GConfClient *client;
+ GSettings *settings;
#ifdef DEVELOPMENT
gboolean skip_warning_dialog;
#endif
@@ -592,22 +582,19 @@ main (gint argc,
if (force_shutdown)
shell_force_shutdown ();
- client = gconf_client_get_default ();
-
if (disable_preview) {
- const gchar *key;
-
- key = "/apps/evolution/mail/display/safe_list";
- gconf_client_set_bool (client, key, TRUE, NULL);
-
- key = "/apps/evolution/addressbook/display/show_preview";
- gconf_client_set_bool (client, key, FALSE, NULL);
-
- key = "/apps/evolution/calendar/display/show_memo_preview";
- gconf_client_set_bool (client, key, FALSE, NULL);
-
- key = "/apps/evolution/calendar/display/show_task_preview";
- gconf_client_set_bool (client, key, FALSE, NULL);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ g_settings_set_boolean (settings, "safe-list", TRUE);
+ g_object_unref (settings);
+
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
+ g_settings_set_boolean (settings, "show-preview", FALSE);
+ g_object_unref (settings);
+
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ g_settings_set_boolean (settings, "show-memo-preview", FALSE);
+ g_settings_set_boolean (settings, "show-task-preview", FALSE);
+ g_object_unref (settings);
}
#ifdef G_OS_UNIX
@@ -639,16 +626,17 @@ main (gint argc,
gtk_accel_map_load (e_get_accels_filename ());
#ifdef DEVELOPMENT
- skip_warning_dialog = gconf_client_get_bool (
- client, SKIP_WARNING_DIALOG_KEY, NULL);
+ settings = g_settings_new ("org.gnome.evolution.shell");
+ skip_warning_dialog = g_settings_get_boolean (
+ settings, "skip-warning-dialog");
if (!skip_warning_dialog && !getenv ("EVOLVE_ME_HARDER"))
- gconf_client_set_bool (
- client, SKIP_WARNING_DIALOG_KEY,
- show_development_warning (), NULL);
-#endif
+ g_settings_set_boolean (
+ settings, "skip-warning-dialog",
+ show_development_warning ());
- g_object_unref (client);
+ g_object_unref (settings);
+#endif
shell = create_default_shell ();
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index 2903c84227..c5fb9b43b5 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -27,8 +27,6 @@
#include <glib/gi18n.h>
-#include "e-util/gconf-bridge.h"
-
#include "e-attachment-view.h"
#include "e-attachment-store.h"
#include "e-attachment-icon-view.h"
@@ -346,12 +344,11 @@ static void
attachment_paned_constructed (GObject *object)
{
EAttachmentPanedPrivate *priv;
- GConfBridge *bridge;
- const gchar *key;
+ GSettings *settings;
priv = E_ATTACHMENT_PANED (object)->priv;
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.shell");
/* Set up property-to-property bindings. */
@@ -409,10 +406,9 @@ attachment_paned_constructed (GObject *object)
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- /* Set up property-to-GConf bindings. */
-
- key = "/apps/evolution/shell/attachment_view";
- gconf_bridge_bind_property (bridge, key, object, "active-view");
+ /* Set up property-to-GSettings bindings. */
+ g_settings_bind (settings, "attachment-view", object, "active-view", G_SETTINGS_BIND_DEFAULT);
+ g_object_unref (settings);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_attachment_paned_parent_class)->constructed (object);
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index 4174fe92a5..166020596e 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -153,25 +153,23 @@ create_system_thumbnail (EAttachment *attachment,
static gchar *
attachment_get_default_charset (void)
{
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
gchar *charset;
/* XXX This doesn't really belong here. */
- client = gconf_client_get_default ();
- key = "/apps/evolution/mail/composer/charset";
- charset = gconf_client_get_string (client, key, NULL);
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ charset = g_settings_get_string (settings, "composer-charset");
if (charset == NULL || *charset == '\0') {
g_free (charset);
- key = "/apps/evolution/mail/format/charset";
- charset = gconf_client_get_string (client, key, NULL);
+ /* FIXME: this was "/apps/evolution/mail/format/charset", not sure it relates to "charset" */
+ charset = g_settings_get_string (settings, "charset");
if (charset == NULL || *charset == '\0') {
g_free (charset);
charset = NULL;
}
}
- g_object_unref (client);
+ g_object_unref (settings);
if (charset == NULL)
charset = g_strdup (camel_iconv_locale_charset ());
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index 67fe22968f..d8fd541438 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -520,6 +520,8 @@ etfci_draw (GnomeCanvasItem *item,
width, height,
etfci->width, y2 - y1,
E_TABLE_COL_ARROW_NONE);
+
+ cairo_restore (cr);
}
}
@@ -594,6 +596,7 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
etfci->width, button_height);
cr = cairo_create (cs);
+ cr = cairo_create (cs);
e_table_header_draw_button (
cr, ecol,
widget, 0, 0,
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 0150ff02a6..df5ee66b56 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -187,6 +187,7 @@ e_table_header_draw_button (cairo_t *cr,
inner_width -= arrow_width + HEADER_PADDING;
break;
default:
+ cairo_restore (cr);
g_return_if_reached ();
}
@@ -263,6 +264,7 @@ e_table_header_draw_button (cairo_t *cr,
}
default:
+ cairo_restore (cr);
g_return_if_reached ();
}