aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2001-02-23 09:40:46 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-02-23 09:40:46 +0800
commitc13a70e866b0591d6719cef1209d8b6c6826ccb9 (patch)
tree01699713449386ffd28829ea3195ec3d59f8762d /camel
parent07dea1a5093265e492a76281901179466b6dd4af (diff)
downloadgsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.gz
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.bz2
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.lz
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.xz
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.zst
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.zip
Doh, cut and paste problem, use mlist not cc.
* camel-folder-summary.c (camel_message_info_new_from_header): Doh, cut and paste problem, use mlist not cc. * camel-folder.c (move_message_to): (copy_message_to): If the source folder doesn't support a summary, dont try and get the message info from it. svn path=/trunk/; revision=8361
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-folder-summary.c2
-rw-r--r--camel/camel-folder.c31
-rw-r--r--camel/camel-search-private.c2
4 files changed, 31 insertions, 11 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index a21445fa11..aeffd7473f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,12 @@
2001-02-23 Not Zed <NotZed@Ximian.com>
+ * camel-folder-summary.c (camel_message_info_new_from_header):
+ Doh, cut and paste problem, use mlist not cc.
+
+ * camel-folder.c (move_message_to):
+ (copy_message_to): If the source folder doesn't support a
+ summary, dont try and get the message info from it.
+
* camel-filter-search.c (check_header): Implement a pseudo-header
"x-camel-mlist" which just looks up in the message info for a
match.
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index fe327040b1..4e9e9e9d1b 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -2537,7 +2537,7 @@ camel_message_info_new_from_header (struct _header_raw *header)
camel_message_info_set_from(info, from);
camel_message_info_set_to(info, to);
camel_message_info_set_cc(info, cc);
- camel_message_info_set_mlist(info, cc);
+ camel_message_info_set_mlist(info, mlist);
return info;
}
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index af9edcfe5d..faff5f7556 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -1057,7 +1057,7 @@ static void
copy_message_to (CamelFolder *source, const char *uid, CamelFolder *dest, CamelException *ex)
{
CamelMimeMessage *msg;
- CamelMessageInfo *info;
+ CamelMessageInfo *info = NULL;
/* Default implementation. */
@@ -1065,11 +1065,18 @@ copy_message_to (CamelFolder *source, const char *uid, CamelFolder *dest, CamelE
msg = CF_CLASS(source)->get_message(source, uid, ex);
if (!msg)
return;
- info = CF_CLASS(source)->get_message_info (source, uid);
+ if (source->has_summary_capability)
+ info = CF_CLASS(source)->get_message_info (source, uid);
+ else
+ info = camel_message_info_new_from_header(((CamelMimePart *)msg)->headers);
camel_folder_append_message (dest, msg, info, ex);
camel_object_unref (CAMEL_OBJECT (msg));
- if (info)
- CF_CLASS(source)->free_message_info(source, info);
+ if (info) {
+ if (source->has_summary_capability)
+ CF_CLASS(source)->free_message_info(source, info);
+ else
+ camel_message_info_free(info);
+ }
}
/**
@@ -1109,21 +1116,27 @@ move_message_to (CamelFolder *source, const char *uid,
CamelFolder *dest, CamelException *ex)
{
CamelMimeMessage *msg;
- CamelMessageInfo *info;
+ CamelMessageInfo *info = NULL;
/* Default implementation. */
msg = CF_CLASS(source)->get_message (source, uid, ex);
if (!msg)
return;
- info = CF_CLASS(source)->get_message_info (source, uid);
+ if (source->has_summary_capability)
+ info = CF_CLASS(source)->get_message_info (source, uid);
+ else
+ info = camel_message_info_new_from_header(((CamelMimePart *)msg)->headers);
camel_folder_append_message (dest, msg, info, ex);
camel_object_unref (CAMEL_OBJECT (msg));
if (!camel_exception_is_set(ex))
CF_CLASS(source)->set_message_flags(source, uid, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
-
- if (info)
- CF_CLASS(source)->free_message_info(source, info);
+ if (info) {
+ if (source->has_summary_capability)
+ CF_CLASS(source)->free_message_info(source, info);
+ else
+ camel_message_info_free(info);
+ }
}
/**
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
index f002bc3ad4..a288e91ca6 100644
--- a/camel/camel-search-private.c
+++ b/camel/camel-search-private.c
@@ -372,7 +372,7 @@ camel_search_header_match (const char *value, const char *match, camel_search_ma
{
const char *p;
int vlen, mlen;
-
+
while (*value && isspace (*value))
value++;