aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-vee-store.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-11 11:04:45 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-11 11:04:45 +0800
commit6071a963e85f69133cc1761e37b6ed942629d70d (patch)
tree95c9e1644c80d083e2baf049e66b9f99c5997051 /camel/camel-vee-store.c
parentecda7da11e893ff29258388c7b594b5ef4fa902a (diff)
downloadgsoc2013-evolution-6071a963e85f69133cc1761e37b6ed942629d70d.tar.gz
gsoc2013-evolution-6071a963e85f69133cc1761e37b6ed942629d70d.tar.zst
gsoc2013-evolution-6071a963e85f69133cc1761e37b6ed942629d70d.zip
turn off NOINFERIORS always, translate to nochildren.
2004-03-11 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_one_folder_offline): (parse_list_response_as_folder_info): turn off NOINFERIORS always, translate to nochildren. 2004-03-08 Not Zed <NotZed@Ximian.com> * camel-vee-store.c (vee_get_folder_info): setup virtual/system flags as appropriate. (change_folder): setup flags properly. * providers/nntp/camel-nntp-store.c (nntp_store_get_subscribed_folder_info): mark all folders as system folders. * providers/local/camel-mh-store.c (fill_fi): add this to setup folderinfo. (folder_info_new): call fill_fi to fill unread/total. (recursive_scan, folders_scan): ahh yeah, so wtf was i thinking, store->flags != get_folder_info flags!!!! * providers/local/camel-maildir-store.c (camel_folder_info_new): remove unread count arg & setup total. (fill_fi): setup total field. (scan_dir): remove the code that checked the directory directly - use fill_fi instead. It will more accurately reflect what you get when you visit the folder. (camel_folder_info_new): mark "." as a system folder. (scan_dir): try to setup children/no children flags properly. * providers/local/camel-mbox-store.c (fill_fi): setup total field. (scan_dir): init total. (get_folder_info): " 2004-03-05 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): mark INBOX as a system folder. Can't be renamed/deleted. (fill_fi): setup total field. (get_folder_counts): ditto. * camel-store.c (add_special_info): set the system folder flag. * camel-store.h: time to fix up the camelfolderinfo mess. fix some member names, and add some type fields. Fixed all uses. svn path=/trunk/; revision=25019
Diffstat (limited to 'camel/camel-vee-store.c')
-rw-r--r--camel/camel-vee-store.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
index d46c120fe7..3d06357132 100644
--- a/camel/camel-vee-store.c
+++ b/camel/camel-vee-store.c
@@ -142,10 +142,13 @@ change_folder(CamelStore *store, const char *name, guint32 flags, int count)
if (flags & CHANGE_NOSELECT)
camel_url_set_param(url, "noselect", "yes");
camel_url_set_fragment(url, name);
- fi->url = camel_url_to_string(url, 0);
+ fi->uri = camel_url_to_string(url, 0);
camel_url_free(url);
/*fi->url = g_strdup_printf("vfolder:%s%s#%s", ((CamelService *)store)->url->path, (flags&CHANGE_NOSELECT)?";noselect=yes":"", name);*/
- fi->unread_message_count = count;
+ fi->unread = count;
+ fi->flags = CAMEL_FOLDER_VIRTUAL;
+ if (flags & CHANGE_ADD)
+ fi->flags |= CAMEL_FOLDER_NOCHILDREN;
camel_folder_info_build_path(fi, '/');
camel_object_trigger_event(store, (flags&CHANGE_DELETE)?"folder_deleted":"folder_created", fi);
camel_folder_info_free(fi);
@@ -260,15 +263,15 @@ vee_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelExce
url = camel_url_new("vfolder:", NULL);
camel_url_set_path(url, ((CamelService *)((CamelFolder *)folder)->parent_store)->url->path);
camel_url_set_fragment(url, ((CamelFolder *)folder)->full_name);
- info->url = camel_url_to_string(url, 0);
+ info->uri = camel_url_to_string(url, 0);
camel_url_free(url);
/*
info->url = g_strdup_printf("vfolder:%s#%s", ((CamelService *)((CamelFolder *)folder)->parent_store)->url->path,
((CamelFolder *)folder)->full_name);*/
info->full_name = g_strdup(((CamelFolder *)folder)->full_name);
info->name = g_strdup(((CamelFolder *)folder)->name);
- info->unread_message_count = camel_folder_get_unread_message_count((CamelFolder *)folder);
- info->flags = CAMEL_FOLDER_NOCHILDREN;
+ info->unread = camel_folder_get_unread_message_count((CamelFolder *)folder);
+ info->flags = CAMEL_FOLDER_NOCHILDREN|CAMEL_FOLDER_VIRTUAL;
camel_folder_info_build_path(info, '/');
g_hash_table_insert(infos_hash, info->full_name, info);
@@ -301,9 +304,9 @@ vee_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelExce
}
if (info && tail) {
- while (tail->sibling)
- tail = tail->sibling;
- tail->sibling = info;
+ while (tail->next)
+ tail = tail->next;
+ tail->next = info;
info->parent = pinfo;
}
@@ -319,22 +322,22 @@ vee_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelExce
url = camel_url_new("vfolder:", NULL);
camel_url_set_path(url, ((CamelService *)store)->url->path);
camel_url_set_fragment(url, CAMEL_UNMATCHED_NAME);
- info->url = camel_url_to_string(url, 0);
+ info->uri = camel_url_to_string(url, 0);
camel_url_free(url);
/*info->url = g_strdup_printf("vfolder:%s#%s", ((CamelService *)store)->url->path, CAMEL_UNMATCHED_NAME);*/
info->full_name = g_strdup(CAMEL_UNMATCHED_NAME);
info->name = g_strdup(CAMEL_UNMATCHED_NAME);
- info->unread_message_count = -1;
- info->flags = CAMEL_FOLDER_NOCHILDREN|CAMEL_FOLDER_NOINFERIORS;
+ info->unread = -1;
+ info->flags = CAMEL_FOLDER_NOCHILDREN|CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_VIRTUAL;
camel_folder_info_build_path(info, '/');
if (res == NULL)
res = info;
else {
tail = res;
- while (tail->sibling)
- tail = tail->sibling;
- tail->sibling = info;
+ while (tail->next)
+ tail = tail->next;
+ tail->next = info;
}
}