diff options
author | Not Zed <NotZed@Ximian.com> | 2005-07-27 15:40:15 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-07-27 15:40:15 +0800 |
commit | db6ae661a64927149995ba259484c5f5ad4902f5 (patch) | |
tree | ab83ce5d1227c738f85ad7153d78ead39c77f438 /mail | |
parent | c8c39cc81ce676f2dbd60294f187ed65f3de76aa (diff) | |
download | gsoc2013-evolution-db6ae661a64927149995ba259484c5f5ad4902f5.tar gsoc2013-evolution-db6ae661a64927149995ba259484c5f5ad4902f5.tar.gz gsoc2013-evolution-db6ae661a64927149995ba259484c5f5ad4902f5.tar.bz2 gsoc2013-evolution-db6ae661a64927149995ba259484c5f5ad4902f5.tar.lz gsoc2013-evolution-db6ae661a64927149995ba259484c5f5ad4902f5.tar.xz gsoc2013-evolution-db6ae661a64927149995ba259484c5f5ad4902f5.tar.zst gsoc2013-evolution-db6ae661a64927149995ba259484c5f5ad4902f5.zip |
hack to make it honour the 'refresh only inbox' imap/groupwise setting.
2005-07-27 Not Zed <NotZed@Ximian.com>
* mail-send-recv.c (get_folders): hack to make it honour the
'refresh only inbox' imap/groupwise setting.
svn path=/trunk/; revision=29896
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 324a310eb9..50753a0712 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2005-07-27 Not Zed <NotZed@Ximian.com> + + * mail-send-recv.c (get_folders): hack to make it honour the + 'refresh only inbox' imap/groupwise setting. + 2005-07-26 Harish Krishnaswamy <kharish@novell.com> * Makefile.am: fix make distcheck issues. diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 708826226d..9a7bbc8da0 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -745,11 +745,18 @@ static struct _mail_msg_op refresh_folders_op = { }; static void -get_folders(GPtrArray *folders, CamelFolderInfo *info) +get_folders(CamelStore *store, GPtrArray *folders, CamelFolderInfo *info) { while (info) { - g_ptr_array_add(folders, g_strdup(info->uri)); - get_folders(folders, info->child); + /* 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) + || (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); info = info->next; } } @@ -762,7 +769,7 @@ receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, void *da struct _refresh_folders_msg *m; struct _send_info *sinfo = data; - get_folders(folders, info); + get_folders(store, folders, info); m = mail_msg_new(&refresh_folders_op, NULL, sizeof(*m)); m->store = store; |