author | llornkcor <llornkcor> | 2002-07-21 12:52:23 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-21 12:52:23 (UTC) |
commit | 81110ef9240a746a1267ac26fee3cb3e878933b1 (patch) (side-by-side diff) | |
tree | 93c1c8fb5ded75d5c7c385d5846727874a87bbd2 /noncore/apps | |
parent | edeab5f635166d88eee8135d982602a241240f40 (diff) | |
download | opie-81110ef9240a746a1267ac26fee3cb3e878933b1.zip opie-81110ef9240a746a1267ac26fee3cb3e878933b1.tar.gz opie-81110ef9240a746a1267ac26fee3cb3e878933b1.tar.bz2 |
tr changes
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 114 |
1 files changed, 59 insertions, 55 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index f97ae99..d0ccc3f 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -1216,25 +1216,25 @@ void AdvancedFm::copy() switch ( QMessageBox::warning(this,tr("Delete"), destFile+tr(" already exists\nDo you really want to delete it?"), tr("Yes"),tr("No"),0,0,1) ) { case 0: f.remove(); break; case 1: return; break; }; } if(!copyFile(destFile, curFile) ) { - QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); + QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); qWarning("nothin doing"); } } populateLocalView(); TabWidget->setCurrentPage(0); } } } void AdvancedFm::copyAs() { @@ -1261,25 +1261,25 @@ void AdvancedFm::copyAs() switch (QMessageBox::warning(this,tr("Delete"), destFile+tr(" already exists\nDo you really want to delete it?"), tr("Yes"),tr("No"),0,0,1) ) { case 0: f.remove(); break; case 1: return; break; }; } if(!copyFile(destFile, curFile) ) { - QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); + QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); qWarning("nothin doing"); } } } populateRemoteView(); TabWidget->setCurrentPage(1); } else { if (TabWidget->currentPageIndex() == 0) { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { curFile = currentDir.canonicalPath()+"/"+(*it); QString destFile; @@ -1294,25 +1294,25 @@ void AdvancedFm::copyAs() switch ( QMessageBox::warning(this,tr("Delete"), destFile+tr(" already exists\nDo you really want to delete it?"), tr("Yes"),tr("No"),0,0,1) ) { case 0: f.remove(); break; case 1: return; break; }; } if(!copyFile(destFile, curFile) ) { - QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); + QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); qWarning("nothin doing"); } } } populateLocalView(); TabWidget->setCurrentPage(0); } } } } @@ -1342,25 +1342,25 @@ void AdvancedFm::copySameDir() { destFile+tr(" already exists\nDo you really want to delete it?"), tr("Yes"),tr("No"),0,0,1) ) { case 0: qDebug(""); f.remove(); break; case 1: return; break; }; } if(!copyFile(destFile, curFile) ) { - QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); + QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); qWarning("nothin doing"); } qDebug("copy "+curFile+" as "+destFile); } delete fileDlg; } populateRemoteView(); TabWidget->setCurrentPage(1); } else { if (TabWidget->currentPageIndex() == 0) { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { @@ -1379,25 +1379,25 @@ void AdvancedFm::copySameDir() { switch ( QMessageBox::warning(this,tr("Delete"), destFile+tr(" already exists\nDo you really want to delete it?"), tr("Yes"),tr("No"),0,0,1) ) { case 0: f.remove(); break; case 1: return; break; }; } if(!copyFile(destFile, curFile) ) { - QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); + QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); qWarning("nothin doing"); } qDebug("copy "+curFile+" as "+destFile); } delete fileDlg; } populateLocalView(); TabWidget->setCurrentPage(0); } } } @@ -1427,25 +1427,25 @@ void AdvancedFm::move() { if( f.exists()) { switch (QMessageBox::warning(this,tr("Delete"), destFile+tr(" already exists\nDo you really want to delete it?"), tr("Yes"),tr("No"),0,0,1) ) { case 0: f.remove(); break; case 1: return; break; }; if(!copyFile( destFile, curFile) ) { - QMessageBox::message(tr("Note"),tr("Could not move\n"+curFile)); + QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); return; } QFile::remove(curFile); } } TabWidget->setCurrentPage(1); } else { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { QString destFile = currentRemoteDir.canonicalPath(); if(destFile.right(1).find("/",0,TRUE) == -1) destFile+="/"; destFile +=(*it); @@ -1459,25 +1459,25 @@ void AdvancedFm::move() { if( f.exists()) { switch (QMessageBox::warning(this,tr("Delete"), destFile+tr(" already exists\nDo you really want to delete it?"), tr("Yes"),tr("No"),0,0,1) ) { case 0: f.remove(); break; case 1: return; break; }; if(!copyFile(destFile, curFile) ) { - QMessageBox::message(tr("Note"),tr("Could not move\n"+curFile)); + QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); return; } } QFile::remove(curFile); TabWidget->setCurrentPage(0); } } populateRemoteView(); populateLocalView(); } } @@ -1536,25 +1536,25 @@ void AdvancedFm::runCommand() { outDlg = new Output(this, tr("AdvancedFm Output"),FALSE); outDlg->showMaximized(); outDlg->show(); qApp->processEvents(); FILE *fp; char line[130]; sleep(1); // if(command.find("2>",0,TRUE) != -1) command +=" 2>&1"; fp = popen( (const char *) command, "r"); if ( !fp ) { qDebug("Could not execute '" + command + "'! err=%d", fp); - QMessageBox::warning( this, tr("AdvancedFm"), tr("command failed!"), tr("&OK") ); + QMessageBox::warning( this, "AdvancedFm", tr("command failed!"), tr("&OK") ); pclose(fp); return; } else { while ( fgets( line, sizeof line, fp)) { QString lineStr = line; lineStr=lineStr.left(lineStr.length()-1); outDlg->OutputEdit->append(lineStr); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); } } } } @@ -1592,25 +1592,25 @@ void AdvancedFm::fileStatus() { // int err=0; Output *outDlg; outDlg = new Output(this, tr("AdvancedFm Output"),FALSE); outDlg->showMaximized(); outDlg->show(); qApp->processEvents(); FILE *fp; char line[130]; sleep(1); fp = popen( (const char *) command, "r"); if ( !fp ) { qDebug("Could not execute '" + command + "'! err=%d", fp); - QMessageBox::warning( this, tr("AdvancedFm"), tr("command failed!"), tr("&OK") ); + QMessageBox::warning( this, "AdvancedFm", tr("command failed!"), tr("&OK") ); pclose(fp); return; } else { while ( fgets( line, sizeof line, fp)) { outDlg->OutputEdit->append(line); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); } } } @@ -1629,28 +1629,28 @@ void AdvancedFm::rn() { remoteRename(); } void AdvancedFm::del() { if (TabWidget->currentPageIndex() == 0) localDelete(); else remoteDelete(); } void AdvancedFm::doAbout() { - QMessageBox::message("AdvancedFm","Advanced FileManager\n" + QMessageBox::message("AdvancedFm",tr("Advanced FileManager\n" "is copyright 2002 by\n" "L.J.Potter<llornkcor@handhelds.org>\n" - "and is licensed by the GPL"); + "and is licensed by the GPL")); } void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { if( TabWidget->hasFocus()) switch ( e->key() ) { case Key_Delete: del(); break; case Key_H: showHidden(); break; @@ -1793,24 +1793,27 @@ QString AdvancedFm::getFileSystemType(const QString ¤tText) { for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) { QString temp = (*it); QString path = temp.left(temp.find("::",0,TRUE) ); path = path.right( path.length()-1); if(path.isEmpty()) baseFs = temp.right( temp.length() - temp.find("::",0,TRUE) - 2); if( current.find( path,0,TRUE) != -1 && !path.isEmpty()) { return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); } } return baseFs; } +QString AdvancedFm::getDiskSpace( const QString &) { + +} void AdvancedFm::doBeam() { Ir ir; if(!ir.supported()){ } else { QStringList curFileList = getPath(); if( curFileList.count() > 0) { if (TabWidget->currentPageIndex() == 0) { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { @@ -1859,89 +1862,90 @@ void AdvancedFm::showFileMenu() { bool isLocalView = false; if (TabWidget->currentPageIndex() == 0) { isLocalView = TRUE; curApp = Local_View->currentItem()->text(0); } else { curApp = Remote_View->currentItem()->text(0); } MimeType mt( curApp ); const AppLnk* app = mt.application(); QFile fi(curApp); -// QPopupMenu m; + // QPopupMenu m; QPopupMenu *m = new QPopupMenu(0); m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); m->insertSeparator(); if ( QFileInfo(fi).isDir() ) { m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); } else { if ( app ) m->insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( runThis() ) ); else if( QFileInfo(fi).isExecutable() ) m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) ); m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); } - m->insertSeparator(); + m->insertSeparator(); - if(isLocalView) - m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); - else - m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); + if(isLocalView) + m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); + else + m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); - m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); - m->insertSeparator(); + m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); + m->insertSeparator(); - if(isLocalView) - m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); - else - m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); + if(isLocalView) + m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); + else + m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); + + m->insertItem( tr( "Copy" ), this, SLOT( copy() )); + m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); + m->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); + m->insertItem( tr( "Move" ), this, SLOT( move() )); + m->insertSeparator(); - m->insertItem( tr( "Copy" ), this, SLOT( copy() )); - m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); - m->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); - m->insertItem( tr( "Move" ), this, SLOT( move() )); - m->insertSeparator(); + if(isLocalView) + m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); + else + m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); - if(isLocalView) - m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); - else - m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); + m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); + m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); + m->insertSeparator(); - m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); - m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); - m->insertSeparator(); + if(isLocalView) + m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); + else + m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); - if(isLocalView) - m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); - else - m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); - - m->insertSeparator(); - m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); - if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings - m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); - m->setCheckable(TRUE); - if (!b) - m->setItemChecked(m->idAt(0),TRUE); - else - m->setItemChecked(m->idAt(0),FALSE); - if(Ir::supported()) - m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); - m->setFocus(); - m->exec( QCursor::pos() ); - sleep(1); - if(m) delete m; + m->insertSeparator(); + m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); + + if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings + m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); + m->setCheckable(TRUE); + if (!b) + m->setItemChecked(m->idAt(0),TRUE); + else + m->setItemChecked(m->idAt(0),FALSE); + if(Ir::supported()) + m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); + m->setFocus(); + m->exec( QCursor::pos() ); + sleep(1); + if(m) delete m; } void AdvancedFm::cancelMenuTimer() { qDebug("selectionChanged: cancel menu timer"); if( menuTimer.isActive() ) menuTimer.stop(); } |