diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-07-25 11:45:55 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-07-25 11:45:55 +0800 |
commit | 6a601c210be648e1cb61da744a715656027aa175 (patch) | |
tree | ac100996d459b6d9ccdc496b114af5caa7c04f07 /camel/providers/imap/camel-imap-folder.c | |
parent | f2aca892ee6085ce48240a1ebd2897a56d1e8989 (diff) | |
download | gsoc2013-evolution-6a601c210be648e1cb61da744a715656027aa175.tar gsoc2013-evolution-6a601c210be648e1cb61da744a715656027aa175.tar.gz gsoc2013-evolution-6a601c210be648e1cb61da744a715656027aa175.tar.bz2 gsoc2013-evolution-6a601c210be648e1cb61da744a715656027aa175.tar.lz gsoc2013-evolution-6a601c210be648e1cb61da744a715656027aa175.tar.xz gsoc2013-evolution-6a601c210be648e1cb61da744a715656027aa175.tar.zst gsoc2013-evolution-6a601c210be648e1cb61da744a715656027aa175.zip |
Updated to give special attention to the root folder.
2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder): Updated to give special
attention to the root folder.
* providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal):
Updated to handle the root folder
(imap_get_message_count_internal): return 0 if folder can't hold messages
(camel_imap_folder_new): Change so that root folder gets special attention
and always gets can_hold_messages set to FALSE
svn path=/trunk/; revision=4308
Diffstat (limited to 'camel/providers/imap/camel-imap-folder.c')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index a8e4a7d602..6651e77d61 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -180,12 +180,16 @@ CamelFolder * camel_imap_folder_new (CamelStore *parent, char *folder_name, CamelException *ex) { CamelFolder *folder = CAMEL_FOLDER (gtk_object_new (camel_imap_folder_get_type (), NULL)); + CamelURL *url = CAMEL_SERVICE (parent)->url; char *dir_sep; dir_sep = CAMEL_IMAP_STORE (parent)->dir_sep; CF_CLASS (folder)->init (folder, parent, NULL, folder_name, dir_sep, FALSE, ex); - + + if (!strcmp (folder_name, url->path + 1)) + folder->can_hold_messages = FALSE; + imap_get_subfolder_names_internal (folder, ex); imap_get_summary_internal (folder, ex); @@ -369,6 +373,7 @@ imap_get_message_count_internal (CamelFolder *folder, CamelException *ex) gint status, count = 0; g_return_val_if_fail (folder != NULL, 0); + g_return_val_if_fail (folder->can_hold_messages, 0); dir_sep = CAMEL_IMAP_STORE (folder->parent_store)->dir_sep; @@ -684,8 +689,10 @@ imap_get_subfolder_names_internal (CamelFolder *folder, CamelException *ex) dir_sep = CAMEL_IMAP_STORE (folder->parent_store)->dir_sep; if (url && url->path) { - if (!strcmp (folder->full_name, "INBOX")) + if (!strcmp (folder->full_name, url->path + 1)) namespace = g_strdup (url->path + 1); + else if (!strcmp (folder->full_name, "INBOX")) + namespace = g_strdup (url->path + 1); /* FIXME: erm...not sure */ else namespace = g_strdup_printf ("%s%s%s", url->path + 1, dir_sep, folder->full_name); } else { |