diff options
author | Peter Williams <peterw@ximian.com> | 2001-07-20 05:35:43 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-07-20 05:35:43 +0800 |
commit | 85a02926e6c5b8c73dbb44fe343da80247babaf8 (patch) | |
tree | 71e8bdcc136081da9ec4f11eacef0027dddff07e /camel/camel-store.c | |
parent | 3f9e744cab8fc9a34590974da264018ec091bbb1 (diff) | |
download | gsoc2013-evolution-85a02926e6c5b8c73dbb44fe343da80247babaf8.tar.gz gsoc2013-evolution-85a02926e6c5b8c73dbb44fe343da80247babaf8.tar.zst gsoc2013-evolution-85a02926e6c5b8c73dbb44fe343da80247babaf8.zip |
In camel:
2001-07-19 Peter Williams <peterw@ximian.com>
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 <peterw@ximian.com>
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
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r-- | camel/camel-store.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c index 23c4b82e9d..dbf0fce2e7 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -651,6 +651,9 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, if (pfi) { g_free (pname); } else { + CamelURL *url; + char *sep; + pfi = g_new0 (CamelFolderInfo, 1); pfi->full_name = pname; if (short_names) { @@ -661,6 +664,17 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, pfi->name = g_strdup (pname); } else pfi->name = g_strdup (pname); + + url = camel_url_new (fi->url, NULL); + sep = strrchr (url->path, separator); + if (sep) + *sep = '\0'; + else + g_warning ("huh, no \"%c\" in \"%s\"?", separator, fi->url); + camel_url_set_param (url, "noselect", "yes"); + pfi->url = camel_url_to_string (url, 0); + camel_url_free (url); + g_hash_table_insert (hash, pname, pfi); g_ptr_array_add (folders, pfi); } |