-rw-r--r-- | kmicromail/libmailwrapper/abstractmail.cpp | 2 | ||||
-rw-r--r-- | kmicromail/mainwindow.cpp | 2 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp index 88545f8..673f288 100644 --- a/kmicromail/libmailwrapper/abstractmail.cpp +++ b/kmicromail/libmailwrapper/abstractmail.cpp @@ -160,76 +160,78 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) 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() ) lfName = acc->getAccountName(); // create local folder if ( !targetMail->createMbox(lfName)) { QMessageBox::critical(0,tr("Error creating new Folder"), tr("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName)); return; } QValueList<RecMailP> t; listMessages(fromFolder->getName(),t,acc->getMaxMailSize() ); if ( t.count() == 0 ) { + qDebug("There are no new messages %s", fromFolder->getName().latin1()); Global::statusMessage(tr("There are no new messages")); return; } QValueList<RecMailP> e; targetMail->listMessages(lfName,e,acc->getMaxMailSize() ); //qDebug("target has mails %d ", e.count()); QValueList<RecMailP> n; int iii = 0; int count = t.count(); while (iii < count ) { RecMailP r = (*t.at( iii )); bool found = false; int jjj = 0; int countE = e.count(); while (jjj < countE ) { RecMailP re = (*e.at( jjj )); if ( re->isEqual(r) ) { found = true; break; } ++jjj; } if ( !found ) { //qDebug("AAAdate *%s* ", r->isodate.latin1() ); n.append( r ); } ++iii; } + qDebug("Downloaded %d messages ",n.count() ); if ( n.count() == 0 ) { Global::statusMessage(tr("There are no new messages")); return; } mvcpMailList( n,lfName,targetMail,!acc->getLeaveOnServer()); Global::statusMessage(tr("Downloaded %1 messages").arg(n.count())); #if 0 QValueList<RecMailP> t; listMessages(fromFolder->getName(),t, maxSizeInKb); mvcpMailList( t,targetFolder,targetWrapper,moveit); #endif } 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) diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 2a67e39..ddded2a 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -13,49 +13,49 @@ #include <qpe/qpeapplication.h> #endif #include "defines.h" #include "mainwindow.h" #include <KDGanttMinimizeSplitter.h> #include <kabc/stdaddressbook.h> MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) : QMainWindow( parent, name ) //, flags ) { setCaption( tr( "KOpieMail/Pi" ) ); setToolBarsMovable( false ); //KABC::StdAddressBook::self(); toolBar = new QToolBar( this ); menuBar = new QPEMenuBar( toolBar ); mailMenu = new QPopupMenu( menuBar ); menuBar->insertItem( tr( "Mail" ), mailMenu ); settingsMenu = new QPopupMenu( menuBar ); menuBar->insertItem( tr( "Settings" ), settingsMenu ); addToolBar( toolBar ); toolBar->setHorizontalStretchable( true ); - QAction* getMail = new QAction( tr( "Get all new mails" ), SmallIcon("add"), + QAction* getMail = new QAction( tr( "Get all new mails" ), SmallIcon("enter"), 0, 0, this ); connect(getMail, SIGNAL( activated() ), SLOT( slotGetAllMail() ) ); getMail->addTo( mailMenu ); getMail = new QAction( tr( "Get new messages" ), SmallIcon("add"), 0, 0, this ); getMail->addTo( toolBar ); getMail->addTo( mailMenu ); connect(getMail, SIGNAL( activated() ), SLOT( slotGetMail() ) ); composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"), 0, 0, this ); composeMail->addTo( toolBar ); composeMail->addTo( mailMenu ); sendQueued = new QAction( tr( "Send queued mails" ), SmallIcon("sendqueued") , 0, 0, this ); sendQueued->addTo( toolBar ); sendQueued->addTo( mailMenu ); /* syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 3cbac8e..9a1a750 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -244,50 +244,48 @@ void OpieMail::displayMail() readMail.showMaximized(); readMail.exec(); if ( readMail.deleted ) { folderView->refreshCurrent(); } else { ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); } } void OpieMail::slotGetAllMail() { QListViewItem * item = folderView->firstChild(); while ( item ){ ((AccountViewItem *)item)->contextMenuSelected( 101 ); item = item->nextSibling (); } } void OpieMail::slotGetMail() { QListViewItem * item = folderView->currentItem(); if ( ! item ) return; - while ( item->parent () ) - item = item->parent (); ((AccountViewItem *)item)->contextMenuSelected( 101 ); } void OpieMail::slotDeleteMail() { if (!mailView->currentItem()) return; RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { mail->Wrapper()->deleteMail( mail ); folderView->refreshCurrent(); } } void OpieMail::slotDeleteAllMail() { QValueList<RecMailP> t; if ( QMessageBox::warning(this, tr("Delete All Mails"), tr("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); while ( item ) { if ( item->isSelected() ) { t.append( item->data() ); } item = (MailListViewItem*)item->nextSibling(); |