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) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/emailclient.cpp | 65 |
1 files changed, 26 insertions, 39 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 | |||
@@ -363,5 +363,5 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) | |||
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 | } |
@@ -481,9 +481,9 @@ void EmailClient::allMailArrived(int count) | |||
481 | progressBar->reset(); | 481 | progressBar->reset(); |
482 | 482 | ||
483 | //emailHandler->getMailByList(&mailDownloadList); | ||
484 | 483 | ||
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 | { |
@@ -665,5 +665,5 @@ QString EmailClient::getPath(bool enclosurePath) | |||
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"); |
@@ -892,11 +892,19 @@ 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 | ||
@@ -940,42 +948,21 @@ Email* EmailClient::getCurrentMail() | |||
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 | { | 951 | { |
949 | emit reply(*mail); | 952 | MailAccount* acc=0; |
950 | } | ||
951 | } | ||
952 | 953 | ||
953 | void EmailClient::replyAll() | 954 | tempMailDownloadList.clear(); |
954 | { | 955 | tempMailDownloadList.sizeInsert(mail->serverId, mail->size); |
955 | Email* mail=getCurrentMail(); | 956 | if (accountList.count()>0) |
957 | qDebug("Accounts present"); | ||
956 | 958 | ||
957 | if (mail!=NULL) | 959 | acc=accountList.at(mail->fromAccountId-1); |
960 | if (acc) | ||
958 | { | 961 | { |
959 | emit replyAll(*mail); | 962 | emailHandler->setAccount(*acc); |
960 | } | 963 | emailHandler->getMailByList(&tempMailDownloadList); |
961 | } | 964 | } |
962 | 965 | else | |
963 | void EmailClient::forward() | 966 | QMessageBox::warning(qApp->activeWindow(), |
964 | { | 967 | tr("No account associated"), tr("There is no active account \nassociated to this mail\n it can not be downloaded"), "Abort\n"); |
965 | Email* mail=getCurrentMail(); | ||
966 | |||
967 | if (mail!=NULL) | ||
968 | { | ||
969 | emit reply(*mail); | ||
970 | } | ||
971 | } | ||
972 | |||
973 | void EmailClient::remove() | ||
974 | { | ||
975 | Email* mail=getCurrentMail(); | ||
976 | |||
977 | if (mail!=NULL) | ||
978 | { | ||
979 | emit remove(*mail); | ||
980 | } | 968 | } |
981 | }*/ | ||