author | cniehaus <cniehaus> | 2002-12-27 10:59:15 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-12-27 10:59:15 (UTC) |
commit | 6ca8a429b121dbbdbbfbde453cd2cd1412315aa8 (patch) (side-by-side diff) | |
tree | a3b824d3c9b574fb43a554a43f1d21de3eb7bb83 | |
parent | 3565b57b9346db47693287162c5794a4d4d8b568 (diff) | |
download | opie-6ca8a429b121dbbdbbfbde453cd2cd1412315aa8.zip opie-6ca8a429b121dbbdbbfbde453cd2cd1412315aa8.tar.gz opie-6ca8a429b121dbbdbbfbde453cd2cd1412315aa8.tar.bz2 |
i18n fix
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index a6b59c7..98d024d 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -393,204 +393,202 @@ void AdvancedFm::filePerms() { filePermissions *filePerm; filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it)); filePerm->showMaximized(); filePerm->exec(); if( filePerm) delete filePerm; } if (TabWidget->getCurrentTab() == 0) { populateLocalView(); } else { populateRemoteView(); } } void AdvancedFm::doProperties() { #if defined(QT_QWS_OPIE) QStringList curFileList = getPath(); QString filePath; if (TabWidget->getCurrentTab() == 0) { filePath = currentDir.canonicalPath()+"/"; } else { filePath= currentRemoteDir.canonicalPath()+"/"; } qDebug("%d",curFileList.count()); for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { qDebug((filePath+*it)); DocLnk lnk( (filePath+*it)); LnkProperties prop( &lnk ); prop.showMaximized(); prop.exec(); } #endif } void AdvancedFm::upDir() { if (TabWidget->getCurrentTab() == 0) { QString current = currentDir.canonicalPath(); QDir dir(current); dir.cdUp(); current = dir.canonicalPath(); chdir( current.latin1() ); currentDir.cd( current, TRUE); populateLocalView(); update(); } else { QString current = currentRemoteDir.canonicalPath(); QDir dir(current); dir.cdUp(); current = dir.canonicalPath(); chdir( current.latin1() ); currentRemoteDir.cd( current, TRUE); populateRemoteView(); update(); } } void AdvancedFm::copy() { qApp->processEvents(); QStringList curFileList = getPath(); bool doMsg=true; int count=curFileList.count(); if( count > 0) { if(count > 1 ){ QString msg; msg=tr("Really copy\n%1 files?").arg(count); switch ( QMessageBox::warning(this,tr("Delete"),msg ,tr("Yes"),tr("No"),0,0,1) ) { case 0: doMsg=false; break; case 1: return; break; }; } QString curFile, item, destFile; if (TabWidget->getCurrentTab() == 0) { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { item=(*it); if(item.find("->",0,TRUE)) //symlink item = item.left(item.find("->",0,TRUE)); destFile = currentRemoteDir.canonicalPath()+"/"+ item; qDebug("Destination file is "+destFile); curFile = currentDir.canonicalPath()+"/"+ item; qDebug("CurrentFile file is " + curFile); QFile f(destFile); if( f.exists()) { if(doMsg) { - switch ( QMessageBox::warning(this,tr("File Exists!"), - item+tr("\nexists. Ok to overwrite?"), - tr("Yes"),tr("No"),0,0,1) ) { + switch ( QMessageBox::warning(this,tr("File Exists!"), tr("%1 exists. Ok to overwrite?").arg( item ), tr("Yes"),tr("No"),0,0,1) ) { case 1: return; break; }; } f.remove(); } if(!copyFile( curFile, destFile) ) { - QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); + QMessageBox::message("AdvancedFm",tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) ); return; } } populateRemoteView(); TabWidget->setCurrentTab(1); } else { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { item= (*it); if(item.find("->",0,TRUE)) //symlink item = item.left(item.find("->",0,TRUE)); destFile = currentDir.canonicalPath()+"/"+ item; qDebug("Destination file is "+destFile); curFile = currentRemoteDir.canonicalPath()+"/"+ item;; qDebug("CurrentFile file is " + curFile); QFile f(destFile); if( f.exists()) { switch ( QMessageBox::warning(this,tr("File Exists!"), item+tr("\nexists. Ok to overwrite?"), tr("Yes"),tr("No"),0,0,1) ) { case 1: return; break; }; f.remove(); } if(!copyFile( curFile, destFile) ) { QMessageBox::message("AdvancedFm",tr("Could not copy\n") +curFile +tr("to\n")+destFile); return; } } populateLocalView(); TabWidget->setCurrentTab(0); } } } void AdvancedFm::copyAs() { qApp->processEvents(); QStringList curFileList = getPath(); QString curFile, item; InputDialog *fileDlg; if (TabWidget->getCurrentTab() == 0) { qDebug("tab 1"); for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { QString destFile; item=(*it); curFile = currentDir.canonicalPath()+"/"+(*it); fileDlg = new InputDialog( this,tr("Copy "+curFile+" As"), TRUE, 0); fileDlg->setInputText((const QString &) destFile ); fileDlg->exec(); if( fileDlg->result() == 1 ) { QString filename = fileDlg->LineEdit1->text(); destFile = currentRemoteDir.canonicalPath()+"/"+filename; QFile f(destFile); if( f.exists()) { switch (QMessageBox::warning(this,tr("File Exists!"), item+tr("\nexists. Ok to overwrite?"), tr("Yes"),tr("No"),0,0,1) ) { case 0: f.remove(); break; case 1: return; break; }; } if(!copyFile( curFile,destFile) ) { QMessageBox::message("AdvancedFm",tr("Could not copy\n") +curFile +tr("to\n")+destFile); return; } } delete fileDlg; } populateRemoteView(); TabWidget->setCurrentTab(1); } else { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { item=(*it); curFile = currentRemoteDir.canonicalPath()+"/"+(*it); fileDlg = new InputDialog( this,tr("Copy "+curFile+" As"), TRUE, 0); |