summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp
index 4869df8..10db2c6 100644
--- a/noncore/net/mail/accountitem.cpp
+++ b/noncore/net/mail/accountitem.cpp
@@ -870,97 +870,97 @@ void MHviewItem::contextMenuSelected(int which)
870 break; 870 break;
871 case FOLDER_MENU_REFRESH_HEADER: 871 case FOLDER_MENU_REFRESH_HEADER:
872 view = (AccountView*)listView(); 872 view = (AccountView*)listView();
873 if (view) view->refreshCurrent(); 873 if (view) view->refreshCurrent();
874 break; 874 break;
875 default: 875 default:
876 break; 876 break;
877 } 877 }
878} 878}
879 879
880MHfolderItem::~MHfolderItem() 880MHfolderItem::~MHfolderItem()
881{} 881{}
882 882
883MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after ) 883MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after )
884 : AccountViewItem(folderInit, parent,after ) 884 : AccountViewItem(folderInit, parent,after )
885{ 885{
886 mbox = parent; 886 mbox = parent;
887 initName(); 887 initName();
888} 888}
889 889
890MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master) 890MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master)
891 : AccountViewItem(folderInit, parent,after ) 891 : AccountViewItem(folderInit, parent,after )
892{ 892{
893 folder = folderInit; 893 folder = folderInit;
894 mbox = master; 894 mbox = master;
895 initName(); 895 initName();
896} 896}
897 897
898void MHfolderItem::initName() 898void MHfolderItem::initName()
899{ 899{
900 QString bName = folder->getDisplayName(); 900 QString bName = folder->getDisplayName();
901 if (bName.startsWith("/")&&bName.length()>1) 901 if (bName.startsWith("/")&&bName.length()>1)
902 { 902 {
903 bName.replace(0,1,""); 903 bName.replace(0,1,"");
904 } 904 }
905 int pos = bName.findRev("/"); 905 int pos = bName.findRev("/");
906 if (pos > 0) 906 if (pos > 0)
907 { 907 {
908 bName.replace(0,pos+1,""); 908 bName.replace(0,pos+1,"");
909 } 909 }
910 if (bName.lower() == "outgoing") 910 if (bName.lower() == "outgoing")
911 { 911 {
912 setPixmap( 0, PIXMAP_OUTBOXFOLDER ); 912 setPixmap( 0, PIXMAP_OUTBOXFOLDER );
913 } 913 }
914 else if (bName.lower() == "inbox") 914 else if (bName.lower() == "inbox")
915 { 915 {
916 setPixmap( 0, PIXMAP_INBOXFOLDER); 916 setPixmap( 0, PIXMAP_INBOXFOLDER);
917 } else if (bName.lower() == "drafts") { 917 } else if (bName.lower() == "drafts") {
918 setPixmap(0, Resource::loadPixmap("inline/edit")); 918 setPixmap(0, Resource::loadPixmap("edit"));
919 } else { 919 } else {
920 setPixmap( 0, PIXMAP_MBOXFOLDER ); 920 setPixmap( 0, PIXMAP_MBOXFOLDER );
921 } 921 }
922 setText( 0, bName ); 922 setText( 0, bName );
923} 923}
924 924
925const FolderP&MHfolderItem::getFolder()const 925const FolderP&MHfolderItem::getFolder()const
926{ 926{
927 return folder; 927 return folder;
928} 928}
929 929
930void MHfolderItem::refresh(QValueList<RecMailP>&target) 930void MHfolderItem::refresh(QValueList<RecMailP>&target)
931{ 931{
932 if (folder->may_select()) 932 if (folder->may_select())
933 mbox->getWrapper()->listMessages( folder->getName(),target ); 933 mbox->getWrapper()->listMessages( folder->getName(),target );
934} 934}
935 935
936RECBODYP MHfolderItem::fetchBody(const RecMailP&aMail) 936RECBODYP MHfolderItem::fetchBody(const RecMailP&aMail)
937{ 937{
938 return mbox->getWrapper()->fetchBody(aMail); 938 return mbox->getWrapper()->fetchBody(aMail);
939} 939}
940 940
941void MHfolderItem::deleteFolder() 941void MHfolderItem::deleteFolder()
942{ 942{
943 int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName), 943 int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName),
944 QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()), 944 QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()),
945 QObject::tr("Yes",contextName), 945 QObject::tr("Yes",contextName),
946 QObject::tr("No",contextName),QString::null,1,1); 946 QObject::tr("No",contextName),QString::null,1,1);
947 odebug << "Auswahl: " << yesno << "" << oendl; 947 odebug << "Auswahl: " << yesno << "" << oendl;
948 if (yesno == 0) 948 if (yesno == 0)
949 { 949 {
950 if (mbox->getWrapper()->deleteMbox(folder)) 950 if (mbox->getWrapper()->deleteMbox(folder))
951 { 951 {
952 QListView*v=listView(); 952 QListView*v=listView();
953 MHviewItem * box = mbox; 953 MHviewItem * box = mbox;
954 /* be carefull - after that this object is destroyd so don't use 954 /* be carefull - after that this object is destroyd so don't use
955 * any member of it after that call!!*/ 955 * any member of it after that call!!*/
956 mbox->refresh(true); 956 mbox->refresh(true);
957 if (v) 957 if (v)
958 { 958 {
959 v->setSelected(box,true); 959 v->setSelected(box,true);
960 } 960 }
961 } 961 }
962 } 962 }
963} 963}
964 964
965QPopupMenu * MHfolderItem::getContextMenu() 965QPopupMenu * MHfolderItem::getContextMenu()
966{ 966{