author | zautrix <zautrix> | 2004-08-31 21:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-31 21:01:18 (UTC) |
commit | 3f5c51234c8068f3d4826a2a0066648ace21a19f (patch) (unidiff) | |
tree | 91b76c1c7ddec6628c573e409070070747d99feb /kmicromail/libmailwrapper/genericwrapper.cpp | |
parent | 95f8d4f1de557bd25ae38807d970208399cec5d1 (diff) | |
download | kdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.zip kdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.tar.gz kdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.tar.bz2 |
Enhancements of kopiemail
Diffstat (limited to 'kmicromail/libmailwrapper/genericwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/genericwrapper.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp index f804e44..1fd4bb1 100644 --- a/kmicromail/libmailwrapper/genericwrapper.cpp +++ b/kmicromail/libmailwrapper/genericwrapper.cpp | |||
@@ -1,12 +1,13 @@ | |||
1 | // CHANGED 2004-09-31 Lutz Rogowski | ||
1 | #include "genericwrapper.h" | 2 | #include "genericwrapper.h" |
2 | #include <libetpan/libetpan.h> | 3 | #include <libetpan/libetpan.h> |
3 | #include "mailtypes.h" | 4 | #include "mailtypes.h" |
4 | 5 | ||
5 | 6 | ||
6 | 7 | ||
7 | using namespace Opie::Core; | 8 | using namespace Opie::Core; |
8 | Genericwrapper::Genericwrapper() | 9 | Genericwrapper::Genericwrapper() |
9 | : AbstractMail() | 10 | : AbstractMail() |
10 | { | 11 | { |
11 | bodyCache.clear(); | 12 | bodyCache.clear(); |
12 | m_storage = 0; | 13 | m_storage = 0; |
@@ -383,25 +384,25 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) | |||
383 | h.remove(0,1); | 384 | h.remove(0,1); |
384 | } | 385 | } |
385 | while (h.length()>0 && h[h.length()-1]=='>') { | 386 | while (h.length()>0 && h[h.length()-1]=='>') { |
386 | h.remove(h.length()-1,1); | 387 | h.remove(h.length()-1,1); |
387 | } | 388 | } |
388 | if (h.length()>0) { | 389 | if (h.length()>0) { |
389 | res.append(h); | 390 | res.append(h); |
390 | } | 391 | } |
391 | } | 392 | } |
392 | return res; | 393 | return res; |
393 | } | 394 | } |
394 | 395 | ||
395 | void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) | 396 | void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) |
396 | { | 397 | { |
397 | int r; | 398 | int r; |
398 | mailmessage_list * env_list = 0; | 399 | mailmessage_list * env_list = 0; |
399 | r = mailsession_get_messages_list(session,&env_list); | 400 | r = mailsession_get_messages_list(session,&env_list); |
400 | if (r != MAIL_NO_ERROR) { | 401 | if (r != MAIL_NO_ERROR) { |
401 | ; // odebug << "Error message list" << oendl; | 402 | ; // odebug << "Error message list" << oendl; |
402 | return; | 403 | return; |
403 | } | 404 | } |
404 | r = mailsession_get_envelopes_list(session, env_list); | 405 | r = mailsession_get_envelopes_list(session, env_list); |
405 | if (r != MAIL_NO_ERROR) { | 406 | if (r != MAIL_NO_ERROR) { |
406 | ; // odebug << "Error filling message list" << oendl; | 407 | ; // odebug << "Error filling message list" << oendl; |
407 | if (env_list) { | 408 | if (env_list) { |
@@ -463,18 +464,19 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > & | |||
463 | } | 464 | } |
464 | #if 0 | 465 | #if 0 |
465 | refs = single_fields.fld_references; | 466 | refs = single_fields.fld_references; |
466 | if (refs && refs->mid_list && clist_count(refs->mid_list)) { | 467 | if (refs && refs->mid_list && clist_count(refs->mid_list)) { |
467 | char * text = (char*)refs->mid_list->first->data; | 468 | char * text = (char*)refs->mid_list->first->data; |
468 | mail->setReplyto(QString(text)); | 469 | mail->setReplyto(QString(text)); |
469 | } | 470 | } |
470 | #endif | 471 | #endif |
471 | if (single_fields.fld_in_reply_to && single_fields.fld_in_reply_to->mid_list && | 472 | if (single_fields.fld_in_reply_to && single_fields.fld_in_reply_to->mid_list && |
472 | clist_count(single_fields.fld_in_reply_to->mid_list)) { | 473 | clist_count(single_fields.fld_in_reply_to->mid_list)) { |
473 | mail->setInreply(parseInreplies(single_fields.fld_in_reply_to)); | 474 | mail->setInreply(parseInreplies(single_fields.fld_in_reply_to)); |
474 | } | 475 | } |
475 | target.append(mail); | 476 | if ( maxSizeInKb == 0 || mail->Msgsize()<=maxSizeInKb*1024 ) |
477 | target.append(mail); | ||
476 | } | 478 | } |
477 | if (env_list) { | 479 | if (env_list) { |
478 | mailmessage_list_free(env_list); | 480 | mailmessage_list_free(env_list); |
479 | } | 481 | } |
480 | } | 482 | } |