diff options
author | Not Zed <NotZed@Ximian.com> | 2004-03-11 11:05:43 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-03-11 11:05:43 +0800 |
commit | 88b02e9cf481aee0762f7e7bc0b32032cdfeb899 (patch) | |
tree | a82a03e69dad3f99caa12309c482a69333f6cb51 /mail/mail-folder-cache.c | |
parent | 6071a963e85f69133cc1761e37b6ed942629d70d (diff) | |
download | gsoc2013-evolution-88b02e9cf481aee0762f7e7bc0b32032cdfeb899.tar.gz gsoc2013-evolution-88b02e9cf481aee0762f7e7bc0b32032cdfeb899.tar.zst gsoc2013-evolution-88b02e9cf481aee0762f7e7bc0b32032cdfeb899.zip |
pass the raw header in instead of name and value. (efh_format_headers): if
2004-03-11 Not Zed <NotZed@Ximian.com>
* em-format-html.c (efh_format_header): pass the raw header in
instead of name and value.
(efh_format_headers): if we have specific headers to show, iterate
over all headers and print out all matching ones, so duplicate
headers are properly displayed. Related to #55298.
* em-folder-selector.c (em_folder_selector_construct): dont set
this to be modal. otherwise you can't click on error popups. duh.
2004-03-08 Not Zed <NotZed@Ximian.com>
* em-folder-selection-button.c
(em_folder_selection_button_clicked): don't let the user select
virtual/vtrash folders or non-selectable folders.
* mail-component.c (impl_createControls): disable selection of
non-select rows.
* em-folder-selector.c (em_folder_selector_create_new): exclude
folders with noinferiors set.
* em-folder-tree.c (folder_tree_new): add folder tree arg, hook
onto the selection funciton for the tree selection.
(emft_select_func): selection override function. allow certain
things to be excluded.
(em_folder_tree_set_excluded): api to set what is excluded from
the selectability.
(emft_tree_row_activated): call emft_select_func check to see if
this row is excluded before emitting an activated signal.
* em-folder-tree-model.c (em_folder_tree_model_set_folder_info):
save folder info->flags in the tree store.
* mail-folder-cache.c (create_folders): use tail recursion.
(get_folders): tail recurse.
* (*): Fixed for api changes in camel.
svn path=/trunk/; revision=25020
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index edd6dc1dc3..a17fecc99e 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -343,12 +343,12 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info) } else { d(printf(" unread count\n")); if (info) - unread = info->unread_message_count; + unread = info->unread; else unread = camel_folder_get_unread_message_count (folder); } } else if (info) - unread = info->unread_message_count; + unread = info->unread; d(printf("folder updated: unread %d: '%s'\n", unread, mfi->full_name)); @@ -380,7 +380,7 @@ setup_folder(CamelFolderInfo *fi, struct _store_info *si) mfi = g_malloc0(sizeof(*mfi)); mfi->path = g_strdup(fi->path); mfi->full_name = g_strdup(fi->full_name); - mfi->uri = g_strdup(fi->url); + mfi->uri = g_strdup(fi->uri); mfi->store_info = si; mfi->flags = fi->flags; @@ -390,8 +390,8 @@ setup_folder(CamelFolderInfo *fi, struct _store_info *si) up = g_malloc0(sizeof(*up)); up->path = g_strdup(mfi->path); up->name = g_strdup(fi->name); - up->uri = g_strdup(fi->url); - up->unread = (fi->unread_message_count==-1)?0:fi->unread_message_count; + up->uri = g_strdup(fi->uri); + up->unread = (fi->unread==-1)?0:fi->unread; up->store = si->store; camel_object_ref(up->store); @@ -408,12 +408,14 @@ create_folders(CamelFolderInfo *fi, struct _store_info *si) { d(printf("Setup new folder: %s\n %s\n", fi->url, fi->full_name)); - setup_folder(fi, si); + while (fi) { + setup_folder(fi, si); - if (fi->child) - create_folders(fi->child, si); - if (fi->sibling) - create_folders(fi->sibling, si); + if (fi->child) + create_folders(fi->child, si); + + fi = fi->next; + } } static void @@ -595,7 +597,7 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, g_free(mfi->full_name); mfi->path = g_strdup(fi->path); mfi->full_name = g_strdup(fi->full_name); - mfi->uri = g_strdup(fi->url); + mfi->uri = g_strdup(fi->uri); mfi->flags = fi->flags; g_hash_table_insert(si->folders, mfi->full_name, mfi); @@ -606,7 +608,7 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, mfi = g_malloc0(sizeof(*mfi)); mfi->path = g_strdup(fi->path); mfi->full_name = g_strdup(fi->full_name); - mfi->uri = g_strdup(fi->url); + mfi->uri = g_strdup(fi->uri); mfi->store_info = si; mfi->flags = fi->flags; @@ -619,7 +621,7 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, up->path = g_strdup(mfi->path); up->name = g_strdup(fi->name); up->uri = g_strdup(mfi->uri); - up->unread = fi->unread_message_count==-1?0:fi->unread_message_count; + up->unread = fi->unread==-1?0:fi->unread; up->store = si->store; camel_object_ref(up->store); @@ -639,12 +641,14 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, static void get_folders(CamelFolderInfo *fi, GPtrArray *folders) { - g_ptr_array_add(folders, fi); + while (fi) { + g_ptr_array_add(folders, fi); - if (fi->child) - get_folders(fi->child, folders); - if (fi->sibling) - get_folders(fi->sibling, folders); + if (fi->child) + get_folders(fi->child, folders); + + fi = fi->next; + } } static int |