diff options
author | Not Zed <NotZed@Ximian.com> | 2001-02-22 04:13:42 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-02-22 04:13:42 +0800 |
commit | 6d69d56d0c28f0a786c12222c4f30e341378c271 (patch) | |
tree | d75128104443a711a6966a571e317498d65035ba /camel/providers/vee/camel-vee-folder.c | |
parent | 3d924d9972c35c96d57c6e503f21f26a2cc6e95d (diff) | |
download | gsoc2013-evolution-6d69d56d0c28f0a786c12222c4f30e341378c271.tar gsoc2013-evolution-6d69d56d0c28f0a786c12222c4f30e341378c271.tar.gz gsoc2013-evolution-6d69d56d0c28f0a786c12222c4f30e341378c271.tar.bz2 gsoc2013-evolution-6d69d56d0c28f0a786c12222c4f30e341378c271.tar.lz gsoc2013-evolution-6d69d56d0c28f0a786c12222c4f30e341378c271.tar.xz gsoc2013-evolution-6d69d56d0c28f0a786c12222c4f30e341378c271.tar.zst gsoc2013-evolution-6d69d56d0c28f0a786c12222c4f30e341378c271.zip |
Removed, not used. (camel_vee_folder_new): Removed call to build_folder.
2001-02-22 Not Zed <NotZed@Ximian.com>
* providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
not used.
(camel_vee_folder_new): Removed call to build_folder.
(vee_get_message): Dont try and free the mi if we didn't get it.
* camel-folder.c (camel_folder_change_info_new): Added a hash
table of what we have in the lists, plus moved private things into
private pointer.
(camel_folder_change_info_add_source): Fixed up private accesses.
(camel_folder_change_info_add_uid): Changed to use a hashtable to
see if we already have the uid, etc.
(camel_folder_change_info_remove_uid): Similar.
(change_info_remove): Likewise.
(camel_folder_change_info_clear): Fixes for privatisations.
(camel_folder_change_info_free): "
svn path=/trunk/; revision=8339
Diffstat (limited to 'camel/providers/vee/camel-vee-folder.c')
-rw-r--r-- | camel/providers/vee/camel-vee-folder.c | 52 |
1 files changed, 5 insertions, 47 deletions
diff --git a/camel/providers/vee/camel-vee-folder.c b/camel/providers/vee/camel-vee-folder.c index 617b67b162..18c1fe20c4 100644 --- a/camel/providers/vee/camel-vee-folder.c +++ b/camel/providers/vee/camel-vee-folder.c @@ -66,7 +66,6 @@ static void unmatched_finalise(CamelFolder *sub, gpointer type, CamelVeeFolder * static void folder_changed(CamelFolder *sub, gpointer type, CamelVeeFolder *vf); static void message_changed(CamelFolder *f, const char *uid, CamelVeeFolder *vf); -static void vee_folder_build(CamelVeeFolder *vf, CamelException *ex); static void vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException *ex); static CamelFolderClass *camel_vee_folder_parent; @@ -249,13 +248,6 @@ camel_vee_folder_new(CamelStore *parent_store, const char *name, guint32 flags, vf->expression = g_strdup(searchpart); vf->vname = namepart; - vee_folder_build(vf, ex); - if (camel_exception_is_set(ex)) { - printf("opening folder failed\n"); - camel_object_unref((CamelObject *)folder); - return NULL; - } - printf("opened normal folder folder %p %s with %d messages\n", folder, name, camel_folder_get_message_count(folder)); /* FIXME: should be moved to store */ @@ -796,13 +788,14 @@ static CamelMimeMessage *vee_get_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg = NULL; mi = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, uid); - if (mi == NULL) + if (mi) { + msg = camel_folder_get_message(mi->folder, strchr(camel_message_info_uid(mi), ':') + 1, ex); + camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi); + } else { camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, "No such message %s in %s", uid, folder->name); - else - msg = camel_folder_get_message(mi->folder, strchr(camel_message_info_uid(mi), ':') + 1, ex); - camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi); + } return msg; } @@ -881,41 +874,6 @@ vee_move_message_to(CamelFolder *folder, const char *uid, CamelFolder *dest, Cam } } -/* - need incremental update, based on folder. - Need to watch folders for changes and update accordingly. -*/ - -/* this does most of the vfolder magic */ -/* must have summary_lock held when calling */ -static void -vee_folder_build(CamelVeeFolder *vf, CamelException *ex) -{ - CamelFolder *folder = (CamelFolder *)vf; - struct _CamelVeeFolderPrivate *p = _PRIVATE(vf); - GList *node; - - camel_folder_summary_clear(folder->summary); - - CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock); - - node = p->folders; - while (node) { - GPtrArray *matches; - CamelFolder *f = node->data; - int i; - - matches = camel_folder_search_by_expression(f, vf->expression, ex); - for (i = 0; i < matches->len; i++) - vee_folder_add_uid(vf, f, matches->pdata[i]); - - camel_folder_search_free(f, matches); - node = g_list_next(node); - } - - CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock); -} - static void removed_uid(void *key, void *value, void *data) { |