author | zautrix <zautrix> | 2005-03-31 23:55:51 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-31 23:55:51 (UTC) |
commit | b76ad1e7e329051a47e28c9d132ce3fcd0b25c5c (patch) (side-by-side diff) | |
tree | b0b3d0eb7a3d29981c183275aadeed0cbbef0007 /kmicromail/libmailwrapper | |
parent | c0fa26aa3b33c293853bdd7d028ddb0545e33c85 (diff) | |
download | kdepimpi-b76ad1e7e329051a47e28c9d132ce3fcd0b25c5c.zip kdepimpi-b76ad1e7e329051a47e28c9d132ce3fcd0b25c5c.tar.gz kdepimpi-b76ad1e7e329051a47e28c9d132ce3fcd0b25c5c.tar.bz2 |
fixes
-rw-r--r-- | kmicromail/libmailwrapper/genericwrapper.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp index 1ed9f34..0b6adf7 100644 --- a/kmicromail/libmailwrapper/genericwrapper.cpp +++ b/kmicromail/libmailwrapper/genericwrapper.cpp @@ -339,53 +339,53 @@ QString Genericwrapper::parseAddressList( mailimf_address_list *list ) return result; } QString Genericwrapper::parseGroup( mailimf_group *group ) { QString result( "" ); result.append( group->grp_display_name ); result.append( ": " ); if ( group->grp_mb_list != NULL ) { result.append( parseMailboxList( group->grp_mb_list ) ); } result.append( ";" ); return result; } QString Genericwrapper::parseMailbox( mailimf_mailbox *box ) { QString result( "" ); if ( box->mb_display_name == NULL ) { - result.append( box->mb_addr_spec ); + result.append( convert_String(box->mb_addr_spec) ); } else { result.append( convert_String(box->mb_display_name) ); result.append( " <" ); - result.append( box->mb_addr_spec ); + result.append( convert_String( box->mb_addr_spec) ); result.append( ">" ); } return result; } QString Genericwrapper::parseMailboxList( mailimf_mailbox_list *list ) { QString result( "" ); bool first = true; for ( clistiter *current = clist_begin( list->mb_list ); current != NULL; current = current->next ) { mailimf_mailbox *box = (mailimf_mailbox *) current->data; if ( !first ) { result.append( "," ); } else { first = false; } result.append( parseMailbox( box ) ); } return result; @@ -469,50 +469,51 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > & uint32_t i = 0; for(; i < carray_count(env_list->msg_tab) ; ++i) { mailmessage * msg; QBitArray mFlags(7); msg = (mailmessage*)carray_get(env_list->msg_tab, i); if (msg->msg_fields == NULL) { //; // odebug << "could not fetch envelope of message " << i << "" << oendl; continue; } RecMailP mail = new RecMail(); mail->setWrapper(this); mail_flags * flag_result = 0; r = mailmessage_get_flags(msg,&flag_result); if (r == MAIL_ERROR_NOT_IMPLEMENTED) { mFlags.setBit(FLAG_SEEN); } mailimf_single_fields single_fields; mailimf_single_fields_init(&single_fields, msg->msg_fields); mail->setMsgsize(msg->msg_size); mail->setFlags(mFlags); mail->setMbox(mailbox); mail->setNumber(msg->msg_index); if (single_fields.fld_subject) mail->setSubject( convert_String(single_fields.fld_subject->sbj_value)); - if (single_fields.fld_from) + if (single_fields.fld_from) { mail->setFrom(parseMailboxList(single_fields.fld_from->frm_mb_list)); + } if (!mbox_as_to) { if (single_fields.fld_to) mail->setTo( parseAddressList( single_fields.fld_to->to_addr_list ) ); } else { mail->setTo(mailbox); } if (single_fields.fld_cc) mail->setCC( parseAddressList( single_fields.fld_cc->cc_addr_list ) ); if (single_fields.fld_bcc) mail->setBcc( parseAddressList( single_fields.fld_bcc->bcc_addr_list ) ); if (single_fields.fld_orig_date) { QDateTime dt = Genericwrapper::parseDateTime( single_fields.fld_orig_date->dt_date_time ); QString ret; if ( dt.date() == QDate::currentDate () ) ret = KGlobal::locale()->formatTime( dt.time(),true); else { ret = KGlobal::locale()->formatDateTime( dt,true,true); } mail->setDate( ret ); char tmp[20]; snprintf( tmp, 20, "%04i-%02i-%02i %02i:%02i:%02i", dt.date().year(),dt.date().month(), dt.date().day(), dt.time().hour(), dt.time().minute(), dt.time().second() ); //qDebug(" iso %s ", tmp); mail->setIsoDate( QString( tmp ) ); |