author | groucho <groucho> | 2003-04-28 08:31:24 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-28 08:31:24 (UTC) |
commit | 63d3f7ca039d93612abaa4a65fc00b337c42ec9d (patch) (unidiff) | |
tree | ea4a08e00d5a229f20c3e4150f707a2ac8f9e882 /noncore/unsupported/mailit/emailclient.cpp | |
parent | c3b703405fe77fbe16596ebd7d814a6e463f9243 (diff) | |
download | opie-63d3f7ca039d93612abaa4a65fc00b337c42ec9d.zip opie-63d3f7ca039d93612abaa4a65fc00b337c42ec9d.tar.gz opie-63d3f7ca039d93612abaa4a65fc00b337c42ec9d.tar.bz2 |
- bug fixes in the parser (from header)
- bug fixes in address selector (uses cc: now)
- remove now selects next item afterwards (speeds up mass deletion)
- smaller fixes
Diffstat (limited to 'noncore/unsupported/mailit/emailclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/emailclient.cpp | 75 |
1 files changed, 31 insertions, 44 deletions
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp index 23059cf..dff1888 100644 --- a/noncore/unsupported/mailit/emailclient.cpp +++ b/noncore/unsupported/mailit/emailclient.cpp | |||
@@ -361,9 +361,9 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) | |||
361 | newMail.serverId = mail.serverId; | 361 | newMail.serverId = mail.serverId; |
362 | newMail.size = mail.size; | 362 | newMail.size = mail.size; |
363 | newMail.downloaded = mail.downloaded; | 363 | newMail.downloaded = mail.downloaded; |
364 | 364 | ||
365 | newMail.fromAccountId = currentAccount->id; | 365 | newMail.fromAccountId = emailHandler->getAccount()->id; |
366 | mailconf->writeEntry("fromaccountid", newMail.fromAccountId); | 366 | mailconf->writeEntry("fromaccountid", newMail.fromAccountId); |
367 | } | 367 | } |
368 | 368 | ||
369 | //add if read or not | 369 | //add if read or not |
@@ -479,13 +479,13 @@ void EmailClient::allMailArrived(int count) | |||
479 | previewingMail = FALSE; | 479 | previewingMail = FALSE; |
480 | status1Label->setText(currentAccount->accountName); | 480 | status1Label->setText(currentAccount->accountName); |
481 | progressBar->reset(); | 481 | progressBar->reset(); |
482 | 482 | ||
483 | //emailHandler->getMailByList(&mailDownloadList); | 483 | |
484 | |||
485 | mailboxView->setCurrentTab(0); | 484 | mailboxView->setCurrentTab(0); |
486 | } | 485 | } |
487 | 486 | ||
487 | |||
488 | void EmailClient::moveMailFront(Email *mailPtr) | 488 | void EmailClient::moveMailFront(Email *mailPtr) |
489 | { | 489 | { |
490 | if ( (receiving) && (mailPtr->fromAccountId == currentAccount->id) ) { | 490 | if ( (receiving) && (mailPtr->fromAccountId == currentAccount->id) ) { |
491 | mailDownloadList.moveFront(mailPtr->serverId, mailPtr->size); | 491 | mailDownloadList.moveFront(mailPtr->serverId, mailPtr->size); |
@@ -663,9 +663,9 @@ QString EmailClient::getPath(bool enclosurePath) | |||
663 | } | 663 | } |
664 | 664 | ||
665 | void EmailClient::readSettings() | 665 | void EmailClient::readSettings() |
666 | { | 666 | { |
667 | int y,acc_count, accountPos=0; | 667 | int y,acc_count; |
668 | 668 | ||
669 | mailconf->setGroup("mailitglobal"); | 669 | mailconf->setGroup("mailitglobal"); |
670 | acc_count=mailconf->readNumEntry("Accounts",0); | 670 | acc_count=mailconf->readNumEntry("Accounts",0); |
671 | 671 | ||
@@ -890,15 +890,23 @@ void EmailClient::setDownloadedSize(int size) | |||
890 | 890 | ||
891 | void EmailClient::deleteItem() | 891 | void EmailClient::deleteItem() |
892 | { | 892 | { |
893 | bool inbox=mailboxView->currentTab()==0; | 893 | bool inbox=mailboxView->currentTab()==0; |
894 | QListView* box; | ||
894 | 895 | ||
895 | EmailListItem* eli; | 896 | EmailListItem* eli; |
897 | int pos; | ||
898 | |||
899 | inbox ? box=inboxView : box=outboxView; | ||
896 | 900 | ||
897 | inbox ? eli=(EmailListItem*)inboxView->selectedItem():eli=(EmailListItem*)outboxView->selectedItem(); | 901 | eli=(EmailListItem*)box->selectedItem(); |
898 | 902 | ||
899 | if (eli) | 903 | if (eli) |
900 | deleteMail(eli,(bool&)inbox); | 904 | { |
905 | box->setSelected(eli->itemBelow(),true);//select the previous item | ||
906 | |||
907 | deleteMail(eli,(bool&)inbox); //remove mail entry | ||
908 | } | ||
901 | } | 909 | } |
902 | 910 | ||
903 | void EmailClient::inboxItemPressed() | 911 | void EmailClient::inboxItemPressed() |
904 | { | 912 | { |
@@ -938,44 +946,23 @@ Email* EmailClient::getCurrentMail() | |||
938 | else | 946 | else |
939 | return NULL; | 947 | return NULL; |
940 | } | 948 | } |
941 | 949 | ||
942 | /* | 950 | void EmailClient::download(Email* mail) |
943 | void EmailClient::reply() | ||
944 | { | ||
945 | Email* mail=getCurrentMail(); | ||
946 | |||
947 | if (mail!=NULL) | ||
948 | { | ||
949 | emit reply(*mail); | ||
950 | } | ||
951 | } | ||
952 | |||
953 | void EmailClient::replyAll() | ||
954 | { | ||
955 | Email* mail=getCurrentMail(); | ||
956 | |||
957 | if (mail!=NULL) | ||
958 | { | ||
959 | emit replyAll(*mail); | ||
960 | } | ||
961 | } | ||
962 | |||
963 | void EmailClient::forward() | ||
964 | { | 951 | { |
965 | Email* mail=getCurrentMail(); | 952 | MailAccount* acc=0; |
966 | 953 | ||
967 | if (mail!=NULL) | 954 | tempMailDownloadList.clear(); |
968 | { | 955 | tempMailDownloadList.sizeInsert(mail->serverId, mail->size); |
969 | emit reply(*mail); | 956 | if (accountList.count()>0) |
970 | } | 957 | qDebug("Accounts present"); |
958 | |||
959 | acc=accountList.at(mail->fromAccountId-1); | ||
960 | if (acc) | ||
961 | { | ||
962 | emailHandler->setAccount(*acc); | ||
963 | emailHandler->getMailByList(&tempMailDownloadList); | ||
964 | } | ||
965 | else | ||
966 | QMessageBox::warning(qApp->activeWindow(), | ||
967 | tr("No account associated"), tr("There is no active account \nassociated to this mail\n it can not be downloaded"), "Abort\n"); | ||
971 | } | 968 | } |
972 | |||
973 | void EmailClient::remove() | ||
974 | { | ||
975 | Email* mail=getCurrentMail(); | ||
976 | |||
977 | if (mail!=NULL) | ||
978 | { | ||
979 | emit remove(*mail); | ||
980 | } | ||
981 | }*/ | ||