diff options
author | 0 <NotZed@Ximian.com> | 2001-09-21 08:56:49 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-21 08:56:49 +0800 |
commit | a68b5681353d9999b208cdbada9b40586eb09c18 (patch) | |
tree | 71cc4eae2909937c92ce902c2c1571e95eb58565 /mail/mail-ops.c | |
parent | 5de6e2a14b9d3e4fc3260cfa195921d020249a22 (diff) | |
download | gsoc2013-evolution-a68b5681353d9999b208cdbada9b40586eb09c18.tar.gz gsoc2013-evolution-a68b5681353d9999b208cdbada9b40586eb09c18.tar.zst gsoc2013-evolution-a68b5681353d9999b208cdbada9b40586eb09c18.zip |
Update the status bar here, assuming we've just been activated.
2001-09-20 <NotZed@Ximian.com>
* folder-browser.c (folder_browser_set_shell_view): Update the
status bar here, assuming we've just been activated.
* mail-ops.c (add_vtrash_info): Scan whole list, rather than
missing the last one. Also dont assume its always the last,
otherwise we could lose following folders.
* mail-vfolder.c
(all): d(x) out debug printfs
* mail-folder-cache.c
(update_1folder): If its a vtrash folder, or the outbox_folder,
and we have a folder, then make the 'count' the total message
count, not unread messages count.
svn path=/trunk/; revision=13036
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index a9f300baad..7b01917c98 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1064,15 +1064,17 @@ get_folderinfo_desc (struct _mail_msg *mm, int done) static void add_vtrash_info (CamelStore *store, CamelFolderInfo *info) { - CamelFolderInfo *fi, *vtrash; + CamelFolderInfo *fi, *vtrash, *parent; char *uri, *path; CamelURL *url; g_return_if_fail (info != NULL); - - for (fi = info; fi->sibling; fi = fi->sibling) { + + parent = NULL; + for (fi = info; fi; fi = fi->sibling) { if (!strcmp (fi->name, CAMEL_VTRASH_NAME)) break; + parent = fi; } /* create our vTrash URL */ @@ -1083,7 +1085,7 @@ add_vtrash_info (CamelStore *store, CamelFolderInfo *info) uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL); camel_url_free (url); - if (fi->sibling) { + if (fi) { /* We're going to replace the physical Trash folder with our vTrash folder */ vtrash = fi; g_free (vtrash->full_name); @@ -1092,8 +1094,12 @@ add_vtrash_info (CamelStore *store, CamelFolderInfo *info) } else { /* There wasn't a Trash folder so create a new folder entry */ vtrash = g_new0 (CamelFolderInfo, 1); - vtrash->parent = fi; - fi->sibling = vtrash; + + g_assert(parent != NULL); + + /* link it into the right spot */ + vtrash->sibling = parent->sibling; + parent->sibling = vtrash; } /* Fill in the new fields */ @@ -1108,9 +1114,8 @@ add_vtrash_info (CamelStore *store, CamelFolderInfo *info) static void add_unmatched_info(CamelFolderInfo *fi) { - for (; fi->sibling; fi = fi->sibling) { + for (; fi; fi = fi->sibling) { if (!strcmp(fi->full_name, CAMEL_UNMATCHED_NAME)) { - printf("renaming unmatched!\n"); g_free(fi->name); fi->name = g_strdup(U_("Unmatched")); g_free(fi->path); |