aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-send-recv.c23
2 files changed, 18 insertions, 13 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 877289e238..514285c279 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2007-12-11 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #336074
+
+ * mail-send-recv.c: (get_folders):
+ Determine whether refresh folder from the store based on result of new
+ store's function 'camel_store_can_refresh_folder'.
+
2007-12-10 Jeff Cai <jeff.cai@sun.com>
* em-folder-view.c: (emfv_setting_notify):
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 6ffc823761..ccb0ece35b 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -842,21 +842,18 @@ static struct _mail_msg_op refresh_folders_op = {
};
static void
-get_folders(CamelStore *store, GPtrArray *folders, CamelFolderInfo *info)
+get_folders (CamelStore *store, GPtrArray *folders, CamelFolderInfo *info)
{
+ CamelException ex;
+
+ camel_exception_init (&ex);
+
while (info) {
- /* FIXME: this is hardcoded temporarily, until the backend itself
- controls this refresh process.
- TODO: add virtual camel_store_refresh_info() which does this ... */
- if (camel_url_get_param(((CamelService *)store)->url, "check_all") != NULL
- || (strcmp(((CamelService *)store)->url->protocol, "imap") != 0
- && strcmp(((CamelService *)store)->url->protocol, "groupwise") != 0
- && strcmp(((CamelService *)store)->url->protocol, "scalix") != 0
- && strcmp(((CamelService *)store)->url->protocol, "exchange") != 0 )
-
- || (info->flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX)
- g_ptr_array_add(folders, g_strdup(info->uri));
- get_folders(store, folders, info->child);
+ if (camel_store_can_refresh_folder (store, info, &ex))
+ g_ptr_array_add (folders, g_strdup (info->uri));
+ camel_exception_clear (&ex);
+
+ get_folders (store, folders, info->child);
info = info->next;
}
}