author | zautrix <zautrix> | 2004-09-11 15:41:30 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 15:41:30 (UTC) |
commit | 32f9963a39236d08718a36d5adad2a0c5c4e2602 (patch) (side-by-side diff) | |
tree | 8856a90d505df8dc3afa0d72541f27cb68913a0d /kmicromail/accountitem.cpp | |
parent | d7a273f40838f56205c1377ed0bcc5457bd46ea3 (diff) | |
download | kdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.zip kdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.tar.gz kdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.tar.bz2 |
Mail enhancements
-rw-r--r-- | kmicromail/accountitem.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index 1698b40..7b9b881 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp @@ -87,21 +87,22 @@ QPopupMenu * POP3viewItem::getContextMenu() { QPopupMenu *m = new QPopupMenu(0); if (m) { if (!account->getOffline()) { m->insertItem(QObject::tr("Disconnect",contextName),0); m->insertItem(QObject::tr("Set offline",contextName),1); - m->insertItem(QObject::tr("Download messages",contextName),2); + m->insertItem(QObject::tr("Download new INBOX messages",contextName),2); } else { m->insertItem(QObject::tr("Set online",contextName),1); + m->insertItem(QObject::tr("Download new INBOX messages",contextName),2); } } return m; } void POP3viewItem::disconnect() { QListViewItem *child = firstChild(); @@ -132,16 +133,18 @@ void POP3viewItem::contextMenuSelected(int which) { case 0: disconnect(); break; case 1: setOnOffline(); break; case 2: // daunlood + if (account->getOffline()) + setOnOffline(); AccountView*bl = accountView(); if (!bl) return; AccountViewItem* in = findSubItem( "inbox" , 0); if ( ! in ) return; bl->downloadMailsInbox(in->getFolder() ,getWrapper()); setOnOffline(); break; @@ -508,20 +511,24 @@ QPopupMenu * IMAPviewItem::getContextMenu() { if (!account->getOffline()) { m->insertItem(QObject::tr("Refresh folder list",contextName),0); m->insertItem(QObject::tr("Create new folder",contextName),1); m->insertSeparator(); m->insertItem(QObject::tr("Disconnect",contextName),2); m->insertItem(QObject::tr("Set offline",contextName),3); + m->insertSeparator(); + m->insertItem(QObject::tr("Download new INBOX messages",contextName),4); } else { m->insertItem(QObject::tr("Set online",contextName),3); + m->insertSeparator(); + m->insertItem(QObject::tr("Download new INBOX messages",contextName),4); } } return m; } void IMAPviewItem::createNewFolder() { Newmdirdlg ndirdlg; @@ -565,16 +572,29 @@ void IMAPviewItem::contextMenuSelected(int id) removeChilds(); wrapper->logout(); } account->setOffline(!account->getOffline()); account->save(); SETPIX(PIXMAP_IMAPFOLDER); refreshFolders(false); break; + case 4: // daunlood + { + if (account->getOffline()) { + contextMenuSelected( 3 ); + } + AccountView*bl = accountView(); + if (!bl) return; + AccountViewItem* in = findSubItem( "inbox" , 0); + if ( ! in ) + return; + bl->downloadMailsInbox(in->getFolder(),getWrapper()); + } + break; default: break; } } RECBODYP IMAPviewItem::fetchBody(const RecMailP&) { return new RecBody(); |