From 85a02926e6c5b8c73dbb44fe343da80247babaf8 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Thu, 19 Jul 2001 21:35:43 +0000 Subject: In camel: 2001-07-19 Peter Williams Policy change: NULL url's are no longer allowed in CamelFolderInfos. They used to signify that the folder was, in IMAP jargon, NoSelect; now the same effect is achieved by adding a "noselect=yes" parameter to the end of the URL. As far as I know, IMAP is the only affected provider. * providers/imap/camel-imap-store.c (delete_folder): New function. Implement folder deletion. (camel_imap_store_class_init): Set the delete_folder class function here. (get_folder_status): New function. Utility wrapper around the STATUS command. (create_folder): If the parent folder is NoSelect but is empty, delete it and recreate it as a a subfolder-containing folder. If it is NoSelect but contains messages, set an exception. (parse_list_response_as_folder_info): Always set the FolderInfo's URL, but add a NoSelect parameter if it isn't selectable. (get_folder_info_online): Change logic of removing the namespace to reflect URL change. Same for logic of checking unread counts. (get_folder_info_online): Use get_folder_status to simplify this. * camel-store.c (camel_folder_info_build): When creating dummy parents, copy the child's URL and set the NoSelect parameter. In mail: 2001-07-19 Peter Williams Track the NoSelect changes in Camel. * mail-callbacks.c (create_folders): We don't need to check if the URL is NULL or not anymore. * component-factory.c (create_noselect_control): New function. Create a dummy control for folders that can't contain messages (ie \NoSelect) (create_view): If the URI says the folder is noselect, make a dummy control. FIXME: still should merge in the global UI elements. (xfer_folder): Don't allow the operation if the destination is NoSelect. (destination_folder_handle_motion): Ditto. (destination_folder_handle_drop): Ditto. svn path=/trunk/; revision=11237 --- mail/mail-callbacks.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index b20ee1baf0..067866fed5 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -2016,15 +2016,13 @@ static void create_folders (EvolutionStorage *storage, const char *prefix, CamelFolderInfo *fi) { char *path; - - if (fi->url) { - mail_folder_cache_set_update_estorage (fi->url, storage); - mail_folder_cache_note_folderinfo (fi->url, fi); - } + + mail_folder_cache_set_update_estorage (fi->url, storage); + mail_folder_cache_note_folderinfo (fi->url, fi); path = g_strdup_printf ("%s/%s", prefix, fi->name); evolution_storage_new_folder (storage, path, fi->name, - "mail", fi->url ? fi->url : "", + "mail", fi->url, fi->name, /* description */ fi->unread_message_count > 0); -- cgit v1.2.3