diff options
author | Not Zed <NotZed@Ximian.com> | 2004-11-12 13:53:12 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-11-12 13:53:12 +0800 |
commit | 8e212824134c1740d05fb36799f78716c5059801 (patch) | |
tree | 47fc692dba176af4fa0ccfa45d31739886162c12 /camel/providers/imap4/camel-imap4-store.c | |
parent | 55bead18b69fd4e7ad2b09700867add2ca7e9838 (diff) | |
download | gsoc2013-evolution-8e212824134c1740d05fb36799f78716c5059801.tar gsoc2013-evolution-8e212824134c1740d05fb36799f78716c5059801.tar.gz gsoc2013-evolution-8e212824134c1740d05fb36799f78716c5059801.tar.bz2 gsoc2013-evolution-8e212824134c1740d05fb36799f78716c5059801.tar.lz gsoc2013-evolution-8e212824134c1740d05fb36799f78716c5059801.tar.xz gsoc2013-evolution-8e212824134c1740d05fb36799f78716c5059801.tar.zst gsoc2013-evolution-8e212824134c1740d05fb36799f78716c5059801.zip |
** Merge in notzed-messageinfo-branch, fix some minor conflicts.
2004-11-12 Not Zed <NotZed@Ximian.com>
** Merge in notzed-messageinfo-branch, fix some minor conflicts.
svn path=/trunk/; revision=27898
Diffstat (limited to 'camel/providers/imap4/camel-imap4-store.c')
-rw-r--r-- | camel/providers/imap4/camel-imap4-store.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/camel/providers/imap4/camel-imap4-store.c b/camel/providers/imap4/camel-imap4-store.c index 4d2395b049..c8832b54a6 100644 --- a/camel/providers/imap4/camel-imap4-store.c +++ b/camel/providers/imap4/camel-imap4-store.c @@ -1112,28 +1112,12 @@ imap4_build_folder_info (CamelStore *store, const char *top, guint32 flags, GPtr fi->flags = list->flags; fi->unread = -1; fi->total = -1; - - if (!(flags & CAMEL_STORE_FOLDER_INFO_FAST)) { - if (folder && !strcmp (folder->full_name, fi->full_name)) { - /* can't STATUS this folder since it is SELECTED, besides - it would be wasteful */ - CamelMessageInfo *info; - int index; - - fi->total = camel_folder_summary_count (folder->summary); - - fi->unread = 0; - for (index = 0; index < fi->total; index++) { - if (!(info = camel_folder_summary_index (folder->summary, index))) - continue; - - if ((info->flags & CAMEL_MESSAGE_SEEN) == 0) - fi->unread++; - - camel_folder_summary_info_free (folder->summary, info); - } - } else { - imap4_status (store, fi); - } + + /* SELECTED folder, just get it from the folder */ + if (folder && !strcmp (folder->full_name, fi->full_name)) { + camel_object_get(folder, NULL, CAMEL_FOLDER_TOTAL, &fi->total, CAMEL_FOLDER_UNREAD, &fi->unread, 0); + } else if (!(flags & CAMEL_STORE_FOLDER_INFO_FAST)) { + imap4_status (store, fi); } g_free (list->name); |