author | zautrix <zautrix> | 2004-09-11 18:10:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 18:10:31 (UTC) |
commit | 53dda80aaab72d7efdbed8a206dc1fa64fed10ee (patch) (side-by-side diff) | |
tree | 23b5248145679628c0d346f7d42c53714634e1a3 | |
parent | 438403295657bdcab9ee9e526c6a08894e876f63 (diff) | |
download | kdepimpi-53dda80aaab72d7efdbed8a206dc1fa64fed10ee.zip kdepimpi-53dda80aaab72d7efdbed8a206dc1fa64fed10ee.tar.gz kdepimpi-53dda80aaab72d7efdbed8a206dc1fa64fed10ee.tar.bz2 |
progress fixes
-rw-r--r-- | kmicromail/imapconfigui.ui | 6 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/abstractmail.cpp | 11 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/imapwrapper.cpp | 5 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/pop3wrapper.cpp | 12 | ||||
-rw-r--r-- | kmicromail/mainwindow.cpp | 1 | ||||
-rw-r--r-- | kmicromail/pop3configui.ui | 6 |
6 files changed, 29 insertions, 12 deletions
diff --git a/kmicromail/imapconfigui.ui b/kmicromail/imapconfigui.ui index 2e4c9ca..d24c9ea 100644 --- a/kmicromail/imapconfigui.ui +++ b/kmicromail/imapconfigui.ui @@ -1,31 +1,31 @@ <!DOCTYPE UI><UI> <class>IMAPconfigUI</class> <widget> <class>QDialog</class> <property stdset="1"> <name>name</name> <cstring>IMAPconfigUI</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>306</width> - <height>396</height> + <width>269</width> + <height>388</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Configure IMAP</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <vbox> <property stdset="1"> <name>margin</name> <number>3</number> @@ -394,33 +394,33 @@ <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>CheckBoxDown</cstring> </property> <property stdset="1"> <name>text</name> - <string>Download only messages smaller</string> + <string>Get only messages smaller</string> </property> </widget> <widget> <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>SpinBoxDown</cstring> </property> <property stdset="1"> <name>suffix</name> <string>kB</string> </property> <property stdset="1"> <name>maxValue</name> <number>99999</number> </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 @@ -135,36 +135,38 @@ QString AbstractMail::defaultLocalfolder() QString AbstractMail::draftFolder() { return QString("Drafts"); } /* temporary - will be removed when implemented in all classes */ void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &) { } void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) { //qDebug("AbstractMail::deleteMailList:: Please reimplement! "); // this is currently re-implemented in pop3wrapper and imapwrapper int iii = 0; int count = target.count(); - QWidget wid; + QProgressBar wid ( count ); + wid.setCaption( tr("Deleting ...")); wid.show(); while (iii < count ) { Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); + wid.setProgress( iii ); wid.raise(); qApp->processEvents(); RecMailP mail = (*target.at( iii )); deleteMail(mail); ++iii; } } void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targetMail ) { //qDebug("AbstractMail::downloadNewMails %s ", fromFolder->getName().latin1()); // get local folder Account * acc = getAccount(); if ( !acc ) return; QString lfName = acc->getLocalFolder(); if ( lfName.isEmpty() ) @@ -224,37 +226,40 @@ void AbstractMail::mvcpAllMails(const FolderP&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb) { QValueList<RecMailP> t; listMessages(fromFolder->getName(),t, maxSizeInKb); mvcpMailList( t,targetFolder,targetWrapper,moveit); } void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { encodedString*st = 0; int iii = 0; int count = t.count(); if ( count == 0 ) return; // wel, processevents is qite strange, we need a widget for getting - // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displayed - QWidget wid; + // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displaye + + QProgressBar wid ( count ); + wid.setCaption( tr("Copying ...")); wid.show(); while (iii < count ) { Global::statusMessage(tr("Copy message %1 of %2").arg(iii).arg(count)); + wid.setProgress( iii ); wid.raise(); qApp->processEvents(); RecMailP r = (*t.at( iii )); st = fetchRawBody(r); if (st) { targetWrapper->storeMessage(st->Content(),st->Length(),targetFolder); delete st; } ++iii; } if (moveit) { deleteMailList( t ); //deleteAllMail(fromFolder); } } 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 @@ -931,36 +931,39 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) mailimap_flag_list*flist; mailimap_set *set; mailimap_store_att_flags * store_flags; int err; login(); //#endif if (!m_imap) { return; } int iii = 0; int count = target.count(); // qDebug("imap remove count %d ", count); mMax = count; //progress( tr("Delete")); - QWidget wid; + + QProgressBar wid ( count ); + wid.setCaption( tr("Deleting ...")); wid.show(); while (iii < count ) { Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); + wid.setProgress( iii ); wid.raise(); qApp->processEvents(); RecMailP mail = (*target.at( iii )); //#if 0 //qDebug("IMAP remove %d %d ", iii, mail->getNumber() ); err = selectMbox(mail->getMbox()); if ( err != MAILIMAP_NO_ERROR ) { return; } flist = mailimap_flag_list_new_empty(); mailimap_flag_list_add(flist,mailimap_flag_new_deleted()); store_flags = mailimap_store_att_flags_new_set_flags(flist); set = mailimap_set_new_single(mail->getNumber()); err = mailimap_store(m_imap,set,store_flags); mailimap_set_free( set ); mailimap_store_att_flags_free(store_flags); 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 @@ -187,36 +187,39 @@ void POP3wrapper::logout() QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); FolderP inb=new Folder("INBOX","/"); folders->append(inb); return folders; } void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) { login(); if (!m_pop3) return; int iii = 0; int count = target.count(); - QWidget wid; + + QProgressBar wid ( count ); + wid.setCaption( tr("Deleting ...")); wid.show(); while (iii < count ) { Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); + wid.setProgress( iii ); wid.raise(); qApp->processEvents(); //qDebug("delete "); RecMailP mail = (*target.at( iii )); int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber()); if (err != MAIL_NO_ERROR) { Global::statusMessage(tr("Error deleting mail")); } ++iii; } } void POP3wrapper::deleteMail(const RecMailP&mail) { login(); if (!m_pop3) return; int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber()); @@ -226,36 +229,41 @@ void POP3wrapper::deleteMail(const RecMailP&mail) { } void POP3wrapper::answeredMail(const RecMailP&) {} int POP3wrapper::deleteAllMail(const FolderP&) { login(); if (!m_pop3) return 0; int res = 1; uint32_t result = 0; int err = mailsession_messages_number(m_pop3->sto_session,NULL,&result); if (err != MAIL_NO_ERROR) { Global::statusMessage(tr("Error getting folder info")); return 0; } - QWidget wid; + + + + QProgressBar wid ( result ); + wid.setCaption( tr("Deleting ...")); wid.show(); for (unsigned int i = 0; i < result; ++i) { Global::statusMessage(tr("Delete message %1 of %2").arg(i).arg(result)); + wid.setProgress( i ); wid.raise(); qApp->processEvents(); err = mailsession_remove_message(m_pop3->sto_session,i+1); if (err != MAIL_NO_ERROR) { Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); res=0; } break; } return res; } void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) { login(); target_stat.message_count = 0; diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 5f777a3..d130317 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -143,32 +143,33 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) mailView->setSelectionMode( QListView::Extended ); QValueList<int> list; int fw = 100; if ( QApplication::desktop()->width() > 320 ) fw = 50; list.append( fw ); list.append( 100 ); split->setSizes( list ); QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); mailView->setShowSortIndicator ( true ); QLabel *spacer = new QLabel( toolBar ); spacer->setBackgroundMode( QWidget::PaletteButton ); toolBar->setStretchableWidget( spacer ); QAction* closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this); connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); + if ( QApplication::desktop()->width() > 320 ) closeMail->addTo(toolBar); closeMail->addTo(mailMenu); QPopupMenu* helpMenu = new QPopupMenu( menuBar ); menuBar->insertItem( tr( "Help" ), helpMenu ); QAction* li = new QAction(tr("About"), QPixmap(), 0, 0, this); connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); li->addTo(helpMenu); li = new QAction(tr("Licence"),QPixmap(), 0, 0, this); connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); li->addTo(helpMenu); li = new QAction(tr("LibEtPan Licence"), QPixmap(), 0, 0, this); connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); li->addTo(helpMenu); } diff --git a/kmicromail/pop3configui.ui b/kmicromail/pop3configui.ui index 6acd394..f1dda7a 100644 --- a/kmicromail/pop3configui.ui +++ b/kmicromail/pop3configui.ui @@ -1,31 +1,31 @@ <!DOCTYPE UI><UI> <class>POP3configUI</class> <widget> <class>QDialog</class> <property stdset="1"> <name>name</name> <cstring>POP3configUI</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>306</width> - <height>371</height> + <width>269</width> + <height>358</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Configure POP3</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <vbox> <property stdset="1"> <name>margin</name> <number>3</number> @@ -368,33 +368,33 @@ <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>CheckBoxDown</cstring> </property> <property stdset="1"> <name>text</name> - <string>Download only messages smaller</string> + <string>Get only messages smaller</string> </property> </widget> <widget> <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>SpinBoxDown</cstring> </property> <property stdset="1"> <name>suffix</name> <string>kB</string> </property> <property stdset="1"> <name>maxValue</name> <number>99999</number> </property> |