aboutsummaryrefslogtreecommitdiffstats
path: root/modules/spamassassin
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-11-02 00:26:07 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-11-02 00:26:07 +0800
commitfa4a42d741fade66d51857fb2653e27e347aef80 (patch)
treebbb26a574f30fea5fb4d7cfda0e62890ce71bf4c /modules/spamassassin
parentf31ecdfc22646e5c0b6979954cf5861a9fb68722 (diff)
downloadgsoc2013-evolution-fa4a42d741fade66d51857fb2653e27e347aef80.tar.gz
gsoc2013-evolution-fa4a42d741fade66d51857fb2653e27e347aef80.tar.zst
gsoc2013-evolution-fa4a42d741fade66d51857fb2653e27e347aef80.zip
Migrate SA extension to GSettings
Diffstat (limited to 'modules/spamassassin')
-rw-r--r--modules/spamassassin/evolution-spamassassin.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/modules/spamassassin/evolution-spamassassin.c b/modules/spamassassin/evolution-spamassassin.c
index b578acf228..a628753aba 100644
--- a/modules/spamassassin/evolution-spamassassin.c
+++ b/modules/spamassassin/evolution-spamassassin.c
@@ -25,7 +25,6 @@
#include <shell/e-shell.h>
#include <e-util/e-mktemp.h>
-#include <e-util/gconf-bridge.h>
#include <mail/e-mail-junk-filter.h>
/* Standard GObject macros */
@@ -1074,7 +1073,7 @@ e_spam_assassin_class_init (ESpamAssassinClass *class)
junk_filter_class->available = spam_assassin_available;
junk_filter_class->new_config_widget = spam_assassin_new_config_widget;
- /* XXX Argh, the boolean sense of the GConf key is inverted from
+ /* XXX Argh, the boolean sense of the GSettings key is inverted from
* that of the checkbox widget. The checkbox wording is more
* natural, but GConfBridge doesn't support transform functions
* so the property has to match the sense of the GConf key. */
@@ -1146,36 +1145,23 @@ e_spam_assassin_interface_init (CamelJunkFilterInterface *interface)
static void
e_spam_assassin_init (ESpamAssassin *extension)
{
+ GSettings *settings;
+
extension->socket_path_mutex = g_mutex_new ();
/* XXX Once we move to GSettings these probably don't
* need to be properties anymore. GConfBridge is
* just easier to deal with than GConfClient. */
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/local_only",
- G_OBJECT (extension), "local-only");
-
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/spamc_binary",
- G_OBJECT (extension), "spamc-binary");
-
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/spamd_binary",
- G_OBJECT (extension), "spamd-binary");
-
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/socket_path",
- G_OBJECT (extension), "socket-path");
-
- gconf_bridge_bind_property (
- gconf_bridge_get (),
- "/apps/evolution/mail/junk/sa/use_daemon",
- G_OBJECT (extension), "use-daemon");
+ settings = g_settings_new ("org.gnome.evolution.mail");
+
+ g_settings_bind (settings, "junk-sa-local-only", G_OBJECT (extension), "local-only", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "junk-sa-spamc-binary", G_OBJECT (extension), "spamc-binary", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "junk-sa-spamd-binary", G_OBJECT (extension), "spamd-binary", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "junk-sa-socjet-path", G_OBJECT (extension), "socket-path", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "junk-sa-use-daemon", G_OBJECT (extension), "use-daemon", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
if (extension->spamc_binary == NULL)
extension->spamc_binary = g_strdup (SPAMC_BINARY);