diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-11-07 20:36:24 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-11-07 20:36:24 +0800 |
commit | e797be055881bb928b728aa1c1d65682f04d904a (patch) | |
tree | de673f96f3f68ed5bc1ac3e61c2d7203fa937a72 | |
parent | 66dd09db7fc4007888ba62e5570d840ed83ab868 (diff) | |
download | gsoc2013-evolution-e797be055881bb928b728aa1c1d65682f04d904a.tar.gz gsoc2013-evolution-e797be055881bb928b728aa1c1d65682f04d904a.tar.zst gsoc2013-evolution-e797be055881bb928b728aa1c1d65682f04d904a.zip |
you shouldn't use an integer to set the flag. You should use a string, and
2000-11-06 Not Zed <NotZed@HelixCode.com>
* filter-driver.c (do_flag): you shouldn't use an integer to
set the flag. You should use a string, and look it up, because
the flag bits might change.
(filter_driver_filter_message): Can som e one PLEASE STOP
INDENTING THE CODE. Even if i have to come over the and
beat it into you. YOU DONT INDENT CODE ONCE ITS BEEN CHECKED IN
TO CVS, otherwise you SCREW UP THE DIFF's. Can't you please
please learn this?
(filter_driver_log): Fixes for api changes to mime_message.
2000-11-05 Not Zed <NotZed@HelixCode.com>
* filter-message-search.c (get_sent_date): Fix for date change
api. No longer need to encode/decode the date, after its been
encoded/ecoded already.
(get_received_date): Likewise.
svn path=/trunk/; revision=6477
-rw-r--r-- | filter/ChangeLog | 19 | ||||
-rw-r--r-- | filter/filter-driver.c | 11 | ||||
-rw-r--r-- | filter/filter-message-search.c | 22 |
3 files changed, 33 insertions, 19 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index 445fb67911..0e358b5d43 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,22 @@ +2000-11-06 Not Zed <NotZed@HelixCode.com> + + * filter-driver.c (do_flag): you shouldn't use an integer to + set the flag. You should use a string, and look it up, because + the flag bits might change. + (filter_driver_filter_message): Can som e one PLEASE STOP + INDENTING THE CODE. Even if i have to come over the and + beat it into you. YOU DONT INDENT CODE ONCE ITS BEEN CHECKED IN + TO CVS, otherwise you SCREW UP THE DIFF's. Can't you please + please learn this? + (filter_driver_log): Fixes for api changes to mime_message. + +2000-11-05 Not Zed <NotZed@HelixCode.com> + + * filter-message-search.c (get_sent_date): Fix for date change + api. No longer need to encode/decode the date, after its been + encoded/ecoded already. + (get_received_date): Likewise. + 2000-11-06 Christopher James Lahey <clahey@helixcode.com> * e-search-bar.h: Fixed the argument comment. Removed an old enum diff --git a/filter/filter-driver.c b/filter/filter-driver.c index f32699559a..e07b58dc0c 100644 --- a/filter/filter-driver.c +++ b/filter/filter-driver.c @@ -562,17 +562,22 @@ filter_driver_log (FilterDriver *driver, enum filter_log_t status, const char *d case FILTER_LOG_START: { /* write log header */ const char *subject = NULL; - const char *from = NULL; + char *fromstr; + const CamelInternetAddress *from; char date[50]; time_t t; - + + /* FIXME: does this need locking? Probably */ + from = camel_mime_message_get_from (p->message); + fromstr = camel_address_format((CamelAddress *)from); subject = camel_mime_message_get_subject (p->message); time (&t); strftime (date, 49, "%a, %d %b %Y %H:%M:%S", localtime (&t)); fprintf (p->logfile, "Applied filter \"%s\" to message from %s - \"%s\" at %s\n", - str, from ? from : "unknown", subject ? subject : "", date); + str, fromstr ? fromstr : "unknown", subject ? subject : "", date); + g_free(fromstr); break; } case FILTER_LOG_ACTION: diff --git a/filter/filter-message-search.c b/filter/filter-message-search.c index 2e09489843..d5b80c6485 100644 --- a/filter/filter-message-search.c +++ b/filter/filter-message-search.c @@ -595,33 +595,23 @@ user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageS } static ESExpResult * -get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) +get_sent_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) { ESExpResult *r; - const char *sent_date; - time_t date; - sent_date = camel_mime_message_get_sent_date (fms->message); - date = header_decode_date (sent_date, NULL); - - r = e_sexp_result_new (ESEXP_RES_INT); - r->value.number = date; + r = e_sexp_result_new(ESEXP_RES_INT); + r->value.number = camel_mime_message_get_date(fms->message, NULL); return r; } static ESExpResult * -get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) +get_received_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) { ESExpResult *r; - const char *received_date; - time_t date; - received_date = camel_mime_message_get_received_date (fms->message); - date = header_decode_date (received_date, NULL); - - r = e_sexp_result_new (ESEXP_RES_INT); - r->value.number = date; + r = e_sexp_result_new(ESEXP_RES_INT); + r->value.number = camel_mime_message_get_date_received(fms->message, NULL); return r; } |