diff options
author | 0 <NotZed@Ximian.com> | 2001-09-21 06:58:23 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-21 06:58:23 +0800 |
commit | a6aba35df1c77772c1417354a68a310f90944ced (patch) | |
tree | 861e43b059646000b3f087648ca2630438a39fcd /camel/camel-vee-store.c | |
parent | c503814d7ff5b5656cf1ac92c3f51a327859f76f (diff) | |
download | gsoc2013-evolution-a6aba35df1c77772c1417354a68a310f90944ced.tar.gz gsoc2013-evolution-a6aba35df1c77772c1417354a68a310f90944ced.tar.zst gsoc2013-evolution-a6aba35df1c77772c1417354a68a310f90944ced.zip |
Build the path on the folderinfo.
2001-09-20 <NotZed@Ximian.com>
* providers/local/camel-maildir-store.c (camel_folder_info_new):
Build the path on the folderinfo.
* providers/local/camel-spool-store.c (get_folder_info): If we
have this folder open, then set unread from the folder itself.
(get_folder_info): Change the INBOX path to not include the
leading /.
* providers/local/camel-spool-folder.c
(camel_spool_folder_construct): Fix path.
(camel_spool_folder_construct): Properly setup the url field when
we say we've got a new folder created.
* providers/imap/camel-imap-store.c (unsubscribe_folder): Build
path on folderinfo.
* camel-store.c (camel_folder_info_build_path): Prepend / to path.
* camel-vee-folder.c (camel_vee_folder_construct): Use macro for
unmatched folder name.
(camel_vee_folder_new): "
* camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
folder name.
(vee_delete_folder): "
(vee_rename_folder): "
(vee_get_folder): Prepend / onto path.
(vee_delete_folder): Setup path in folderinfo.
(vee_get_folder_info): Fix path in folderinfo.
* camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
unmatched (internal) name.
svn path=/trunk/; revision=13022
Diffstat (limited to 'camel/camel-vee-store.c')
-rw-r--r-- | camel/camel-vee-store.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c index 48465fc87a..dc3febc85d 100644 --- a/camel/camel-vee-store.c +++ b/camel/camel-vee-store.c @@ -135,7 +135,7 @@ vee_get_folder (CamelStore *store, const char *folder_name, guint32 flags, Camel fi->url = g_strdup_printf("vfolder:%s#%s", ((CamelService *)store)->url->path, ((CamelFolder *)vf)->full_name); fi->unread_message_count = camel_folder_get_message_count((CamelFolder *)vf); - fi->path = g_strdup (fi->full_name); + camel_folder_info_build_path(fi, '/'); camel_object_trigger_event(CAMEL_OBJECT(store), "folder_created", fi); camel_folder_info_free(fi); } @@ -207,13 +207,13 @@ vee_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelExce CAMEL_STORE_UNLOCK(store, cache_lock); /* and always add UNMATCHED, if scanning from top/etc */ - if (top == NULL || top[0] == 0 || strncmp(top, "UNMATCHED", strlen("UNMATCHED")) == 0) { + if (top == NULL || top[0] == 0 || strncmp(top, CAMEL_UNMATCHED_NAME, strlen(CAMEL_UNMATCHED_NAME)) == 0) { info = g_malloc0(sizeof(*info)); - info->url = g_strdup_printf("vfolder:%s#UNMATCHED", ((CamelService *)store)->url->path); - info->full_name = g_strdup("UNMATCHED"); - info->name = g_strdup("UNMATCHED"); + info->url = g_strdup_printf("vfolder:%s#%s", ((CamelService *)store)->url->path, CAMEL_UNMATCHED_NAME); + info->full_name = g_strdup(CAMEL_UNMATCHED_NAME); + info->name = g_strdup(CAMEL_UNMATCHED_NAME); info->unread_message_count = -1; - info->path = g_strdup (info->full_name); + camel_folder_info_build_path(info, '/'); g_ptr_array_add(data.infos, info); } @@ -230,7 +230,7 @@ vee_delete_folder(CamelStore *store, const char *folder_name, CamelException *ex CamelFolder *folder; char *key; - if (strcmp(folder_name, "UNMATCHED") == 0) { + if (strcmp(folder_name, CAMEL_UNMATCHED_NAME) == 0) { camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER, _("Cannot delete folder: %s: Invalid operation"), folder_name); return; @@ -258,6 +258,7 @@ vee_delete_folder(CamelStore *store, const char *folder_name, CamelException *ex fi->name = g_strdup(fi->name); fi->url = g_strdup_printf("vfolder:%s#%s", ((CamelService *)store)->url->path, key); fi->unread_message_count = -1; + camel_folder_info_build_path(fi, '/'); camel_object_trigger_event(CAMEL_OBJECT(store), "folder_deleted", fi); camel_folder_info_free(fi); @@ -277,7 +278,7 @@ vee_rename_folder(CamelStore *store, const char *old, const char *new, CamelExce CamelFolder *folder; char *key, *oldname, *full_oldname; - if (strcmp(old, "UNMATCHED") == 0) { + if (strcmp(old, CAMEL_UNMATCHED_NAME) == 0) { camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER, _("Cannot rename folder: %s: Invalid operation"), old); return; |