diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2014-01-17 10:09:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2014-01-17 10:19:20 +0800 |
commit | 5a89422182cc9e5e75af808beef19479bab6e9de (patch) | |
tree | 3942df47b613fbc92d24f99a75861173f867389a | |
parent | ced4884e95b4bd57928a7cb5bb4f00ebdc3edec1 (diff) | |
download | gsoc2013-evolution-5a89422182cc9e5e75af808beef19479bab6e9de.tar gsoc2013-evolution-5a89422182cc9e5e75af808beef19479bab6e9de.tar.gz gsoc2013-evolution-5a89422182cc9e5e75af808beef19479bab6e9de.tar.bz2 gsoc2013-evolution-5a89422182cc9e5e75af808beef19479bab6e9de.tar.lz gsoc2013-evolution-5a89422182cc9e5e75af808beef19479bab6e9de.tar.xz gsoc2013-evolution-5a89422182cc9e5e75af808beef19479bab6e9de.tar.zst gsoc2013-evolution-5a89422182cc9e5e75af808beef19479bab6e9de.zip |
Prevent GSettings from freaking out over a missing junk filter.
Boy does GSettings like to abort applications! The default value for
the 'junk-default-plugin' key is 'Bogofilter' but if the key's mapping
function cannot find Evolution's Bogofilter integration module (it is
optional after all, so may not be installed), then indicating failure
will make GSettings abort Evolution. So always indicate success.
-rw-r--r-- | modules/settings/e-settings-mail-session.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/settings/e-settings-mail-session.c b/modules/settings/e-settings-mail-session.c index 4665731d63..188e32532a 100644 --- a/modules/settings/e-settings-mail-session.c +++ b/modules/settings/e-settings-mail-session.c @@ -38,7 +38,6 @@ settings_mail_session_name_to_junk_filter (GValue *value, gpointer user_data) { const gchar *filter_name; - gboolean success = FALSE; filter_name = g_variant_get_string (variant, NULL); @@ -48,10 +47,14 @@ settings_mail_session_name_to_junk_filter (GValue *value, junk_filter = e_mail_session_get_junk_filter_by_name ( E_MAIL_SESSION (user_data), filter_name); g_value_set_object (value, junk_filter); - success = (junk_filter != NULL); } - return success; + /* XXX Always return success, even if we cannot find a matching + * EMailJunkFilter. The default value is 'Bogofilter', but + * if the Bogofilter module is not installed then GSettings + * will actually abort the program. Nice. */ + + return TRUE; } static GVariant * |