summaryrefslogtreecommitdiffabout
path: root/kmicromail/accountitem.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/accountitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/accountitem.cpp22
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
@@ -89,17 +89,18 @@ QPopupMenu * POP3viewItem::getContextMenu()
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()
@@ -134,12 +135,14 @@ void POP3viewItem::contextMenuSelected(int which)
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());
@@ -510,16 +513,20 @@ QPopupMenu * IMAPviewItem::getContextMenu()
{
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()
@@ -567,12 +574,25 @@ void IMAPviewItem::contextMenuSelected(int id)
}
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&)