-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 8a1eeec..2126745 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -1160,49 +1160,49 @@ bool AdvancedFm::copyFile( const QString & dest, const QString & src ) return success; } void AdvancedFm::runCommand() { QString curFile; if (TabWidget->currentPageIndex() == 0) { if( Local_View->currentItem()) curFile = currentDir.canonicalPath() + Local_View->currentItem()->text(0); } else { if(Remote_View->currentItem()) curFile = currentRemoteDir.canonicalPath() + Remote_View->currentItem()->text(0); } InputDialog *fileDlg; fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); fileDlg->setInputText(curFile); fileDlg->exec(); QString command; if( fileDlg->result() == 1 ) { command = fileDlg->LineEdit1->text(); int err=0; Output *outDlg; - outDlg = new Output(this, tr("Formatter Output"),FALSE); + 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") ); 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); } } } } @@ -1218,49 +1218,49 @@ void AdvancedFm::runCommandStd() { } InputDialog *fileDlg; fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); fileDlg->setInputText(curFile); fileDlg->exec(); QString command; if( fileDlg->result() == 1 ) { qApp->processEvents(); command = fileDlg->LineEdit1->text() + " &"; system(command.latin1()); } } void AdvancedFm::fileStatus() { QString curFile; if (TabWidget->currentPageIndex() == 0) { curFile = Local_View->currentItem()->text(0); } else { curFile = Remote_View->currentItem()->text(0); } QString command = " stat -l "+ curFile +" 2>&1"; int err=0; Output *outDlg; - outDlg = new Output(this, tr("Formatter Output"),FALSE); + 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") ); pclose(fp); return; } else { while ( fgets( line, sizeof line, fp)) { outDlg->OutputEdit->append(line); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); } } } void AdvancedFm::doAbout() { QMessageBox::message("AdvancedFm","Advanced FileManager\n" |