summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/pop3wrapper.cpp
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper/pop3wrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp49
1 files changed, 12 insertions, 37 deletions
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp
index f430121..8d2f778 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.cpp
+++ b/kmicromail/libmailwrapper/pop3wrapper.cpp
@@ -128,2 +128,3 @@ void POP3wrapper::login()
128 if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { 128 if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) {
129 qApp->processEvents();
129 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); 130 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true );
@@ -132,3 +133,2 @@ void POP3wrapper::login()
132 // ok 133 // ok
133 qDebug("ok ");
134 user = login.getUser(); 134 user = login.getUser();
@@ -167,3 +167,3 @@ void POP3wrapper::login()
167 ; // odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl; 167 ; // odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl;
168 Global::statusMessage(tr("Error initializing folder")); 168 Global::statusMessage(tr("Error %1 initializing folder").arg( err ));
169 mailstorage_free(m_pop3); 169 mailstorage_free(m_pop3);
@@ -202,20 +202,7 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
202 int count = target.count(); 202 int count = target.count();
203 QProgressBar bar( count,0 ); 203 QWidget wid;
204 bar.setCaption (("Removing mails - close to abort!") ); 204 wid.show();
205 int w = 300;
206 if ( QApplication::desktop()->width() < 320 )
207 w = 220;
208 int h = bar.sizeHint().height() ;
209 int dw = QApplication::desktop()->width();
210 int dh = QApplication::desktop()->height();
211 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
212 bar.show();
213 int modulo = (count/10)+1;
214 int incCounter = 0;
215 while (iii < count ) { 205 while (iii < count ) {
216 if ( ! bar.isVisible() ) 206 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
217 return ; 207 wid.raise();
218 if ( incCounter % modulo == 0 )
219 bar.setProgress( incCounter );
220 ++incCounter;
221 qApp->processEvents(); 208 qApp->processEvents();
@@ -254,21 +241,9 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
254 } 241 }
255 QProgressBar bar( result,0 ); 242 QWidget wid;
256 bar.setCaption (("Deleting mails - close to abort!") ); 243 wid.show();
257 int w = 300; 244 for (unsigned int i = 0; i < result; ++i) {
258 if ( QApplication::desktop()->width() < 320 ) 245 Global::statusMessage(tr("Delete message %1 of %2").arg(i).arg(result));
259 w = 220; 246 wid.raise();
260 int h = bar.sizeHint().height() ;
261 int dw = QApplication::desktop()->width();
262 int dh = QApplication::desktop()->height();
263 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
264 bar.show();
265 int modulo = (result/10)+1;
266 int incCounter = 0;
267 for (unsigned int i = 0; i < result; ++i) {
268 if ( ! bar.isVisible() )
269 return 0;
270 if ( incCounter % modulo == 0 )
271 bar.setProgress( incCounter );
272 ++incCounter;
273 qApp->processEvents(); 247 qApp->processEvents();
248
274 err = mailsession_remove_message(m_pop3->sto_session,i+1); 249 err = mailsession_remove_message(m_pop3->sto_session,i+1);