author | cniehaus <cniehaus> | 2003-05-17 18:17:11 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2003-05-17 18:17:11 (UTC) |
commit | 982d7a64a7526379fc0f3b0ae64fdcce430775ff (patch) (side-by-side diff) | |
tree | fedd5d50bb4cdfd923a9deb09e8cd6c19f8b2e31 | |
parent | 325096fb28d129429b17a781c4c1e8d6ca9aa585 (diff) | |
download | opie-982d7a64a7526379fc0f3b0ae64fdcce430775ff.zip opie-982d7a64a7526379fc0f3b0ae64fdcce430775ff.tar.gz opie-982d7a64a7526379fc0f3b0ae64fdcce430775ff.tar.bz2 |
ported to HEAD
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 2201960..9f21245 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -184,69 +184,78 @@ void AdvancedFm::doDelete() ,tr("Yes"),tr("No"),0,0,1) ) { case 0: doMsg=false; break; case 1: return; break; }; } QString myFile; for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { myFile = (*it); if( myFile.find(" -> ",0,TRUE) != -1) myFile = myFile.left( myFile.find(" -> ",0,TRUE)); QString f = CurrentDir()->canonicalPath(); if(f.right(1).find("/",0,TRUE) == -1) f += "/"; f += myFile; if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) //if file is a directory { - switch ( QMessageBox::warning( this, tr("Delete Directory?"), tr("Really delete\n") + f + - "\nand all it's contents ?" - ,tr("Yes"),tr("No"),0,0,1) ) + switch ( QMessageBox::warning( this, tr("Delete Directory?"), + tr("Really delete %1\nand all it's contents ?" ).arg( f ) , + tr("Yes"), + tr("No"), + 0, + 0, + 1) ) { case 0: { f=f.left(f.length()-1); QString cmd="rm -rf "+f; startProcess( (const QString)cmd.latin1() ); populateView(); } break; case 1: // exit break; }; } else { if(doMsg) { - switch ( QMessageBox::warning(this,tr("Delete"),tr("Really delete\n")+f - +" ?",tr("Yes"),tr("No"),0,0,1) ) { + switch ( QMessageBox::warning(this,tr("Delete"), + tr("Really delete\n%1?").arg( f ), + tr("Yes"), + tr("No"), + 0, + 0, + 1) ) { case 1: return; break; }; } QString cmd="rm "+f; QFile file(f); if(QFileInfo(myFile).fileName().find("../",0,TRUE)==-1) { qDebug("remove link files "+f); // AppLnk lnk(f); // qDebug(lnk.linkFile()); // lnk.removeLinkFile(); file.remove(); } } } } populateView(); } void AdvancedFm::filePerms() { QStringList curFileList = getPath(); QString filePath; |