summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-24 12:16:16 (UTC)
committer zautrix <zautrix>2005-01-24 12:16:16 (UTC)
commitd4f5ce1bedd03191da5ecef2dc68381c10ef1fba (patch) (unidiff)
tree2d6860078083e588f8f365b308ee4ffb2c34f1c1
parent485a6b28e3be6437742852970fdd122ba071b726 (diff)
downloadkdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.zip
kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.tar.gz
kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.tar.bz2
more imap fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt7
-rw-r--r--kmicromail/libetpan/imap/mailimap_parser.c22
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp67
-rw-r--r--kmicromail/viewmailbase.cpp2
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
@@ -17,2 +17,9 @@ dates of the prev./next month with the mouse.
17 17
18OM/Pi:
19"Delete mail" icon in main window now deletes all selected mails.
20Fixed the problem, that the state flag of imap mails was ignored.
21Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
22to idecate that they are already seen.
23Fixed the problem that the body of some mails was not displayed in the
24mail viewer when fetching them from the imap server directly to read them.
18 25
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
@@ -2401,4 +2401,22 @@ mailimap_body_fld_enc_parse(mailstream * fd, MMAPString * buffer,
2401 if (r != MAILIMAP_NO_ERROR) { 2401 if (r != MAILIMAP_NO_ERROR) {
2402 res = r; 2402 // LR start
2403 goto err; 2403 // accept NIL and set type to utf8
2404 int ret = r;
2405 r = mailimap_char_parse(fd, buffer, &cur_token, 'N');
2406 if (r == MAILIMAP_NO_ERROR) {
2407 r = mailimap_char_parse(fd, buffer, &cur_token, 'I');
2408 if (r == MAILIMAP_NO_ERROR) {
2409 r = mailimap_char_parse(fd, buffer, &cur_token, 'L');
2410 if (r == MAILIMAP_NO_ERROR) {
2411 type = 4;
2412 ret = MAILIMAP_NO_ERROR;
2413 value = NULL;
2414 }
2415 }
2416 }
2417 if ( ret != MAILIMAP_NO_ERROR ) {
2418 res = ret;
2419 goto err;
2420 }
2421 // LR end
2404 } 2422 }
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
@@ -438,35 +438,39 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
438 cf = flist->att_list->first; 438 cf = flist->att_list->first;
439 if( ! cf ) 439 if( cf ) {
440 for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) { 440 for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) {
441 cflag = (mailimap_flag_fetch*)cf->data; 441 cflag = (mailimap_flag_fetch*)cf->data;
442 if( ! cflag ) 442 if( ! cflag )
443 qDebug("imap:not cflag "); 443 qDebug("imap:NO cflag ");
444 if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) { 444 else {
445 switch (cflag->fl_flag->fl_type) { 445 if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) {
446 case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */ 446 switch (cflag->fl_flag->fl_type) {
447 mFlags.setBit(FLAG_ANSWERED); 447 case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */
448 break; 448 mFlags.setBit(FLAG_ANSWERED);
449 case MAILIMAP_FLAG_FLAGGED: /* \Flagged flag */ 449 break;
450 mFlags.setBit(FLAG_FLAGGED); 450 case MAILIMAP_FLAG_FLAGGED: /* \Flagged flag */
451 break; 451 mFlags.setBit(FLAG_FLAGGED);
452 case MAILIMAP_FLAG_DELETED: /* \Deleted flag */ 452 break;
453 mFlags.setBit(FLAG_DELETED); 453 case MAILIMAP_FLAG_DELETED: /* \Deleted flag */
454 break; 454 mFlags.setBit(FLAG_DELETED);
455 case MAILIMAP_FLAG_SEEN: /* \Seen flag */ 455 break;
456 mFlags.setBit(FLAG_SEEN); 456 case MAILIMAP_FLAG_SEEN: /* \Seen flag */
457 break; 457 mFlags.setBit(FLAG_SEEN);
458 case MAILIMAP_FLAG_DRAFT: /* \Draft flag */ 458 break;
459 mFlags.setBit(FLAG_DRAFT); 459 case MAILIMAP_FLAG_DRAFT: /* \Draft flag */
460 break; 460 mFlags.setBit(FLAG_DRAFT);
461 case MAILIMAP_FLAG_KEYWORD: /* keyword flag */ 461 break;
462 break; 462 case MAILIMAP_FLAG_KEYWORD: /* keyword flag */
463 case MAILIMAP_FLAG_EXTENSION: /* \extension flag */ 463 break;
464 break; 464 case MAILIMAP_FLAG_EXTENSION: /* \extension flag */
465 default: 465 break;
466 break; 466 default:
467 break;
468 }
469 } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) {
470 mFlags.setBit(FLAG_RECENT);
471 }
467 } 472 }
468 } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) {
469 mFlags.setBit(FLAG_RECENT);
470 } 473 }
471 } 474 }
475 //qDebug(" continue");
472 continue; 476 continue;
@@ -487,2 +491,3 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
487 if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) { 491 if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) {
492 //qDebug("parseDateTime ");
488 QDateTime dt = Genericwrapper::parseDateTime( date ); 493 QDateTime dt = Genericwrapper::parseDateTime( date );
@@ -609,3 +614,3 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail)
609 } else { 614 } else {
610 //odebug << "error fetching body: " << m_imap->imap_response << "" << oendl; 615 qDebug("error fetching body %d (%d): %s", err, MAILIMAP_NO_ERROR, m_imap->imap_response );
611 } 616 }
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index c4731a7..d21696a 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -54,3 +54,3 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
54 54
55 nextMail = new QAction(i18n("Show next mail"),SmallIcon("add"), 0, 0, this); 55 nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this);
56 QLabel *spacer = new QLabel(toolbar); 56 QLabel *spacer = new QLabel(toolbar);