author | groucho <groucho> | 2003-04-28 08:31:24 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-28 08:31:24 (UTC) |
commit | 63d3f7ca039d93612abaa4a65fc00b337c42ec9d (patch) (side-by-side diff) | |
tree | ea4a08e00d5a229f20c3e4150f707a2ac8f9e882 /noncore/net/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/net/mailit/emailclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/emailclient.cpp | 75 |
1 files changed, 31 insertions, 44 deletions
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp index 23059cf..dff1888 100644 --- a/noncore/net/mailit/emailclient.cpp +++ b/noncore/net/mailit/emailclient.cpp @@ -364,3 +364,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) - newMail.fromAccountId = currentAccount->id; + newMail.fromAccountId = emailHandler->getAccount()->id; mailconf->writeEntry("fromaccountid", newMail.fromAccountId); @@ -482,4 +482,3 @@ void EmailClient::allMailArrived(int count) - //emailHandler->getMailByList(&mailDownloadList); - + mailboxView->setCurrentTab(0); @@ -487,2 +486,3 @@ void EmailClient::allMailArrived(int count) + void EmailClient::moveMailFront(Email *mailPtr) @@ -666,3 +666,3 @@ void EmailClient::readSettings() { - int y,acc_count, accountPos=0; + int y,acc_count; @@ -893,9 +893,17 @@ void EmailClient::deleteItem() bool inbox=mailboxView->currentTab()==0; + QListView* box; EmailListItem* eli; + int pos; + + inbox ? box=inboxView : box=outboxView; - inbox ? eli=(EmailListItem*)inboxView->selectedItem():eli=(EmailListItem*)outboxView->selectedItem(); + eli=(EmailListItem*)box->selectedItem(); if (eli) - deleteMail(eli,(bool&)inbox); + { + box->setSelected(eli->itemBelow(),true); //select the previous item + + deleteMail(eli,(bool&)inbox); //remove mail entry + } } @@ -941,41 +949,20 @@ Email* EmailClient::getCurrentMail() -/* -void EmailClient::reply() -{ - Email* mail=getCurrentMail(); - - if (mail!=NULL) - { - emit reply(*mail); - } -} - -void EmailClient::replyAll() -{ - Email* mail=getCurrentMail(); - - if (mail!=NULL) - { - emit replyAll(*mail); - } -} - -void EmailClient::forward() +void EmailClient::download(Email* mail) { - Email* mail=getCurrentMail(); - - if (mail!=NULL) - { - emit reply(*mail); - } + MailAccount* acc=0; + + tempMailDownloadList.clear(); + tempMailDownloadList.sizeInsert(mail->serverId, mail->size); + if (accountList.count()>0) + qDebug("Accounts present"); + + acc=accountList.at(mail->fromAccountId-1); + if (acc) + { + emailHandler->setAccount(*acc); + emailHandler->getMailByList(&tempMailDownloadList); + } + else + QMessageBox::warning(qApp->activeWindow(), + tr("No account associated"), tr("There is no active account \nassociated to this mail\n it can not be downloaded"), "Abort\n"); } - -void EmailClient::remove() -{ - Email* mail=getCurrentMail(); - - if (mail!=NULL) - { - emit remove(*mail); - } -}*/ |