author | zautrix <zautrix> | 2004-09-11 16:44:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 16:44:49 (UTC) |
commit | 06be094df4e34cc41db113d8c0e78eccde5365b5 (patch) (side-by-side diff) | |
tree | b99317f9c83886d05b83cdb49e066f414e0fde25 | |
parent | 53e10fa5e66620ff1eba1c9d17738103ad511c91 (diff) | |
download | kdepimpi-06be094df4e34cc41db113d8c0e78eccde5365b5.zip kdepimpi-06be094df4e34cc41db113d8c0e78eccde5365b5.tar.gz kdepimpi-06be094df4e34cc41db113d8c0e78eccde5365b5.tar.bz2 |
Mail more useful
-rw-r--r-- | kmicromail/accountitem.cpp | 14 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/imapwrapper.cpp | 4 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/mhwrapper.cpp | 2 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/settings.cpp | 4 | ||||
-rw-r--r-- | kmicromail/mainwindow.cpp | 7 | ||||
-rw-r--r-- | kmicromail/mainwindow.h | 1 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 10 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 1 |
8 files changed, 28 insertions, 15 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index 7b9b881..59c8abb 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp @@ -17,4 +17,6 @@ #include <kiconloader.h> +#define GET_NEW_MAILS 101 + using namespace Opie::Core; #define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} @@ -93,10 +95,10 @@ QPopupMenu * POP3viewItem::getContextMenu() m->insertItem(QObject::tr("Disconnect",contextName),0); m->insertItem(QObject::tr("Set offline",contextName),1); - m->insertItem(QObject::tr("Download new INBOX messages",contextName),2); + m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); } else { m->insertItem(QObject::tr("Set online",contextName),1); - m->insertItem(QObject::tr("Download new INBOX messages",contextName),2); + m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); } } @@ -138,5 +140,5 @@ void POP3viewItem::contextMenuSelected(int which) setOnOffline(); break; - case 2: // daunlood + case GET_NEW_MAILS: // daunlood if (account->getOffline()) setOnOffline(); @@ -518,5 +520,5 @@ QPopupMenu * IMAPviewItem::getContextMenu() m->insertItem(QObject::tr("Set offline",contextName),3); m->insertSeparator(); - m->insertItem(QObject::tr("Download new INBOX messages",contextName),4); + m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); } else @@ -524,5 +526,5 @@ QPopupMenu * IMAPviewItem::getContextMenu() m->insertItem(QObject::tr("Set online",contextName),3); m->insertSeparator(); - m->insertItem(QObject::tr("Download new INBOX messages",contextName),4); + m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); } } @@ -578,5 +580,5 @@ void IMAPviewItem::contextMenuSelected(int id) refreshFolders(false); break; - case 4: // daunlood + case GET_NEW_MAILS: // daunlood { if (account->getOffline()) { diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index 5441a9b..91332c3 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp @@ -172,5 +172,5 @@ void IMAPwrapper::login() if ( ssl ) { - qDebug("using ssl "); + //qDebug("using ssl "); err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port ); } else { @@ -1248,5 +1248,5 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, progress( tr("Copy")); AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit, maxSizeInKb); - qDebug("IMAPwrapper::mvcpAllMails::Using generic"); + //qDebug("IMAPwrapper::mvcpAllMails::Using generic"); // odebug << "Using generic" << oendl; return; diff --git a/kmicromail/libmailwrapper/mhwrapper.cpp b/kmicromail/libmailwrapper/mhwrapper.cpp index 962dac0..641d4d9 100644 --- a/kmicromail/libmailwrapper/mhwrapper.cpp +++ b/kmicromail/libmailwrapper/mhwrapper.cpp @@ -66,5 +66,4 @@ MHwrapper::~MHwrapper() void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) { - qDebug("MHwrapper::listMessages "); init_storage(); if (!m_storage) { @@ -195,5 +194,4 @@ int MHwrapper::createMbox(const QString&folder,const FolderP&pfolder,const QStri return 0; } - qDebug("Folder created "); return 1; } diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp index 766eba0..40b5591 100644 --- a/kmicromail/libmailwrapper/settings.cpp +++ b/kmicromail/libmailwrapper/settings.cpp @@ -27,5 +27,4 @@ Settings::Settings() void Settings::checkDirectory() { - qDebug("Settings::checkDirectory() "); return; locateLocal("data", "kopiemail" ); @@ -211,5 +210,4 @@ void IMAPaccount::read() QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); leaveOnServer = conf->readBoolEntry("LeaveOnServer",false); - qDebug("reading last fetch: %d ", lf); if ( lf < 0 ) lf = 0; lastFetch = dt.addSecs( lf ); @@ -219,5 +217,5 @@ void IMAPaccount::read() void IMAPaccount::save() { - qDebug("saving %s ",getFileName().latin1() ); + Settings::checkDirectory(); diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 21edfd2..5f777a3 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -36,5 +36,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) toolBar->setHorizontalStretchable( true ); - + QAction* getMail = new QAction( tr( "Get new mail" ), 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"), diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index 680f0a9..ff0ff20 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h @@ -42,4 +42,5 @@ protected slots: virtual void refreshMailView(const QValueList<RecMailP>&); virtual void displayMail(); + virtual void slotGetMail() = 0; virtual void slotDeleteMail(); virtual void mailHold(int, QListViewItem *,const QPoint&,int); diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index b2119e6..19ffdb3 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -10,4 +10,5 @@ #include "selectstore.h" #include "selectsmtp.h" +#include "accountitem.h" #include <qmessagebox.h> @@ -245,5 +246,12 @@ void OpieMail::displayMail() } } - +void OpieMail::slotGetMail() +{ + QListViewItem * item = folderView->currentItem(); + if ( ! item ) return; + while ( item->parent () ) + item = item->parent (); + ((AccountViewItem *)item)->contextMenuSelected( 101 ); +} void OpieMail::slotDeleteMail() { diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index 1de5f6b..e054b9e 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h @@ -31,4 +31,5 @@ protected slots: virtual void displayMail(); virtual void slotDeleteMail(); + virtual void slotGetMail(); virtual void slotDeleteAllMail(); virtual void mailHold(int, QListViewItem *,const QPoint&,int); |