-rw-r--r-- | noncore/net/mailit/emailclient.cpp | 6 | ||||
-rw-r--r-- | noncore/unsupported/mailit/emailclient.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp index 2cedc51..b039cc4 100644 --- a/noncore/net/mailit/emailclient.cpp +++ b/noncore/net/mailit/emailclient.cpp | |||
@@ -438,65 +438,69 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) | |||
438 | ePtr->saved = FALSE; | 438 | ePtr->saved = FALSE; |
439 | mailconf->writeEntry("saved_" + stringId, ePtr->saved); | 439 | mailconf->writeEntry("saved_" + stringId, ePtr->saved); |
440 | } | 440 | } |
441 | } else { | 441 | } else { |
442 | ePtr->saved = mailconf->readBoolEntry("saved_" + stringId); | 442 | ePtr->saved = mailconf->readBoolEntry("saved_" + stringId); |
443 | ePtr->installed = mailconf->readBoolEntry("installed_" + stringId); | 443 | ePtr->installed = mailconf->readBoolEntry("installed_" + stringId); |
444 | if (ePtr->saved) { | 444 | if (ePtr->saved) { |
445 | ePtr->name = mailconf->readEntry("filename_" + stringId); | 445 | ePtr->name = mailconf->readEntry("filename_" + stringId); |
446 | ePtr->path = mailconf->readEntry("path_" + stringId); | 446 | ePtr->path = mailconf->readEntry("path_" + stringId); |
447 | } | 447 | } |
448 | } | 448 | } |
449 | } | 449 | } |
450 | 450 | ||
451 | bool found=false; | 451 | bool found=false; |
452 | 452 | ||
453 | if (!fromDisk) | 453 | if (!fromDisk) |
454 | { | 454 | { |
455 | 455 | ||
456 | Email *mailPtr; | 456 | Email *mailPtr; |
457 | item = (EmailListItem *) inboxView->firstChild(); | 457 | item = (EmailListItem *) inboxView->firstChild(); |
458 | while ((item != NULL)&&(!found)) | 458 | while ((item != NULL)&&(!found)) |
459 | { | 459 | { |
460 | mailPtr = item->getMail(); | 460 | mailPtr = item->getMail(); |
461 | if (mailPtr->id == newMail.id) { | 461 | if (mailPtr->id == newMail.id) { |
462 | item->setMail(newMail); | 462 | item->setMail(newMail); |
463 | emit mailUpdated(item->getMail()); | 463 | emit mailUpdated(item->getMail()); |
464 | found = true; | 464 | found = true; |
465 | } | 465 | } |
466 | item = (EmailListItem *) item->nextSibling(); | 466 | item = (EmailListItem *) item->nextSibling(); |
467 | } | 467 | } |
468 | } | 468 | } |
469 | if ((!found)||(fromDisk)) item = new EmailListItem(inboxView, newMail, TRUE); | 469 | if ((!found)||(fromDisk)) item = new EmailListItem(inboxView, newMail, TRUE); |
470 | 470 | ||
471 | if (item->getMail()->files.count()>0) | ||
472 | { | ||
473 | item->setPixmap(0, Resource::loadPixmap("mailit/attach")); | ||
474 | } | ||
471 | /*if (!newMail.downloaded) | 475 | /*if (!newMail.downloaded) |
472 | mailDownloadList.sizeInsert(newMail.serverId, newMail.size);*/ | 476 | mailDownloadList.sizeInsert(newMail.serverId, newMail.size);*/ |
473 | 477 | ||
474 | mailboxView->setCurrentTab(0); | 478 | mailboxView->setCurrentTab(0); |
475 | 479 | ||
476 | } | 480 | } |
477 | 481 | ||
478 | void EmailClient::allMailArrived(int count) | 482 | void EmailClient::allMailArrived(int count) |
479 | { | 483 | { |
480 | // not previewing means all mailtransfer has been done | 484 | // not previewing means all mailtransfer has been done |
481 | /*if (!previewingMail) {*/ | 485 | /*if (!previewingMail) {*/ |
482 | if ( (allAccounts) && ( (currentAccount = accountList.next()) !=0 ) ) { | 486 | if ( (allAccounts) && ( (currentAccount = accountList.next()) !=0 ) ) { |
483 | emit newCaption("Mailit - " + currentAccount->accountName); | 487 | emit newCaption("Mailit - " + currentAccount->accountName); |
484 | getNewMail(); | 488 | getNewMail(); |
485 | return; | 489 | return; |
486 | } else { | 490 | } else { |
487 | allAccounts = FALSE; | 491 | allAccounts = FALSE; |
488 | receiving = FALSE; | 492 | receiving = FALSE; |
489 | getMailButton->setEnabled(TRUE); | 493 | getMailButton->setEnabled(TRUE); |
490 | cancelButton->setEnabled(FALSE); | 494 | cancelButton->setEnabled(FALSE); |
491 | selectAccountMenu->setEnabled(TRUE); | 495 | selectAccountMenu->setEnabled(TRUE); |
492 | status1Label->setText("Idle"); | 496 | status1Label->setText("Idle"); |
493 | 497 | ||
494 | progressBar->reset(); | 498 | progressBar->reset(); |
495 | return; | 499 | return; |
496 | } | 500 | } |
497 | //} | 501 | //} |
498 | 502 | ||
499 | // all headers downloaded from server, start downloading remaining mails | 503 | // all headers downloaded from server, start downloading remaining mails |
500 | previewingMail = FALSE; | 504 | previewingMail = FALSE; |
501 | status1Label->setText(currentAccount->accountName); | 505 | status1Label->setText(currentAccount->accountName); |
502 | progressBar->reset(); | 506 | progressBar->reset(); |
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp index 2cedc51..b039cc4 100644 --- a/noncore/unsupported/mailit/emailclient.cpp +++ b/noncore/unsupported/mailit/emailclient.cpp | |||
@@ -438,65 +438,69 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) | |||
438 | ePtr->saved = FALSE; | 438 | ePtr->saved = FALSE; |
439 | mailconf->writeEntry("saved_" + stringId, ePtr->saved); | 439 | mailconf->writeEntry("saved_" + stringId, ePtr->saved); |
440 | } | 440 | } |
441 | } else { | 441 | } else { |
442 | ePtr->saved = mailconf->readBoolEntry("saved_" + stringId); | 442 | ePtr->saved = mailconf->readBoolEntry("saved_" + stringId); |
443 | ePtr->installed = mailconf->readBoolEntry("installed_" + stringId); | 443 | ePtr->installed = mailconf->readBoolEntry("installed_" + stringId); |
444 | if (ePtr->saved) { | 444 | if (ePtr->saved) { |
445 | ePtr->name = mailconf->readEntry("filename_" + stringId); | 445 | ePtr->name = mailconf->readEntry("filename_" + stringId); |
446 | ePtr->path = mailconf->readEntry("path_" + stringId); | 446 | ePtr->path = mailconf->readEntry("path_" + stringId); |
447 | } | 447 | } |
448 | } | 448 | } |
449 | } | 449 | } |
450 | 450 | ||
451 | bool found=false; | 451 | bool found=false; |
452 | 452 | ||
453 | if (!fromDisk) | 453 | if (!fromDisk) |
454 | { | 454 | { |
455 | 455 | ||
456 | Email *mailPtr; | 456 | Email *mailPtr; |
457 | item = (EmailListItem *) inboxView->firstChild(); | 457 | item = (EmailListItem *) inboxView->firstChild(); |
458 | while ((item != NULL)&&(!found)) | 458 | while ((item != NULL)&&(!found)) |
459 | { | 459 | { |
460 | mailPtr = item->getMail(); | 460 | mailPtr = item->getMail(); |
461 | if (mailPtr->id == newMail.id) { | 461 | if (mailPtr->id == newMail.id) { |
462 | item->setMail(newMail); | 462 | item->setMail(newMail); |
463 | emit mailUpdated(item->getMail()); | 463 | emit mailUpdated(item->getMail()); |
464 | found = true; | 464 | found = true; |
465 | } | 465 | } |
466 | item = (EmailListItem *) item->nextSibling(); | 466 | item = (EmailListItem *) item->nextSibling(); |
467 | } | 467 | } |
468 | } | 468 | } |
469 | if ((!found)||(fromDisk)) item = new EmailListItem(inboxView, newMail, TRUE); | 469 | if ((!found)||(fromDisk)) item = new EmailListItem(inboxView, newMail, TRUE); |
470 | 470 | ||
471 | if (item->getMail()->files.count()>0) | ||
472 | { | ||
473 | item->setPixmap(0, Resource::loadPixmap("mailit/attach")); | ||
474 | } | ||
471 | /*if (!newMail.downloaded) | 475 | /*if (!newMail.downloaded) |
472 | mailDownloadList.sizeInsert(newMail.serverId, newMail.size);*/ | 476 | mailDownloadList.sizeInsert(newMail.serverId, newMail.size);*/ |
473 | 477 | ||
474 | mailboxView->setCurrentTab(0); | 478 | mailboxView->setCurrentTab(0); |
475 | 479 | ||
476 | } | 480 | } |
477 | 481 | ||
478 | void EmailClient::allMailArrived(int count) | 482 | void EmailClient::allMailArrived(int count) |
479 | { | 483 | { |
480 | // not previewing means all mailtransfer has been done | 484 | // not previewing means all mailtransfer has been done |
481 | /*if (!previewingMail) {*/ | 485 | /*if (!previewingMail) {*/ |
482 | if ( (allAccounts) && ( (currentAccount = accountList.next()) !=0 ) ) { | 486 | if ( (allAccounts) && ( (currentAccount = accountList.next()) !=0 ) ) { |
483 | emit newCaption("Mailit - " + currentAccount->accountName); | 487 | emit newCaption("Mailit - " + currentAccount->accountName); |
484 | getNewMail(); | 488 | getNewMail(); |
485 | return; | 489 | return; |
486 | } else { | 490 | } else { |
487 | allAccounts = FALSE; | 491 | allAccounts = FALSE; |
488 | receiving = FALSE; | 492 | receiving = FALSE; |
489 | getMailButton->setEnabled(TRUE); | 493 | getMailButton->setEnabled(TRUE); |
490 | cancelButton->setEnabled(FALSE); | 494 | cancelButton->setEnabled(FALSE); |
491 | selectAccountMenu->setEnabled(TRUE); | 495 | selectAccountMenu->setEnabled(TRUE); |
492 | status1Label->setText("Idle"); | 496 | status1Label->setText("Idle"); |
493 | 497 | ||
494 | progressBar->reset(); | 498 | progressBar->reset(); |
495 | return; | 499 | return; |
496 | } | 500 | } |
497 | //} | 501 | //} |
498 | 502 | ||
499 | // all headers downloaded from server, start downloading remaining mails | 503 | // all headers downloaded from server, start downloading remaining mails |
500 | previewingMail = FALSE; | 504 | previewingMail = FALSE; |
501 | status1Label->setText(currentAccount->accountName); | 505 | status1Label->setText(currentAccount->accountName); |
502 | progressBar->reset(); | 506 | progressBar->reset(); |