diff options
author | Not Zed <NotZed@Ximian.com> | 2004-03-11 11:04:45 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-03-11 11:04:45 +0800 |
commit | 6071a963e85f69133cc1761e37b6ed942629d70d (patch) | |
tree | 95c9e1644c80d083e2baf049e66b9f99c5997051 /camel/providers/local/camel-mbox-store.c | |
parent | ecda7da11e893ff29258388c7b594b5ef4fa902a (diff) | |
download | gsoc2013-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/providers/local/camel-mbox-store.c')
-rw-r--r-- | camel/providers/local/camel-mbox-store.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c index 94b2e6fbeb..595445f99c 100644 --- a/camel/providers/local/camel-mbox-store.c +++ b/camel/providers/local/camel-mbox-store.c @@ -330,8 +330,8 @@ delete_folder(CamelStore *store, const char *folder_name, CamelException *ex) fi = g_new0(CamelFolderInfo, 1); fi->full_name = g_strdup(folder_name); fi->name = g_path_get_basename(folder_name); - fi->url = g_strdup_printf("mbox:%s#%s",((CamelService *) store)->url->path, folder_name); - fi->unread_message_count = -1; + fi->uri = g_strdup_printf("mbox:%s#%s",((CamelService *) store)->url->path, folder_name); + fi->unread = -1; camel_folder_info_build_path(fi, '/'); camel_object_trigger_event(store, "folder_deleted", fi); @@ -600,13 +600,15 @@ static void fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags) { CamelFolder *folder; - int unread = -1; + fi->unread = -1; + fi->total = -1; folder = camel_object_bag_get(store->folders, fi->full_name); if (folder) { if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0) camel_folder_refresh_info(folder, NULL); - unread = camel_folder_get_unread_message_count(folder); + fi->unread = camel_folder_get_unread_message_count(folder); + fi->total = camel_folder_get_message_count(folder); camel_object_unref(folder); } else { char *path, *folderpath; @@ -619,15 +621,15 @@ fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags) folderpath = camel_mbox_folder_get_full_path(root, fi->full_name); mbs = (CamelMboxSummary *)camel_mbox_summary_new(path, folderpath, NULL); - if (camel_folder_summary_header_load((CamelFolderSummary *)mbs) != -1) - unread = ((CamelFolderSummary *)mbs)->unread_count; + if (camel_folder_summary_header_load((CamelFolderSummary *)mbs) != -1) { + fi->unread = ((CamelFolderSummary *)mbs)->unread_count; + fi->total = ((CamelFolderSummary *)mbs)->saved_count; + } camel_object_unref(mbs); g_free(folderpath); g_free(path); } - - fi->unread_message_count = unread; } static CamelFolderInfo * @@ -692,7 +694,7 @@ scan_dir(CamelStore *store, GHashTable *visited, CamelFolderInfo *parent, const fi->flags =(fi->flags & ~CAMEL_FOLDER_NOCHILDREN) | CAMEL_FOLDER_CHILDREN; } else { fi->flags &= ~CAMEL_FOLDER_NOSELECT; - if ((ext = strchr(fi->url, ';')) && !strncmp(ext, ";noselect=yes", 13)) + if ((ext = strchr(fi->uri, ';')) && !strncmp(ext, ";noselect=yes", 13)) memmove(ext, ext + 13, strlen(ext + 13) + 1); } } else { @@ -700,13 +702,14 @@ scan_dir(CamelStore *store, GHashTable *visited, CamelFolderInfo *parent, const fi->parent = parent; /* add ";noselect=yes" if we haven't found the mbox file yet. when we find it, remove the noselect */ - fi->url = g_strdup_printf("mbox:%s%s#%s",((CamelService *) store)->url->path, + fi->uri = g_strdup_printf("mbox:%s%s#%s",((CamelService *) store)->url->path, S_ISDIR(st.st_mode) ? ";noselect=yes" : "", full_name); fi->name = short_name; fi->full_name = full_name; fi->path = g_strdup_printf("/%s", full_name); - fi->unread_message_count = -1; - + fi->unread = -1; + fi->total = -1; + if (S_ISDIR(st.st_mode)) fi->flags = CAMEL_FOLDER_NOSELECT; else @@ -715,7 +718,7 @@ scan_dir(CamelStore *store, GHashTable *visited, CamelFolderInfo *parent, const if (tail == NULL) folders = fi; else - tail->sibling = fi; + tail->next = fi; tail = fi; @@ -802,10 +805,11 @@ get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelExceptio fi = g_new0(CamelFolderInfo, 1); fi->parent = NULL; - fi->url = g_strdup_printf("mbox:%s#%s",((CamelService *) store)->url->path, top); + fi->uri = g_strdup_printf("mbox:%s#%s",((CamelService *) store)->url->path, top); fi->name = g_strdup(base); fi->full_name = g_strdup(top); - fi->unread_message_count = -1; + fi->unread = -1; + fi->total = -1; fi->path = g_strdup_printf("/%s", top); subdir = g_strdup_printf("%s.sbd", path); |