author | zautrix <zautrix> | 2004-09-10 19:57:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-10 19:57:55 (UTC) |
commit | cebdd6de7481514ad5ea0517f7a2e8f4db422be5 (patch) (unidiff) | |
tree | 0b29859b5bbfdcb702724c3b0c721f22b0d0e666 /kmicromail/libmailwrapper/abstractmail.cpp | |
parent | 157120031b77a3d9f10d780a66b6441dac1399fa (diff) | |
download | kdepimpi-cebdd6de7481514ad5ea0517f7a2e8f4db422be5.zip kdepimpi-cebdd6de7481514ad5ea0517f7a2e8f4db422be5.tar.gz kdepimpi-cebdd6de7481514ad5ea0517f7a2e8f4db422be5.tar.bz2 |
Added status info when deleting mails
Diffstat (limited to 'kmicromail/libmailwrapper/abstractmail.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/abstractmail.cpp | 49 |
1 files changed, 11 insertions, 38 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp index cef4e97..f876235 100644 --- a/kmicromail/libmailwrapper/abstractmail.cpp +++ b/kmicromail/libmailwrapper/abstractmail.cpp | |||
@@ -7,2 +7,3 @@ | |||
7 | #include "mailtypes.h" | 7 | #include "mailtypes.h" |
8 | #include <qpe/global.h> | ||
8 | 9 | ||
@@ -148,20 +149,7 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) | |||
148 | int count = target.count(); | 149 | int count = target.count(); |
149 | QProgressBar bar( count,0 ); | 150 | QWidget wid; |
150 | bar.setCaption (("Removing mails - close to abort!") ); | 151 | wid.show(); |
151 | int w = 300; | ||
152 | if ( QApplication::desktop()->width() < 320 ) | ||
153 | w = 220; | ||
154 | int h = bar.sizeHint().height() ; | ||
155 | int dw = QApplication::desktop()->width(); | ||
156 | int dh = QApplication::desktop()->height(); | ||
157 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | ||
158 | bar.show(); | ||
159 | int modulo = (count/10)+1; | ||
160 | int incCounter = 0; | ||
161 | while (iii < count ) { | 152 | while (iii < count ) { |
162 | if ( ! bar.isVisible() ) | 153 | Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); |
163 | return ; | 154 | wid.raise(); |
164 | if ( incCounter % modulo == 0 ) | ||
165 | bar.setProgress( incCounter ); | ||
166 | ++incCounter; | ||
167 | qApp->processEvents(); | 155 | qApp->processEvents(); |
@@ -188,24 +176,10 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, | |||
188 | return; | 176 | return; |
189 | 177 | // wel, processevents is qite strange, we need a widget for getting | |
190 | QProgressBar bar( count,0 ); | 178 | // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displayed |
191 | bar.setCaption (("Copying mails - close to abort!") ); | 179 | QWidget wid; |
192 | int w = 300; | 180 | wid.show(); |
193 | if ( QApplication::desktop()->width() < 320 ) | ||
194 | w = 220; | ||
195 | int h = bar.sizeHint().height() ; | ||
196 | int dw = QApplication::desktop()->width(); | ||
197 | int dh = QApplication::desktop()->height(); | ||
198 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | ||
199 | bar.show(); | ||
200 | int modulo = (count/10)+1; | ||
201 | int incCounter = 0; | ||
202 | while (iii < count ) { | 181 | while (iii < count ) { |
203 | if ( ! bar.isVisible() ) | 182 | Global::statusMessage(tr("Copy message %1 of %2").arg(iii).arg(count)); |
204 | return ; | 183 | wid.raise(); |
205 | if ( incCounter % modulo == 0 ) | ||
206 | bar.setProgress( incCounter ); | ||
207 | ++incCounter; | ||
208 | bar.raise(); | ||
209 | qApp->processEvents(); | 184 | qApp->processEvents(); |
210 | //qDebug("copy "); | ||
211 | RecMailP r = (*t.at( iii )); | 185 | RecMailP r = (*t.at( iii )); |
@@ -218,3 +192,2 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, | |||
218 | } | 192 | } |
219 | bar.hide(); | ||
220 | if (moveit) { | 193 | if (moveit) { |