diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-11-02 02:54:46 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-11-02 02:54:46 +0800 |
commit | 609e3620b733b5a4341d934e4825cab5d5d535bc (patch) | |
tree | 6ba6f37a2d142913849c936f33234da88db0ee56 /camel/providers/imap4/camel-imap4-store-summary.c | |
parent | 69d4437179684dad21812702ead2b1e39d266cb4 (diff) | |
download | gsoc2013-evolution-609e3620b733b5a4341d934e4825cab5d5d535bc.tar.gz gsoc2013-evolution-609e3620b733b5a4341d934e4825cab5d5d535bc.tar.zst gsoc2013-evolution-609e3620b733b5a4341d934e4825cab5d5d535bc.zip |
Cache the folder-info on the summary if successful. (imap4_delete_folder):
2004-11-01 Jeffrey Stedfast <fejj@novell.com>
* providers/imap4/camel-imap4-store.c (imap4_create_folder): Cache
the folder-info on the summary if successful.
(imap4_delete_folder): Un-cache the folder-info from the summary.
* providers/imap4/camel-imap4-store-summary.c (load_namespaces):
Cleaned up a bit.
(save_namespaces): Same.
(camel_imap4_store_summary_unnote_info): New function.
(camel_imap4_store_summary_get_folder_info): Fixed the logic a
bit.
svn path=/trunk/; revision=27782
Diffstat (limited to 'camel/providers/imap4/camel-imap4-store-summary.c')
-rw-r--r-- | camel/providers/imap4/camel-imap4-store-summary.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/camel/providers/imap4/camel-imap4-store-summary.c b/camel/providers/imap4/camel-imap4-store-summary.c index ac4e4ad419..7c08469acf 100644 --- a/camel/providers/imap4/camel-imap4-store-summary.c +++ b/camel/providers/imap4/camel-imap4-store-summary.c @@ -334,6 +334,17 @@ camel_imap4_store_summary_note_info (CamelIMAP4StoreSummary *s, CamelFolderInfo si->total = fi->total; camel_store_summary_add (ss, si); + + /* FIXME: should this be recursive? */ +} + + +void +camel_imap4_store_summary_unnote_info (CamelIMAP4StoreSummary *s, CamelFolderInfo *fi) +{ + CamelStoreSummary *ss = (CamelStoreSummary *) s; + + camel_store_summary_remove_path (ss, fi->full_name); } @@ -363,9 +374,6 @@ camel_imap4_store_summary_get_folder_info (CamelIMAP4StoreSummary *s, const char size_t toplen, len; int i; - if (top == NULL) - top = ""; - toplen = strlen (top); folders = g_ptr_array_new (); @@ -374,7 +382,7 @@ camel_imap4_store_summary_get_folder_info (CamelIMAP4StoreSummary *s, const char if (strncmp (si->path, top, toplen) != 0) continue; - if ((len = strlen (si->path)) > toplen && si->path[toplen] != '/') + if (toplen > 0 && (len = strlen (si->path)) > toplen && si->path[toplen] != '/') continue; if (len == toplen) { |