diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-11-23 09:48:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-11-23 09:48:44 +0800 |
commit | 9918361aef9ad1360a0ed3a240cc58d6cd9e30f8 (patch) | |
tree | 50bf24934b5ab3fefcc27913d1855a27c75e6d40 /modules/spamassassin | |
parent | fa1bb9a17e11cf12ce02d9b49bba2753f6020ea0 (diff) | |
parent | e64d6fe05c30c2cc1d7625a202afba3ba2da07cd (diff) | |
download | gsoc2013-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'
Diffstat (limited to 'modules/spamassassin')
-rw-r--r-- | modules/spamassassin/evolution-spamassassin.c | 55 |
1 files changed, 26 insertions, 29 deletions
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); |