summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/pop3wrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
index 3cfd1ee..2d66fc9 100644
--- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
@@ -9,2 +9,3 @@
#include <qfile.h>
+#include <qmessagebox.h>
@@ -20,2 +21,4 @@ POP3wrapper::POP3wrapper( POP3account *a )
last_msg_id = 0;
+ m_maxsize = account->getMaxSize();
+ m_checksize = account->getCheckMaxSize();
}
@@ -31,3 +34,3 @@ POP3wrapper::~POP3wrapper() {
void POP3wrapper::pop3_progress( size_t current, size_t maximum ) {
- odebug << "POP3: " << current << " of " << maximum << "" << oendl;
+ odebug << "POP3: " << current << " of " << maximum << "" << oendl;
}
@@ -47,5 +50,9 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) {
mailmessage * mailmsg;
- if (mail->Msgsize()>HARD_MSG_SIZE_LIMIT) {
- odebug << "Message to large: " << mail->Msgsize() << "" << oendl;
- return body;
+ if (mail->Msgsize()/1024>m_maxsize && m_checksize && mail->getNumber()!=last_msg_id) {
+ QString quest = QString(tr("Download mail?\nIt is %1 kByte but your limit is %2 kByte")).arg(mail->Msgsize()/1024).arg(m_maxsize);
+ int yesno = QMessageBox::warning(0,tr("Download message"),
+ quest,tr("Yes"),tr("No"),QString::null,0,1);
+ odebug << "Message to large: " << mail->Msgsize() << "" << oendl;
+ if (yesno==1)
+ return body;
}
@@ -133,3 +140,3 @@ void POP3wrapper::login()
// cancel
- odebug << "POP3: Login canceled" << oendl;
+ odebug << "POP3: Login canceled" << oendl;
return;
@@ -165,3 +172,3 @@ void POP3wrapper::login()
if (err != MAIL_NO_ERROR) {
- odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl;
+ odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl;
Global::statusMessage(tr("Error initializing folder"));
@@ -239,3 +246,3 @@ void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) {
if (r != MAIL_NO_ERROR) {
- odebug << "error getting folter status." << oendl;
+ odebug << "error getting folter status." << oendl;
}