summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/imapconfigui.ui6
-rw-r--r--kmicromail/libmailwrapper/abstractmail.cpp13
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp5
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp12
-rw-r--r--kmicromail/mainwindow.cpp3
-rw-r--r--kmicromail/pop3configui.ui6
6 files changed, 31 insertions, 14 deletions
diff --git a/kmicromail/imapconfigui.ui b/kmicromail/imapconfigui.ui
index 2e4c9ca..d24c9ea 100644
--- a/kmicromail/imapconfigui.ui
+++ b/kmicromail/imapconfigui.ui
@@ -2,26 +2,26 @@
2<class>IMAPconfigUI</class> 2<class>IMAPconfigUI</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>IMAPconfigUI</cstring> 7 <cstring>IMAPconfigUI</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>306</width> 14 <width>269</width>
15 <height>396</height> 15 <height>388</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Configure IMAP</string> 20 <string>Configure IMAP</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
@@ -398,25 +398,25 @@
398 <property stdset="1"> 398 <property stdset="1">
399 <name>spacing</name> 399 <name>spacing</name>
400 <number>6</number> 400 <number>6</number>
401 </property> 401 </property>
402 <widget> 402 <widget>
403 <class>QCheckBox</class> 403 <class>QCheckBox</class>
404 <property stdset="1"> 404 <property stdset="1">
405 <name>name</name> 405 <name>name</name>
406 <cstring>CheckBoxDown</cstring> 406 <cstring>CheckBoxDown</cstring>
407 </property> 407 </property>
408 <property stdset="1"> 408 <property stdset="1">
409 <name>text</name> 409 <name>text</name>
410 <string>Download only messages smaller</string> 410 <string>Get only messages smaller</string>
411 </property> 411 </property>
412 </widget> 412 </widget>
413 <widget> 413 <widget>
414 <class>QSpinBox</class> 414 <class>QSpinBox</class>
415 <property stdset="1"> 415 <property stdset="1">
416 <name>name</name> 416 <name>name</name>
417 <cstring>SpinBoxDown</cstring> 417 <cstring>SpinBoxDown</cstring>
418 </property> 418 </property>
419 <property stdset="1"> 419 <property stdset="1">
420 <name>suffix</name> 420 <name>suffix</name>
421 <string>kB</string> 421 <string>kB</string>
422 </property> 422 </property>
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp
index 44878e0..8f67566 100644
--- a/kmicromail/libmailwrapper/abstractmail.cpp
+++ b/kmicromail/libmailwrapper/abstractmail.cpp
@@ -139,28 +139,30 @@ QString AbstractMail::draftFolder()
139} 139}
140 140
141/* temporary - will be removed when implemented in all classes */ 141/* temporary - will be removed when implemented in all classes */
142void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &) 142void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &)
143{ 143{
144} 144}
145void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) 145void AbstractMail::deleteMailList(const QValueList<RecMailP>&target)
146{ 146{
147 //qDebug("AbstractMail::deleteMailList:: Please reimplement! "); 147 //qDebug("AbstractMail::deleteMailList:: Please reimplement! ");
148 // this is currently re-implemented in pop3wrapper and imapwrapper 148 // this is currently re-implemented in pop3wrapper and imapwrapper
149 int iii = 0; 149 int iii = 0;
150 int count = target.count(); 150 int count = target.count();
151 QWidget wid; 151 QProgressBar wid ( count );
152 wid.setCaption( tr("Deleting ..."));
152 wid.show(); 153 wid.show();
153 while (iii < count ) { 154 while (iii < count ) {
154 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); 155 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
156 wid.setProgress( iii );
155 wid.raise(); 157 wid.raise();
156 qApp->processEvents(); 158 qApp->processEvents();
157 RecMailP mail = (*target.at( iii )); 159 RecMailP mail = (*target.at( iii ));
158 deleteMail(mail); 160 deleteMail(mail);
159 ++iii; 161 ++iii;
160 } 162 }
161} 163}
162 164
163void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targetMail ) 165void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targetMail )
164{ 166{
165 //qDebug("AbstractMail::downloadNewMails %s ", fromFolder->getName().latin1()); 167 //qDebug("AbstractMail::downloadNewMails %s ", fromFolder->getName().latin1());
166 // get local folder 168 // get local folder
@@ -228,29 +230,32 @@ void AbstractMail::mvcpAllMails(const FolderP&fromFolder,
228 mvcpMailList( t,targetFolder,targetWrapper,moveit); 230 mvcpMailList( t,targetFolder,targetWrapper,moveit);
229 231
230} 232}
231void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, 233void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t,
232 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) 234 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit)
233{ 235{
234 encodedString*st = 0; 236 encodedString*st = 0;
235 int iii = 0; 237 int iii = 0;
236 int count = t.count(); 238 int count = t.count();
237 if ( count == 0 ) 239 if ( count == 0 )
238 return; 240 return;
239 // wel, processevents is qite strange, we need a widget for getting 241 // wel, processevents is qite strange, we need a widget for getting
240 // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displayed 242 // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displaye
241 QWidget wid; 243
244 QProgressBar wid ( count );
245 wid.setCaption( tr("Copying ..."));
242 wid.show(); 246 wid.show();
243 while (iii < count ) { 247 while (iii < count ) {
244 Global::statusMessage(tr("Copy message %1 of %2").arg(iii).arg(count)); 248 Global::statusMessage(tr("Copy message %1 of %2").arg(iii).arg(count));
249 wid.setProgress( iii );
245 wid.raise(); 250 wid.raise();
246 qApp->processEvents(); 251 qApp->processEvents();
247 RecMailP r = (*t.at( iii )); 252 RecMailP r = (*t.at( iii ));
248 st = fetchRawBody(r); 253 st = fetchRawBody(r);
249 if (st) { 254 if (st) {
250 targetWrapper->storeMessage(st->Content(),st->Length(),targetFolder); 255 targetWrapper->storeMessage(st->Content(),st->Length(),targetFolder);
251 delete st; 256 delete st;
252 } 257 }
253 ++iii; 258 ++iii;
254 } 259 }
255 if (moveit) { 260 if (moveit) {
256 deleteMailList( t ); 261 deleteMailList( t );
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 91332c3..d79df4f 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -935,28 +935,31 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
935 login(); 935 login();
936 //#endif 936 //#endif
937 if (!m_imap) { 937 if (!m_imap) {
938 return; 938 return;
939 } 939 }
940 int iii = 0; 940 int iii = 0;
941 int count = target.count(); 941 int count = target.count();
942 // qDebug("imap remove count %d ", count); 942 // qDebug("imap remove count %d ", count);
943 943
944 944
945 mMax = count; 945 mMax = count;
946 //progress( tr("Delete")); 946 //progress( tr("Delete"));
947 QWidget wid; 947
948 QProgressBar wid ( count );
949 wid.setCaption( tr("Deleting ..."));
948 wid.show(); 950 wid.show();
949 while (iii < count ) { 951 while (iii < count ) {
950 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); 952 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
953 wid.setProgress( iii );
951 wid.raise(); 954 wid.raise();
952 qApp->processEvents(); 955 qApp->processEvents();
953 RecMailP mail = (*target.at( iii )); 956 RecMailP mail = (*target.at( iii ));
954 //#if 0 957 //#if 0
955 //qDebug("IMAP remove %d %d ", iii, mail->getNumber() ); 958 //qDebug("IMAP remove %d %d ", iii, mail->getNumber() );
956 err = selectMbox(mail->getMbox()); 959 err = selectMbox(mail->getMbox());
957 if ( err != MAILIMAP_NO_ERROR ) { 960 if ( err != MAILIMAP_NO_ERROR ) {
958 return; 961 return;
959 } 962 }
960 flist = mailimap_flag_list_new_empty(); 963 flist = mailimap_flag_list_new_empty();
961 mailimap_flag_list_add(flist,mailimap_flag_new_deleted()); 964 mailimap_flag_list_add(flist,mailimap_flag_new_deleted());
962 store_flags = mailimap_store_att_flags_new_set_flags(flist); 965 store_flags = mailimap_store_att_flags_new_set_flags(flist);
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp
index 1edec9e..9d52f52 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.cpp
+++ b/kmicromail/libmailwrapper/pop3wrapper.cpp
@@ -191,28 +191,31 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() {
191 FolderP inb=new Folder("INBOX","/"); 191 FolderP inb=new Folder("INBOX","/");
192 folders->append(inb); 192 folders->append(inb);
193 return folders; 193 return folders;
194} 194}
195 195
196void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) 196void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
197{ 197{
198 login(); 198 login();
199 if (!m_pop3) 199 if (!m_pop3)
200 return; 200 return;
201 int iii = 0; 201 int iii = 0;
202 int count = target.count(); 202 int count = target.count();
203 QWidget wid; 203
204 QProgressBar wid ( count );
205 wid.setCaption( tr("Deleting ..."));
204 wid.show(); 206 wid.show();
205 while (iii < count ) { 207 while (iii < count ) {
206 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); 208 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
209 wid.setProgress( iii );
207 wid.raise(); 210 wid.raise();
208 qApp->processEvents(); 211 qApp->processEvents();
209 //qDebug("delete "); 212 //qDebug("delete ");
210 RecMailP mail = (*target.at( iii )); 213 RecMailP mail = (*target.at( iii ));
211 int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber()); 214 int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber());
212 if (err != MAIL_NO_ERROR) { 215 if (err != MAIL_NO_ERROR) {
213 Global::statusMessage(tr("Error deleting mail")); 216 Global::statusMessage(tr("Error deleting mail"));
214 } 217 }
215 ++iii; 218 ++iii;
216 } 219 }
217} 220}
218void POP3wrapper::deleteMail(const RecMailP&mail) { 221void POP3wrapper::deleteMail(const RecMailP&mail) {
@@ -230,28 +233,33 @@ void POP3wrapper::answeredMail(const RecMailP&) {}
230int POP3wrapper::deleteAllMail(const FolderP&) { 233int POP3wrapper::deleteAllMail(const FolderP&) {
231 login(); 234 login();
232 if (!m_pop3) 235 if (!m_pop3)
233 return 0; 236 return 0;
234 int res = 1; 237 int res = 1;
235 238
236 uint32_t result = 0; 239 uint32_t result = 0;
237 int err = mailsession_messages_number(m_pop3->sto_session,NULL,&result); 240 int err = mailsession_messages_number(m_pop3->sto_session,NULL,&result);
238 if (err != MAIL_NO_ERROR) { 241 if (err != MAIL_NO_ERROR) {
239 Global::statusMessage(tr("Error getting folder info")); 242 Global::statusMessage(tr("Error getting folder info"));
240 return 0; 243 return 0;
241 } 244 }
242 QWidget wid; 245
246
247
248 QProgressBar wid ( result );
249 wid.setCaption( tr("Deleting ..."));
243 wid.show(); 250 wid.show();
244 for (unsigned int i = 0; i < result; ++i) { 251 for (unsigned int i = 0; i < result; ++i) {
245 Global::statusMessage(tr("Delete message %1 of %2").arg(i).arg(result)); 252 Global::statusMessage(tr("Delete message %1 of %2").arg(i).arg(result));
253 wid.setProgress( i );
246 wid.raise(); 254 wid.raise();
247 qApp->processEvents(); 255 qApp->processEvents();
248 256
249 err = mailsession_remove_message(m_pop3->sto_session,i+1); 257 err = mailsession_remove_message(m_pop3->sto_session,i+1);
250 if (err != MAIL_NO_ERROR) { 258 if (err != MAIL_NO_ERROR) {
251 Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); 259 Global::statusMessage(tr("Error deleting mail %1").arg(i+1));
252 res=0; 260 res=0;
253 } 261 }
254 break; 262 break;
255 } 263 }
256 return res; 264 return res;
257} 265}
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 5f777a3..d130317 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -147,25 +147,26 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
147 fw = 50; 147 fw = 50;
148 list.append( fw ); 148 list.append( fw );
149 list.append( 100 ); 149 list.append( 100 );
150 split->setSizes( list ); 150 split->setSizes( list );
151 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 151 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
152 mailView->setShowSortIndicator ( true ); 152 mailView->setShowSortIndicator ( true );
153 QLabel *spacer = new QLabel( toolBar ); 153 QLabel *spacer = new QLabel( toolBar );
154 spacer->setBackgroundMode( QWidget::PaletteButton ); 154 spacer->setBackgroundMode( QWidget::PaletteButton );
155 toolBar->setStretchableWidget( spacer ); 155 toolBar->setStretchableWidget( spacer );
156 156
157 QAction* closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this); 157 QAction* closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this);
158 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 158 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
159 closeMail->addTo(toolBar); 159 if ( QApplication::desktop()->width() > 320 )
160 closeMail->addTo(toolBar);
160 closeMail->addTo(mailMenu); 161 closeMail->addTo(mailMenu);
161 162
162 163
163 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 164 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
164 menuBar->insertItem( tr( "Help" ), helpMenu ); 165 menuBar->insertItem( tr( "Help" ), helpMenu );
165 QAction* li = new QAction(tr("About"), QPixmap(), 0, 0, this); 166 QAction* li = new QAction(tr("About"), QPixmap(), 0, 0, this);
166 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 167 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
167 li->addTo(helpMenu); 168 li->addTo(helpMenu);
168 li = new QAction(tr("Licence"),QPixmap(), 0, 0, this); 169 li = new QAction(tr("Licence"),QPixmap(), 0, 0, this);
169 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 170 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
170 li->addTo(helpMenu); 171 li->addTo(helpMenu);
171 li = new QAction(tr("LibEtPan Licence"), QPixmap(), 0, 0, this); 172 li = new QAction(tr("LibEtPan Licence"), QPixmap(), 0, 0, this);
diff --git a/kmicromail/pop3configui.ui b/kmicromail/pop3configui.ui
index 6acd394..f1dda7a 100644
--- a/kmicromail/pop3configui.ui
+++ b/kmicromail/pop3configui.ui
@@ -2,26 +2,26 @@
2<class>POP3configUI</class> 2<class>POP3configUI</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>POP3configUI</cstring> 7 <cstring>POP3configUI</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>306</width> 14 <width>269</width>
15 <height>371</height> 15 <height>358</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Configure POP3</string> 20 <string>Configure POP3</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
@@ -372,25 +372,25 @@
372 <property stdset="1"> 372 <property stdset="1">
373 <name>spacing</name> 373 <name>spacing</name>
374 <number>6</number> 374 <number>6</number>
375 </property> 375 </property>
376 <widget> 376 <widget>
377 <class>QCheckBox</class> 377 <class>QCheckBox</class>
378 <property stdset="1"> 378 <property stdset="1">
379 <name>name</name> 379 <name>name</name>
380 <cstring>CheckBoxDown</cstring> 380 <cstring>CheckBoxDown</cstring>
381 </property> 381 </property>
382 <property stdset="1"> 382 <property stdset="1">
383 <name>text</name> 383 <name>text</name>
384 <string>Download only messages smaller</string> 384 <string>Get only messages smaller</string>
385 </property> 385 </property>
386 </widget> 386 </widget>
387 <widget> 387 <widget>
388 <class>QSpinBox</class> 388 <class>QSpinBox</class>
389 <property stdset="1"> 389 <property stdset="1">
390 <name>name</name> 390 <name>name</name>
391 <cstring>SpinBoxDown</cstring> 391 <cstring>SpinBoxDown</cstring>
392 </property> 392 </property>
393 <property stdset="1"> 393 <property stdset="1">
394 <name>suffix</name> 394 <name>suffix</name>
395 <string>kB</string> 395 <string>kB</string>
396 </property> 396 </property>