[evolution-data-server] Add the preference options
- From: Chenthill Palanisamy <pchen src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Add the preference options
- Date: Sun, 7 Feb 2010 19:04:29 +0000 (UTC)
commit 0fffe1e47fa200589c85886eb6942cc7fad31a83
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Mon Feb 8 00:24:43 2010 +0530
Add the preference options
camel/providers/imapx/camel-imapx-provider.c | 49 +++++++++++++++++++++----
camel/providers/imapx/camel-imapx-store.c | 28 +++++++++++++++
2 files changed, 69 insertions(+), 8 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-provider.c b/camel/providers/imapx/camel-imapx-provider.c
index b9e3e72..aa5dbbc 100644
--- a/camel/providers/imapx/camel-imapx-provider.c
+++ b/camel/providers/imapx/camel-imapx-provider.c
@@ -36,8 +36,44 @@
#include "camel-imapx-store.h"
CamelProviderConfEntry imapx_conf_entries[] = {
- { CAMEL_PROVIDER_CONF_SECTION_START, "storage", NULL,
- N_("Message storage") },
+ { CAMEL_PROVIDER_CONF_SECTION_START, "mailcheck", NULL,
+ N_("Checking for New Mail") },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "use_idle", NULL,
+ N_("Use Idle if the server supports it"), "1" },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "check_all", NULL,
+ N_("C_heck for new messages in all folders"), "1" },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "check_lsub", NULL,
+ N_("Ch_eck for new messages in subscribed folders"), "0" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
+#ifndef G_OS_WIN32
+ { CAMEL_PROVIDER_CONF_SECTION_START, "cmdsection", NULL,
+ N_("Connection to Server") },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "use_command", NULL,
+ N_("_Use custom command to connect to server"), "0" },
+ { CAMEL_PROVIDER_CONF_ENTRY, "command", "use_command",
+ N_("Command:"), "ssh -C -l %u %h exec /usr/sbin/imapd" },
+ { CAMEL_PROVIDER_CONF_CHECKSPIN, "cached_conn", NULL,
+ N_("Number of _cached connections to use"), "y:1:5:7" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
+#endif
+ { CAMEL_PROVIDER_CONF_SECTION_START, "folders", NULL,
+ N_("Folders") },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "use_lsub", NULL,
+ N_("_Show only subscribed folders"), "1" },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "override_namespace", NULL,
+ N_("O_verride server-supplied folder namespace"), "0" },
+ { CAMEL_PROVIDER_CONF_ENTRY, "namespace", "override_namespace",
+ N_("Namespace:") },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
+ { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
+ N_("_Apply filters to new messages in INBOX on this server"), "0" },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk", NULL,
+ N_("Check new messages for Jun_k contents"), "0" },
+ { 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,
+ N_("Automatically synchroni_ze remote mail locally"), "0" },
{ CAMEL_PROVIDER_CONF_SECTION_END },
{ CAMEL_PROVIDER_CONF_END }
};
@@ -47,9 +83,7 @@ static CamelProvider imapx_provider = {
N_("IMAP+"),
- N_("Experimental IMAP 4(.1) client\n"
- "This is untested and unsupported code, you want to use plain imap instead.\n\n"
- " !!! DO NOT USE THIS FOR PRODUCTION EMAIL !!!\n"),
+ N_("For reading and storing mail on IMAP servers."),
"mail",
CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE |
@@ -83,11 +117,10 @@ camel_imapx_module_init(void)
imapx_provider.object_types[CAMEL_PROVIDER_STORE] = camel_imapx_store_get_type();
imapx_provider.url_hash = camel_url_hash;
imapx_provider.url_equal = camel_url_equal;
-
- imapx_provider.authtypes = g_list_prepend(imapx_provider.authtypes, camel_sasl_authtype_list(FALSE));
+ imapx_provider.authtypes = camel_sasl_authtype_list(FALSE);
imapx_provider.authtypes = g_list_prepend(imapx_provider.authtypes, &camel_imapx_password_authtype);
+ imapx_provider.translation_domain = GETTEXT_PACKAGE;
- /* blah ... could just use it in object setup? */
/* TEMPORARY */
camel_exception_setup();
imapx_utils_init();
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 9267351..9211260 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -909,6 +909,33 @@ imap_create_folder(CamelStore *store, const gchar *parent_name, const gchar *fol
return NULL;
}
+static gboolean
+imap_can_refresh_folder (CamelStore *store, CamelFolderInfo *info, CamelException *ex)
+{
+ gboolean res;
+
+ res = CAMEL_STORE_CLASS(parent_class)->can_refresh_folder (store, info, ex) ||
+ (camel_url_get_param (((CamelService *)store)->url, "check_all") != NULL) ||
+ (camel_url_get_param (((CamelService *)store)->url, "check_lsub") != NULL && (info->flags & CAMEL_FOLDER_SUBSCRIBED) != 0);
+
+ if (!res && !camel_exception_is_set (ex) && CAMEL_IS_IMAP_STORE (store)) {
+ CamelStoreInfo *si;
+ CamelStoreSummary *sm = CAMEL_STORE_SUMMARY (((CamelIMAPXStore *)(store))->summary);
+
+ if (!sm)
+ return FALSE;
+
+ si = camel_store_summary_path (sm, info->full_name);
+ if (si) {
+ res = (si->flags & CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW) != 0 ? TRUE : FALSE;
+
+ camel_store_summary_info_free (sm, si);
+ }
+ }
+
+ return res;
+}
+
/* ********************************************************************** */
#if 0
static gint store_resp_fetch(CamelIMAPXEngine *ie, guint32 id, gpointer data)
@@ -1156,6 +1183,7 @@ camel_imapx_store_class_init(CamelIMAPXStoreClass *klass)
camel_store_class->hash_folder_name = imapx_hash_folder_name;
camel_store_class->compare_folder_name = imapx_compare_folder_name;
+ camel_store_class->can_refresh_folder = imap_can_refresh_folder;
camel_store_class->create_folder = imap_create_folder;
camel_store_class->rename_folder = imap_rename_folder;
camel_store_class->delete_folder = imap_delete_folder;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]