author | llornkcor <llornkcor> | 2002-04-19 23:56:15 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-19 23:56:15 (UTC) |
commit | 221f2cbeaec8f28d39a5f95655f109a4b0fd33fc (patch) (side-by-side diff) | |
tree | 937feadc08d0b1d2e8af9214b974355177916d6f | |
parent | d2c2dd7d80cfd5359db07952385bca575f1eeeae (diff) | |
download | opie-221f2cbeaec8f28d39a5f95655f109a4b0fd33fc.zip opie-221f2cbeaec8f28d39a5f95655f109a4b0fd33fc.tar.gz opie-221f2cbeaec8f28d39a5f95655f109a4b0fd33fc.tar.bz2 |
fixed label, and forgot last log - added ability to save output to file
-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 @@ -1168,33 +1168,33 @@ void AdvancedFm::runCommand() { 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)) { @@ -1226,33 +1226,33 @@ void AdvancedFm::runCommandStd() { 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); |