diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-08-11 00:35:28 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-08-11 00:35:28 +0800 |
commit | 690509bf826bc02af09cbec064f1f34c48dd9b0c (patch) | |
tree | 41580cd68f0f3e0dc297f11e34e237c37b2dc09e /camel/providers/mh | |
parent | 544eb3c3493bfa25d6a3a82d1c18805174c37eb9 (diff) | |
download | gsoc2013-evolution-690509bf826bc02af09cbec064f1f34c48dd9b0c.tar gsoc2013-evolution-690509bf826bc02af09cbec064f1f34c48dd9b0c.tar.gz gsoc2013-evolution-690509bf826bc02af09cbec064f1f34c48dd9b0c.tar.bz2 gsoc2013-evolution-690509bf826bc02af09cbec064f1f34c48dd9b0c.tar.lz gsoc2013-evolution-690509bf826bc02af09cbec064f1f34c48dd9b0c.tar.xz gsoc2013-evolution-690509bf826bc02af09cbec064f1f34c48dd9b0c.tar.zst gsoc2013-evolution-690509bf826bc02af09cbec064f1f34c48dd9b0c.zip |
A better way to compress leading whitespace. The code is probably invalid
2000-08-11 Not Zed <NotZed@HelixCode.com>
* camel-mime-parser.c (folder_scan_header): A better way to
compress leading whitespace. The code is probably invalid anyway,
I dont think it will work across buffer boundaries.
* providers/mbox/camel-mbox-folder.c (mbox_append_message): And
write out proper format From lines here too.
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_build_from): New function to build a more
compatible mbox "From " line.
(camel_mbox_summary_sync): Write From lines in the proper format.
2000-08-10 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
* providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
with constification.
* providers/imap/camel-imap-folder.c (imap_append_message): Fixed
for append api change. Eek this routine seriously wastes memory.
* providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
(mh_append_message): Fix for api change, and include user flags
and tags in new message.
* providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
for search api change.
* camel-folder.c (camel_folder_search_free): New function for
freeing search results.
(search_free): Changed my mind, implement a default that actually
does something. Free as to the old interface.
(camel_folder_append_message): Changed to accept a
camelmessageinfo rather than flags, which just doesn't have enough
info in it.
(copy_message_to): Change for append_message api change.
(move_message_to): Likewise.
* providers/mbox/camel-mbox-folder.c (mbox_search_free):
Implement.
(mbox_append_message): Fix for api change, and also copy user
flags/tags across to new summary.
* camel-folder-search.c (search_user_tag): A search expression
that returns the current use flag by name.
(camel_folder_search_free_result): New function to free the result
of a search.
* camel-folder-summary.c: Bump summary version.
(message_info_new):
(message_info_load):
(message_info_save):
(camel_message_info_dup_to):
(camel_message_info_free): Added support for arbitrary tag/value
pairs (CamelTag's).
(camel_tag_get):
(camel_tag_set):
(camel_tag_list_size):
(camel_tag_list_free): Operations for working with CamelTags.
svn path=/trunk/; revision=4683
Diffstat (limited to 'camel/providers/mh')
-rw-r--r-- | camel/providers/mh/camel-mh-folder.c | 29 | ||||
-rw-r--r-- | camel/providers/mh/camel-mh-store.c | 2 |
2 files changed, 27 insertions, 4 deletions
diff --git a/camel/providers/mh/camel-mh-folder.c b/camel/providers/mh/camel-mh-folder.c index 6f85fb756a..b10c8b1a65 100644 --- a/camel/providers/mh/camel-mh-folder.c +++ b/camel/providers/mh/camel-mh-folder.c @@ -60,7 +60,7 @@ static void mh_init(CamelFolder * folder, CamelStore * parent_store, static void mh_sync(CamelFolder * folder, gboolean expunge, CamelException * ex); static gint mh_get_message_count(CamelFolder * folder); static gint mh_get_unread_message_count(CamelFolder * folder); -static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, guint32 flags, CamelException * ex); +static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, CamelException * ex); static GPtrArray *mh_get_uids(CamelFolder * folder); static GPtrArray *mh_get_subfolder_names(CamelFolder * folder); static GPtrArray *mh_get_summary(CamelFolder * folder); @@ -71,6 +71,7 @@ static void mh_expunge(CamelFolder * folder, CamelException * ex); static const CamelMessageInfo *mh_get_message_info(CamelFolder * folder, const char *uid); static GPtrArray *mh_search_by_expression(CamelFolder * folder, const char *expression, CamelException * ex); +static void mh_search_free(CamelFolder *folder, GPtrArray *result); static guint32 mh_get_message_flags(CamelFolder * folder, const char *uid); static void mh_set_message_flags(CamelFolder * folder, const char *uid, guint32 flags, guint32 set); @@ -105,6 +106,7 @@ static void camel_mh_folder_class_init(CamelMhFolderClass * camel_mh_folder_clas camel_folder_class->get_message = mh_get_message; camel_folder_class->search_by_expression = mh_search_by_expression; + camel_folder_class->search_free = mh_search_free; camel_folder_class->get_message_info = mh_get_message_info; @@ -268,12 +270,13 @@ static gint mh_get_unread_message_count(CamelFolder * folder) return count; } -static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, guint32 flags, CamelException * ex) +static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, CamelException * ex) { CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder); CamelStream *output_stream = NULL; char *name = NULL; char *uid = NULL; + CamelMessageInfo *newinfo; /* FIXME: probably needs additional locking */ @@ -298,6 +301,21 @@ static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, /* index/summarise the message. Yes this re-reads it, its just simpler */ camel_mh_summary_add(mh_folder->summary, uid, TRUE); + if (info + && (newinfo = camel_folder_summary_uid(CAMEL_FOLDER_SUMMARY(mh_folder->summary), uid))) { + CamelFlag *flag = info->user_flags; + CamelTag *tag = info->user_tags; + + newinfo->flags = info->flags; + while (flag) { + camel_flag_set(&newinfo->user_flags, flag->name, TRUE); + flag = flag->next; + } + while (tag) { + camel_tag_set(&newinfo->user_tags, tag->name, tag->value); + tag = tag->next; + } + } gtk_signal_emit_by_name(GTK_OBJECT(folder), "folder_changed", 0); g_free(name); g_free(uid); @@ -431,6 +449,13 @@ static GPtrArray *mh_search_by_expression(CamelFolder * folder, const char *expr return camel_folder_search_execute_expression(mh_folder->search, expression, ex); } +static void mh_search_free(CamelFolder *folder, GPtrArray *result) +{ + CamelMhFolder *mh_folder = CAMEL_MH_FOLDER (folder); + + camel_folder_search_free_result(mh_folder->search, result); +} + static guint32 mh_get_message_flags(CamelFolder * folder, const char *uid) { CamelMessageInfo *info; diff --git a/camel/providers/mh/camel-mh-store.c b/camel/providers/mh/camel-mh-store.c index 5ab4bcc59d..42f3b474f6 100644 --- a/camel/providers/mh/camel-mh-store.c +++ b/camel/providers/mh/camel-mh-store.c @@ -111,8 +111,6 @@ static CamelFolder *get_folder(CamelStore * store, const char *folder_name, gboo printf("getting folder: %s\n", name); if (stat(name, &st) == -1) { - int fd; - printf("doesn't exist ...\n"); if (errno != ENOENT) { |