-rw-r--r-- | bin/kdepim/WhatsNew.txt | 7 | ||||
-rw-r--r-- | kmicromail/libetpan/imap/mailimap_parser.c | 22 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/imapwrapper.cpp | 67 | ||||
-rw-r--r-- | kmicromail/viewmailbase.cpp | 2 |
4 files changed, 64 insertions, 34 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 5bfe1c8..cbed872 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -14,8 +14,15 @@ Made search dialog closeable by cancel key. Made it possible to select in the date picker the (ligt grey ) dates of the prev./next month with the mouse. +OM/Pi: +"Delete mail" icon in main window now deletes all selected mails. +Fixed the problem, that the state flag of imap mails was ignored. +Now mails with "FLAG_SEEN" on the imap server get no icon in the list view +to idecate that they are already seen. +Fixed the problem that the body of some mails was not displayed in the +mail viewer when fetching them from the imap server directly to read them. ********** VERSION 1.9.19 ************ diff --git a/kmicromail/libetpan/imap/mailimap_parser.c b/kmicromail/libetpan/imap/mailimap_parser.c index 1c2ecde..560e58a 100644 --- a/kmicromail/libetpan/imap/mailimap_parser.c +++ b/kmicromail/libetpan/imap/mailimap_parser.c @@ -2398,10 +2398,28 @@ mailimap_body_fld_enc_parse(mailstream * fd, MMAPString * buffer, r = mailimap_string_parse(fd, buffer, &cur_token, &value, NULL, progr_rate, progr_fun); if (r != MAILIMAP_NO_ERROR) { - res = r; - goto err; + // LR start + // accept NIL and set type to utf8 + int ret = r; + r = mailimap_char_parse(fd, buffer, &cur_token, 'N'); + if (r == MAILIMAP_NO_ERROR) { + r = mailimap_char_parse(fd, buffer, &cur_token, 'I'); + if (r == MAILIMAP_NO_ERROR) { + r = mailimap_char_parse(fd, buffer, &cur_token, 'L'); + if (r == MAILIMAP_NO_ERROR) { + type = 4; + ret = MAILIMAP_NO_ERROR; + value = NULL; + } + } + } + if ( ret != MAILIMAP_NO_ERROR ) { + res = ret; + goto err; + } + // LR end } } else { res = r; diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index d9496af..93fb7de 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp @@ -435,41 +435,45 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) if (!flist || !flist->att_list) { continue; } cf = flist->att_list->first; - if( ! cf ) - for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) { - cflag = (mailimap_flag_fetch*)cf->data; - if( ! cflag ) - qDebug("imap:not cflag "); - if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) { - switch (cflag->fl_flag->fl_type) { - case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */ - mFlags.setBit(FLAG_ANSWERED); - break; - case MAILIMAP_FLAG_FLAGGED: /* \Flagged flag */ - mFlags.setBit(FLAG_FLAGGED); - break; - case MAILIMAP_FLAG_DELETED: /* \Deleted flag */ - mFlags.setBit(FLAG_DELETED); - break; - case MAILIMAP_FLAG_SEEN: /* \Seen flag */ - mFlags.setBit(FLAG_SEEN); - break; - case MAILIMAP_FLAG_DRAFT: /* \Draft flag */ - mFlags.setBit(FLAG_DRAFT); - break; - case MAILIMAP_FLAG_KEYWORD: /* keyword flag */ - break; - case MAILIMAP_FLAG_EXTENSION: /* \extension flag */ - break; - default: - break; + if( cf ) { + for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) { + cflag = (mailimap_flag_fetch*)cf->data; + if( ! cflag ) + qDebug("imap:NO cflag "); + else { + if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) { + switch (cflag->fl_flag->fl_type) { + case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */ + mFlags.setBit(FLAG_ANSWERED); + break; + case MAILIMAP_FLAG_FLAGGED: /* \Flagged flag */ + mFlags.setBit(FLAG_FLAGGED); + break; + case MAILIMAP_FLAG_DELETED: /* \Deleted flag */ + mFlags.setBit(FLAG_DELETED); + break; + case MAILIMAP_FLAG_SEEN: /* \Seen flag */ + mFlags.setBit(FLAG_SEEN); + break; + case MAILIMAP_FLAG_DRAFT: /* \Draft flag */ + mFlags.setBit(FLAG_DRAFT); + break; + case MAILIMAP_FLAG_KEYWORD: /* keyword flag */ + break; + case MAILIMAP_FLAG_EXTENSION: /* \extension flag */ + break; + default: + break; + } + } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) { + mFlags.setBit(FLAG_RECENT); + } } - } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) { - mFlags.setBit(FLAG_RECENT); } } + //qDebug(" continue"); continue; } if ( item->att_data.att_static == NULL ) continue; @@ -484,8 +488,9 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) struct mailimf_date_time **re = &date; size_t length = m->getDate().length(); size_t index = 0; if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) { + //qDebug("parseDateTime "); QDateTime dt = Genericwrapper::parseDateTime( date ); QString ret; if ( dt.date() == QDate::currentDate () ) ret = KGlobal::locale()->formatTime( dt.time(),true); @@ -606,9 +611,9 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) QValueList<int> path; body_desc = item->att_data.att_static->att_data.att_body; traverseBody(mail,body_desc,body,0,path); } else { - //odebug << "error fetching body: " << m_imap->imap_response << "" << oendl; + qDebug("error fetching body %d (%d): %s", err, MAILIMAP_NO_ERROR, m_imap->imap_response ); } if (result) mailimap_fetch_list_free(result); return body; } diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index c4731a7..d21696a 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp @@ -51,9 +51,9 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) deleteMail->addTo(mailmenu); - nextMail = new QAction(i18n("Show next mail"),SmallIcon("add"), 0, 0, this); + nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this); QLabel *spacer = new QLabel(toolbar); nextMail->addTo(toolbar); nextMail->addTo(mailmenu); |