summaryrefslogtreecommitdiffabout
path: root/kmicromail/accountitem.cpp
Unidiff
Diffstat (limited to 'kmicromail/accountitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountitem.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp
index 7b9b881..59c8abb 100644
--- a/kmicromail/accountitem.cpp
+++ b/kmicromail/accountitem.cpp
@@ -13,12 +13,14 @@
13 13
14/* QT */ 14/* QT */
15#include <qpopupmenu.h> 15#include <qpopupmenu.h>
16#include <qmessagebox.h> 16#include <qmessagebox.h>
17#include <kiconloader.h> 17#include <kiconloader.h>
18 18
19#define GET_NEW_MAILS 101
20
19using namespace Opie::Core; 21using namespace Opie::Core;
20#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} 22#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );}
21/** 23/**
22 * POP3 Account stuff 24 * POP3 Account stuff
23 */ 25 */
24POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent ) 26POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent )
@@ -89,18 +91,18 @@ QPopupMenu * POP3viewItem::getContextMenu()
89 if (m) 91 if (m)
90 { 92 {
91 if (!account->getOffline()) 93 if (!account->getOffline())
92 { 94 {
93 m->insertItem(QObject::tr("Disconnect",contextName),0); 95 m->insertItem(QObject::tr("Disconnect",contextName),0);
94 m->insertItem(QObject::tr("Set offline",contextName),1); 96 m->insertItem(QObject::tr("Set offline",contextName),1);
95 m->insertItem(QObject::tr("Download new INBOX messages",contextName),2); 97 m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
96 } 98 }
97 else 99 else
98 { 100 {
99 m->insertItem(QObject::tr("Set online",contextName),1); 101 m->insertItem(QObject::tr("Set online",contextName),1);
100 m->insertItem(QObject::tr("Download new INBOX messages",contextName),2); 102 m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
101 } 103 }
102 } 104 }
103 return m; 105 return m;
104} 106}
105 107
106void POP3viewItem::disconnect() 108void POP3viewItem::disconnect()
@@ -134,13 +136,13 @@ void POP3viewItem::contextMenuSelected(int which)
134 case 0: 136 case 0:
135 disconnect(); 137 disconnect();
136 break; 138 break;
137 case 1: 139 case 1:
138 setOnOffline(); 140 setOnOffline();
139 break; 141 break;
140 case 2: // daunlood 142 case GET_NEW_MAILS: // daunlood
141 if (account->getOffline()) 143 if (account->getOffline())
142 setOnOffline(); 144 setOnOffline();
143 AccountView*bl = accountView(); 145 AccountView*bl = accountView();
144 if (!bl) return; 146 if (!bl) return;
145 AccountViewItem* in = findSubItem( "inbox" , 0); 147 AccountViewItem* in = findSubItem( "inbox" , 0);
146 if ( ! in ) 148 if ( ! in )
@@ -514,19 +516,19 @@ QPopupMenu * IMAPviewItem::getContextMenu()
514 m->insertItem(QObject::tr("Refresh folder list",contextName),0); 516 m->insertItem(QObject::tr("Refresh folder list",contextName),0);
515 m->insertItem(QObject::tr("Create new folder",contextName),1); 517 m->insertItem(QObject::tr("Create new folder",contextName),1);
516 m->insertSeparator(); 518 m->insertSeparator();
517 m->insertItem(QObject::tr("Disconnect",contextName),2); 519 m->insertItem(QObject::tr("Disconnect",contextName),2);
518 m->insertItem(QObject::tr("Set offline",contextName),3); 520 m->insertItem(QObject::tr("Set offline",contextName),3);
519 m->insertSeparator(); 521 m->insertSeparator();
520 m->insertItem(QObject::tr("Download new INBOX messages",contextName),4); 522 m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
521 } 523 }
522 else 524 else
523 { 525 {
524 m->insertItem(QObject::tr("Set online",contextName),3); 526 m->insertItem(QObject::tr("Set online",contextName),3);
525 m->insertSeparator(); 527 m->insertSeparator();
526 m->insertItem(QObject::tr("Download new INBOX messages",contextName),4); 528 m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
527 } 529 }
528 } 530 }
529 return m; 531 return m;
530} 532}
531 533
532void IMAPviewItem::createNewFolder() 534void IMAPviewItem::createNewFolder()
@@ -574,13 +576,13 @@ void IMAPviewItem::contextMenuSelected(int id)
574 } 576 }
575 account->setOffline(!account->getOffline()); 577 account->setOffline(!account->getOffline());
576 account->save(); 578 account->save();
577 SETPIX(PIXMAP_IMAPFOLDER); 579 SETPIX(PIXMAP_IMAPFOLDER);
578 refreshFolders(false); 580 refreshFolders(false);
579 break; 581 break;
580 case 4: // daunlood 582 case GET_NEW_MAILS: // daunlood
581 { 583 {
582 if (account->getOffline()) { 584 if (account->getOffline()) {
583 contextMenuSelected( 3 ); 585 contextMenuSelected( 3 );
584 } 586 }
585 AccountView*bl = accountView(); 587 AccountView*bl = accountView();
586 if (!bl) return; 588 if (!bl) return;