[evolution-activesync] Provide some missing CamelEasSettings properties



commit 1f9daf8c847619e88c14fee559d3a9b7424d3e06
Author: Milan Crha <mcrha redhat com>
Date:   Tue May 22 11:22:05 2012 +0200

    Provide some missing CamelEasSettings properties

 camel/camel-eas-provider.c     |   10 ++--
 libevoeas/camel-eas-settings.c |   92 ++++++++++++++++++++++++++++++++++++++++
 libevoeas/camel-eas-settings.h |    6 +++
 3 files changed, 103 insertions(+), 5 deletions(-)
---
diff --git a/camel/camel-eas-provider.c b/camel/camel-eas-provider.c
index a40c989..8f74b83 100644
--- a/camel/camel-eas-provider.c
+++ b/camel/camel-eas-provider.c
@@ -46,18 +46,18 @@ static CamelProviderConfEntry eas_conf_entries[] = {
 
 	{ CAMEL_PROVIDER_CONF_SECTION_START, "mailcheck", NULL,
 	  N_("Checking for new mail") },
-	{ CAMEL_PROVIDER_CONF_CHECKBOX, "check_all", NULL,
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "check-all", NULL,
 	  N_("C_heck for new messages in all folders"), "1" },
 	{ CAMEL_PROVIDER_CONF_SECTION_END },
 
 	{ CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
-	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter-inbox", NULL,
 	  N_("_Apply filters to new messages in Inbox on this server"), "0" },
-	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk", NULL,
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter-junk", NULL,
 	  N_("Check new messages for J_unk contents"), "0" },
-	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk_inbox", "filter_junk",
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter-junk-inbox", "filter-junk",
 	  N_("Only check for Junk messages in the IN_BOX folder"), "0" },
-	{ CAMEL_PROVIDER_CONF_CHECKBOX, "sync_offline", NULL,
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "stay-synchronized", NULL,
 	  N_("Automatically synchroni_ze account locally"), "0" },
 	{ CAMEL_PROVIDER_CONF_SECTION_END },
 
diff --git a/libevoeas/camel-eas-settings.c b/libevoeas/camel-eas-settings.c
index 3874616..df0cf9a 100644
--- a/libevoeas/camel-eas-settings.c
+++ b/libevoeas/camel-eas-settings.c
@@ -24,12 +24,16 @@
 
 struct _CamelEasSettingsPrivate {
 	gboolean check_all;	
+	gboolean filter_junk;
+	gboolean filter_junk_inbox;
 	gchar *account_uid;
 };
 
 enum {
 	PROP_0,
 	PROP_CHECK_ALL,	
+	PROP_FILTER_JUNK,
+	PROP_FILTER_JUNK_INBOX,
 	PROP_ACCOUNT_UID,
 	PROP_HOST,
 	PROP_PORT,
@@ -58,6 +62,18 @@ eas_settings_set_property (GObject *object,
 				g_value_get_boolean (value));
 			return;
 
+		case PROP_FILTER_JUNK:
+			camel_eas_settings_set_filter_junk (
+				CAMEL_EAS_SETTINGS (object),
+				g_value_get_boolean (value));
+			return;
+
+		case PROP_FILTER_JUNK_INBOX:
+			camel_eas_settings_set_filter_junk_inbox (
+				CAMEL_EAS_SETTINGS (object),
+				g_value_get_boolean (value));
+			return;
+
 		case PROP_ACCOUNT_UID:
 			camel_eas_settings_set_account_uid (
 				CAMEL_EAS_SETTINGS (object),
@@ -112,6 +128,20 @@ eas_settings_get_property (GObject *object,
 				CAMEL_EAS_SETTINGS (object)));
 			return;
 		
+		case PROP_FILTER_JUNK:
+			g_value_set_boolean (
+				value,
+				camel_eas_settings_get_filter_junk (
+				CAMEL_EAS_SETTINGS (object)));
+			return;
+
+		case PROP_FILTER_JUNK_INBOX:
+			g_value_set_boolean (
+				value,
+				camel_eas_settings_get_filter_junk_inbox (
+				CAMEL_EAS_SETTINGS (object)));
+			return;
+
 		case PROP_ACCOUNT_UID:
 			g_value_set_string (
 				value,
@@ -198,6 +228,30 @@ camel_eas_settings_class_init (CamelEasSettingsClass *class)
 
 	g_object_class_install_property (
 		object_class,
+		PROP_FILTER_JUNK,
+		g_param_spec_boolean (
+			"filter-junk",
+			"Filter Junk",
+			"Whether to filter junk from all folders",
+			FALSE,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT |
+			G_PARAM_STATIC_STRINGS));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_FILTER_JUNK_INBOX,
+		g_param_spec_boolean (
+			"filter-junk-inbox",
+			"Filter Junk Inbox",
+			"Whether to filter junk from Inbox only",
+			FALSE,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT |
+			G_PARAM_STATIC_STRINGS));
+
+	g_object_class_install_property (
+		object_class,
 		PROP_ACCOUNT_UID,
 		g_param_spec_string (
 			"account-uid",
@@ -300,3 +354,41 @@ camel_eas_settings_set_check_all (CamelEasSettings *settings,
 
 	g_object_notify (G_OBJECT (settings), "check-all");
 }
+
+gboolean
+camel_eas_settings_get_filter_junk (CamelEasSettings *settings)
+{
+	g_return_val_if_fail (CAMEL_IS_EAS_SETTINGS (settings), FALSE);
+
+	return settings->priv->filter_junk;
+}
+
+void
+camel_eas_settings_set_filter_junk (CamelEasSettings *settings,
+                                    gboolean filter_junk)
+{
+	g_return_if_fail (CAMEL_IS_EAS_SETTINGS (settings));
+
+	settings->priv->filter_junk = filter_junk;
+
+	g_object_notify (G_OBJECT (settings), "filter-junk");
+}
+
+gboolean
+camel_eas_settings_get_filter_junk_inbox (CamelEasSettings *settings)
+{
+	g_return_val_if_fail (CAMEL_IS_EAS_SETTINGS (settings), FALSE);
+
+	return settings->priv->filter_junk_inbox;
+}
+
+void
+camel_eas_settings_set_filter_junk_inbox (CamelEasSettings *settings,
+                                          gboolean filter_junk_inbox)
+{
+	g_return_if_fail (CAMEL_IS_EAS_SETTINGS (settings));
+
+	settings->priv->filter_junk_inbox = filter_junk_inbox;
+
+	g_object_notify (G_OBJECT (settings), "filter-junk-inbox");
+}
diff --git a/libevoeas/camel-eas-settings.h b/libevoeas/camel-eas-settings.h
index 46f01b5..26ecf26 100644
--- a/libevoeas/camel-eas-settings.h
+++ b/libevoeas/camel-eas-settings.h
@@ -59,6 +59,12 @@ GType		camel_eas_settings_get_type			(void) G_GNUC_CONST;
 gboolean	camel_eas_settings_get_check_all		(CamelEasSettings *settings);
 void		camel_eas_settings_set_check_all		(CamelEasSettings *settings,
 								 gboolean check_all);
+gboolean	camel_eas_settings_get_filter_junk		(CamelEasSettings *settings);
+void		camel_eas_settings_set_filter_junk		(CamelEasSettings *settings,
+								 gboolean filter_junk);
+gboolean	camel_eas_settings_get_filter_junk_inbox	(CamelEasSettings *settings);
+void		camel_eas_settings_set_filter_junk_inbox	(CamelEasSettings *settings,
+								 gboolean filter_junk_inbox);
 const gchar *	camel_eas_settings_get_account_uid		(CamelEasSettings *settings);
 void		camel_eas_settings_set_account_uid		(CamelEasSettings *settings,
 								 const gchar *uid);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]