author | zautrix <zautrix> | 2004-09-11 08:56:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 08:56:57 (UTC) |
commit | 0f45c977d7530b6ca827b7a7c7da7469f01800ca (patch) (side-by-side diff) | |
tree | 0368bbd4865a0b21bb197cfd0a190fd0c2cd9242 /kmicromail/accountitem.cpp | |
parent | 1b41a0e3bf63364940daf132446939e3570c57ad (diff) | |
download | kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.zip kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.gz kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.bz2 |
More config changes
-rw-r--r-- | kmicromail/accountitem.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index d0321ef..1698b40 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp @@ -83,24 +83,25 @@ RECBODYP POP3viewItem::fetchBody( const RecMailP &mail ) return wrapper->fetchBody( mail ); } 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); } else { m->insertItem(QObject::tr("Set online",contextName),1); } } return m; } void POP3viewItem::disconnect() { QListViewItem *child = firstChild(); @@ -126,24 +127,33 @@ void POP3viewItem::setOnOffline() } void POP3viewItem::contextMenuSelected(int which) { switch (which) { case 0: disconnect(); break; case 1: setOnOffline(); break; + case 2: // daunlood + AccountView*bl = accountView(); + if (!bl) return; + AccountViewItem* in = findSubItem( "inbox" , 0); + if ( ! in ) + return; + bl->downloadMailsInbox(in->getFolder() ,getWrapper()); + setOnOffline(); + break; } } POP3folderItem::~POP3folderItem() {} POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , QListViewItem*after ) : AccountViewItem(folderInit,parent,after ) { pop3 = parent; if (folder->getDisplayName().lower()!="inbox") { @@ -1096,25 +1106,25 @@ void AccountViewItem::removeChilds() QListViewItem *child = firstChild(); while ( child ) { QListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } } bool AccountViewItem::matchName(const QString&name)const { if (!folder) return false; - return folder->getDisplayName()==name; + return folder->getDisplayName().lower()==name.lower(); } AccountViewItem*AccountViewItem::findSubItem(const QString&path,AccountViewItem*start) { AccountViewItem*pitem,*sitem; if (!start) pitem = (AccountViewItem*)firstChild(); else pitem = (AccountViewItem*)start->firstChild(); while (pitem) { if (pitem->matchName(path)) { |