author | alwin <alwin> | 2004-10-26 01:08:58 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-10-26 01:08:58 (UTC) |
commit | cd3245ade209b4672ab5c51003aa66b5908c67a1 (patch) (unidiff) | |
tree | dfd4246557ff5d8804204387660de7e0afbd4032 /noncore/net/mail/libmailwrapper/genericwrapper.cpp | |
parent | 9e97864f04686ca8fc672de950cbbef4ff6a5ec6 (diff) | |
download | opie-cd3245ade209b4672ab5c51003aa66b5908c67a1.zip opie-cd3245ade209b4672ab5c51003aa66b5908c67a1.tar.gz opie-cd3245ade209b4672ab5c51003aa66b5908c67a1.tar.bz2 |
Resolved a feature request:
unique display of date-time of a mail
maillist now sorted for mail-date as default, user can switch sort order
to all other items (subject, author, size)
Diffstat (limited to 'noncore/net/mail/libmailwrapper/genericwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index 703235d..0ac842d 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp | |||
@@ -375,25 +375,25 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) | |||
375 | while (h.length()>0 && h[h.length()-1]=='>') { | 375 | while (h.length()>0 && h[h.length()-1]=='>') { |
376 | h.remove(h.length()-1,1); | 376 | h.remove(h.length()-1,1); |
377 | } | 377 | } |
378 | if (h.length()>0) { | 378 | if (h.length()>0) { |
379 | res.append(h); | 379 | res.append(h); |
380 | } | 380 | } |
381 | } | 381 | } |
382 | return res; | 382 | return res; |
383 | } | 383 | } |
384 | 384 | ||
385 | void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) | 385 | void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) |
386 | { | 386 | { |
387 | int r; | 387 | int r,toffset; |
388 | mailmessage_list * env_list = 0; | 388 | mailmessage_list * env_list = 0; |
389 | r = mailsession_get_messages_list(session,&env_list); | 389 | r = mailsession_get_messages_list(session,&env_list); |
390 | if (r != MAIL_NO_ERROR) { | 390 | if (r != MAIL_NO_ERROR) { |
391 | odebug << "Error message list" << oendl; | 391 | odebug << "Error message list" << oendl; |
392 | return; | 392 | return; |
393 | } | 393 | } |
394 | r = mailsession_get_envelopes_list(session, env_list); | 394 | r = mailsession_get_envelopes_list(session, env_list); |
395 | if (r != MAIL_NO_ERROR) { | 395 | if (r != MAIL_NO_ERROR) { |
396 | odebug << "Error filling message list" << oendl; | 396 | odebug << "Error filling message list" << oendl; |
397 | if (env_list) { | 397 | if (env_list) { |
398 | mailmessage_list_free(env_list); | 398 | mailmessage_list_free(env_list); |
399 | } | 399 | } |
@@ -428,31 +428,31 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > & | |||
428 | if (single_fields.fld_from) | 428 | if (single_fields.fld_from) |
429 | mail->setFrom(parseMailboxList(single_fields.fld_from->frm_mb_list)); | 429 | mail->setFrom(parseMailboxList(single_fields.fld_from->frm_mb_list)); |
430 | if (!mbox_as_to) { | 430 | if (!mbox_as_to) { |
431 | if (single_fields.fld_to) | 431 | if (single_fields.fld_to) |
432 | mail->setTo( parseAddressList( single_fields.fld_to->to_addr_list ) ); | 432 | mail->setTo( parseAddressList( single_fields.fld_to->to_addr_list ) ); |
433 | } else { | 433 | } else { |
434 | mail->setTo(mailbox); | 434 | mail->setTo(mailbox); |
435 | } | 435 | } |
436 | if (single_fields.fld_cc) | 436 | if (single_fields.fld_cc) |
437 | mail->setCC( parseAddressList( single_fields.fld_cc->cc_addr_list ) ); | 437 | mail->setCC( parseAddressList( single_fields.fld_cc->cc_addr_list ) ); |
438 | if (single_fields.fld_bcc) | 438 | if (single_fields.fld_bcc) |
439 | mail->setBcc( parseAddressList( single_fields.fld_bcc->bcc_addr_list ) ); | 439 | mail->setBcc( parseAddressList( single_fields.fld_bcc->bcc_addr_list ) ); |
440 | if (single_fields.fld_orig_date) | 440 | if (single_fields.fld_orig_date) { |
441 | mail->setDate( parseDateTime( single_fields.fld_orig_date->dt_date_time ) ); | 441 | QDateTime d = parseDateTime( single_fields.fld_orig_date->dt_date_time,toffset); |
442 | // crashes when accessing pop3 account? | 442 | mail->setDate( d,toffset ); |
443 | } | ||
443 | if (single_fields.fld_message_id && single_fields.fld_message_id->mid_value) { | 444 | if (single_fields.fld_message_id && single_fields.fld_message_id->mid_value) { |
444 | mail->setMsgid(QString(single_fields.fld_message_id->mid_value)); | 445 | mail->setMsgid(QString(single_fields.fld_message_id->mid_value)); |
445 | } | 446 | } |
446 | |||
447 | if (single_fields.fld_reply_to) { | 447 | if (single_fields.fld_reply_to) { |
448 | QStringList t = parseAddressList(single_fields.fld_reply_to->rt_addr_list); | 448 | QStringList t = parseAddressList(single_fields.fld_reply_to->rt_addr_list); |
449 | if (t.count()>0) { | 449 | if (t.count()>0) { |
450 | mail->setReplyto(t[0]); | 450 | mail->setReplyto(t[0]); |
451 | } | 451 | } |
452 | } | 452 | } |
453 | #if 0 | 453 | #if 0 |
454 | refs = single_fields.fld_references; | 454 | refs = single_fields.fld_references; |
455 | if (refs && refs->mid_list && clist_count(refs->mid_list)) { | 455 | if (refs && refs->mid_list && clist_count(refs->mid_list)) { |
456 | char * text = (char*)refs->mid_list->first->data; | 456 | char * text = (char*)refs->mid_list->first->data; |
457 | mail->setReplyto(QString(text)); | 457 | mail->setReplyto(QString(text)); |
458 | } | 458 | } |