[evolution] Prevent GSettings from freaking out over a missing junk filter.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Prevent GSettings from freaking out over a missing junk filter.
- Date: Fri, 17 Jan 2014 02:20:39 +0000 (UTC)
commit 5a89422182cc9e5e75af808beef19479bab6e9de
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Jan 16 21:09:20 2014 -0500
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.
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 4665731..188e325 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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]