summaryrefslogtreecommitdiffabout
path: root/kmicromail/accountitem.cpp
authorzautrix <zautrix>2004-09-16 15:13:40 (UTC)
committer zautrix <zautrix>2004-09-16 15:13:40 (UTC)
commit02e7ae4983679a787834277176a031286a8310c2 (patch) (unidiff)
treeea7e33e59b86b8fed2b033609d1018a9f245baff /kmicromail/accountitem.cpp
parent68b1f3bce4b6e89bb343b965256537d93e63f7be (diff)
downloadkdepimpi-02e7ae4983679a787834277176a031286a8310c2.zip
kdepimpi-02e7ae4983679a787834277176a031286a8310c2.tar.gz
kdepimpi-02e7ae4983679a787834277176a031286a8310c2.tar.bz2
Foldername fixes
Diffstat (limited to 'kmicromail/accountitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp
index 59c8abb..12d047a 100644
--- a/kmicromail/accountitem.cpp
+++ b/kmicromail/accountitem.cpp
@@ -474,49 +474,49 @@ void IMAPviewItem::refreshFolders(bool force)
474 for ( it = folders->begin(); it!=folders->end(); ++it) 474 for ( it = folders->begin(); it!=folders->end(); ++it)
475 { 475 {
476 if ((*it)->getDisplayName().lower()=="inbox") 476 if ((*it)->getDisplayName().lower()=="inbox")
477 { 477 {
478 item = new IMAPfolderItem( (*it), this , item ); 478 item = new IMAPfolderItem( (*it), this , item );
479 folders->remove(it); 479 folders->remove(it);
480 break; 480 break;
481 } 481 }
482 } 482 }
483 for ( it = folders->begin(); it!=folders->end(); ++it) 483 for ( it = folders->begin(); it!=folders->end(); ++it)
484 { 484 {
485 fname = (*it)->getDisplayName(); 485 fname = (*it)->getDisplayName();
486 currentFolders.append((*it)->getName()); 486 currentFolders.append((*it)->getName());
487 pos = fname.findRev((*it)->Separator()); 487 pos = fname.findRev((*it)->Separator());
488 if (pos != -1) 488 if (pos != -1)
489 { 489 {
490 fname = fname.left(pos); 490 fname = fname.left(pos);
491 } 491 }
492 IMAPfolderItem*pitem = (IMAPfolderItem*)findSubItem(fname); 492 IMAPfolderItem*pitem = (IMAPfolderItem*)findSubItem(fname);
493 if (pitem) 493 if (pitem)
494 { 494 {
495 titem = item; 495 titem = item;
496 item = new IMAPfolderItem( (*it),pitem,pitem->firstChild(),this); 496 item = new IMAPfolderItem( (*it),pitem,pitem->firstChild(),this);
497 /* setup the short name */ 497 /* setup the short name */
498 item->setText(0,(*it)->getDisplayName().right((*it)->getDisplayName().length()-pos-1)); 498 item->setText(0,(*it)->getDisplayName().mid(pos+1));
499 item = titem; 499 item = titem;
500 } 500 }
501 else 501 else
502 { 502 {
503 item = new IMAPfolderItem( (*it), this , item ); 503 item = new IMAPfolderItem( (*it), this , item );
504 } 504 }
505 } 505 }
506 delete folders; 506 delete folders;
507} 507}
508 508
509QPopupMenu * IMAPviewItem::getContextMenu() 509QPopupMenu * IMAPviewItem::getContextMenu()
510{ 510{
511 QPopupMenu *m = new QPopupMenu(0); 511 QPopupMenu *m = new QPopupMenu(0);
512 if (m) 512 if (m)
513 { 513 {
514 if (!account->getOffline()) 514 if (!account->getOffline())
515 { 515 {
516 m->insertItem(QObject::tr("Refresh folder list",contextName),0); 516 m->insertItem(QObject::tr("Refresh folder list",contextName),0);
517 m->insertItem(QObject::tr("Create new folder",contextName),1); 517 m->insertItem(QObject::tr("Create new folder",contextName),1);
518 m->insertSeparator(); 518 m->insertSeparator();
519 m->insertItem(QObject::tr("Disconnect",contextName),2); 519 m->insertItem(QObject::tr("Disconnect",contextName),2);
520 m->insertItem(QObject::tr("Set offline",contextName),3); 520 m->insertItem(QObject::tr("Set offline",contextName),3);
521 m->insertSeparator(); 521 m->insertSeparator();
522 m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); 522 m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);