-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 18 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.h | 3 |
2 files changed, 5 insertions, 16 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index fe75a15..56efa0b 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -9,9 +9,9 @@ | |||
9 | #include "logindialog.h" | 9 | #include "logindialog.h" |
10 | 10 | ||
11 | using namespace Opie::Core; | 11 | using namespace Opie::Core; |
12 | IMAPwrapper::IMAPwrapper( IMAPaccount *a ) | 12 | IMAPwrapper::IMAPwrapper( IMAPaccount *a ) |
13 | : AbstractMail() | 13 | : AbstractMail(),MailStatics() |
14 | { | 14 | { |
15 | account = a; | 15 | account = a; |
16 | m_imap = 0; | 16 | m_imap = 0; |
17 | m_Lastmbox = ""; | 17 | m_Lastmbox = ""; |
@@ -423,11 +423,10 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
423 | continue; | 423 | continue; |
424 | } | 424 | } |
425 | if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { | 425 | if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { |
426 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; | 426 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; |
427 | m->setDate(head->env_date); | 427 | m->setDate(parseDateTime(head->env_date)); |
428 | m->setSubject(convert_String((const char*)head->env_subject)); | 428 | m->setSubject(convert_String((const char*)head->env_subject)); |
429 | //m->setSubject(head->env_subject); | ||
430 | if (head->env_from!=NULL) { | 429 | if (head->env_from!=NULL) { |
431 | addresslist = address_list_to_stringlist(head->env_from->frm_list); | 430 | addresslist = address_list_to_stringlist(head->env_from->frm_list); |
432 | if (addresslist.count()) { | 431 | if (addresslist.count()) { |
433 | m->setFrom(addresslist.first()); | 432 | m->setFrom(addresslist.first()); |
@@ -467,20 +466,9 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
467 | if (head->env_message_id) { | 466 | if (head->env_message_id) { |
468 | m->setMsgid(QString(head->env_message_id)); | 467 | m->setMsgid(QString(head->env_message_id)); |
469 | } | 468 | } |
470 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { | 469 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { |
471 | #if 0 | 470 | // not used this moment |
472 | mailimap_date_time*date = item->att_data.att_static->att_data.att_internal_date; | ||
473 | if (date->dt_sec>60 || date->dt_sec<0) date->dt_sec=0; | ||
474 | //QDateTime da(QDate(d->dt_year,date->dt_month,date->dt_day),QTime(date->dt_hour,date->dt_min,date->dt_sec)); | ||
475 | QString timestring = TimeString::numberDateString(QDate(date->dt_year,date->dt_month,date->dt_day))+" "; | ||
476 | timestring+=TimeString::timeString(QTime(date->dt_hour,date->dt_min,date->dt_sec))+" "; | ||
477 | timestring.sprintf(timestring+" %+05i",date->dt_zone); | ||
478 | m->setDate(timestring); | ||
479 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); | ||
480 | odebug << "" << d->dt_year << " " << d->dt_month << " " << d->dt_day << " - " << d->dt_hour << " " << d->dt_min << " " << d->dt_sec << "" << oendl; | ||
481 | odebug << da.toString() << oendl; | ||
482 | #endif | ||
483 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { | 471 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { |
484 | //size = item->att_data.att_static->att_data.att_rfc822_size; | 472 | //size = item->att_data.att_static->att_data.att_rfc822_size; |
485 | m->setMsgsize(item->att_data.att_static->att_data.att_rfc822_size); | 473 | m->setMsgsize(item->att_data.att_static->att_data.att_rfc822_size); |
486 | } | 474 | } |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index e56605a..5efcfc9 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h | |||
@@ -3,8 +3,9 @@ | |||
3 | 3 | ||
4 | #include <qlist.h> | 4 | #include <qlist.h> |
5 | #include "mailwrapper.h" | 5 | #include "mailwrapper.h" |
6 | #include "abstractmail.h" | 6 | #include "abstractmail.h" |
7 | #include "mailstatics.h" | ||
7 | #include <libetpan/clist.h> | 8 | #include <libetpan/clist.h> |
8 | 9 | ||
9 | struct mailimap; | 10 | struct mailimap; |
10 | struct mailimap_body; | 11 | struct mailimap_body; |
@@ -16,9 +17,9 @@ struct mailimap_body_type_mpart; | |||
16 | struct mailimap_body_fields; | 17 | struct mailimap_body_fields; |
17 | struct mailimap_msg_att; | 18 | struct mailimap_msg_att; |
18 | class encodedString; | 19 | class encodedString; |
19 | 20 | ||
20 | class IMAPwrapper : public AbstractMail | 21 | class IMAPwrapper : public AbstractMail,public MailStatics |
21 | { | 22 | { |
22 | Q_OBJECT | 23 | Q_OBJECT |
23 | public: | 24 | public: |
24 | IMAPwrapper( IMAPaccount *a ); | 25 | IMAPwrapper( IMAPaccount *a ); |