diff --git a/README.md b/README.md index 4905751..5c492d3 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ There is also a Hex/Decimal converter utility and some in-app documentation for In the pipeline are some more useful features (as I get a chance): * Syntax Highlighting **(Currently in progress!)** * More low-level disk exploration tools (sector-level stuff, comparing DOS versions between disks, etc.) -* More analysis of AppleSoft programs (Tracing flow control; determining unaccessable lines of code; finding addresses of PEEKS, POKES, CALLS, USRs, and &'s) +* More analysis of Applesoft programs (Tracing flow control; determining unaccessable lines of code; finding addresses of PEEKS, POKES, CALLS, USRs, and &'s) * Processing and analysis of Integer Basic files * Much more robust disassembly tools: * Handling differences between 6502/65C02/65816 ops, as well as "undocumented" ops on the original 6502 diff --git a/src/applesoftfile/ApplesoftRetokenizer.cpp b/src/applesoftfile/ApplesoftRetokenizer.cpp index 62f6db3..4d68a50 100644 --- a/src/applesoftfile/ApplesoftRetokenizer.cpp +++ b/src/applesoftfile/ApplesoftRetokenizer.cpp @@ -495,7 +495,7 @@ QList ApplesoftRetokenizer::retokenizeNegativeNumbers(QListsetFile(file); - QString title = QString("AppleSoft Viewer: %1").arg(m_file->filename()); + QString title = QString("Applesoft Viewer: %1").arg(m_file->filename()); m_title = title; setWindowTitle(title); QTextDocument *doc = ui->textArea->document(); @@ -349,14 +349,23 @@ void ApplesoftFileViewer::doPrint() QPrinter printer; QPrintDialog dialog(&printer, this); - dialog.setWindowTitle(tr("Print AppleSoft File")); + dialog.setWindowTitle(tr("Print Applesoft File")); if (ui->textArea->textCursor().hasSelection()) dialog.addEnabledOption(QAbstractPrintDialog::PrintSelection); if (dialog.exec() != QDialog::Accepted) { return; } - ui->textArea->print(&printer); + QTextDocument printDoc; + QFont printFont("Courier",10); + printDoc.setDefaultFont(printFont); + QTextOption printOptions; + printOptions.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); + printDoc.setDefaultTextOption(printOptions); + m_formatter->formatDocument(&printDoc); + printDoc.print(&printer); + + //ui->textArea->document()->print(&printer); } bool ApplesoftFileViewer::canExport() const { return true; } @@ -367,7 +376,7 @@ void ApplesoftFileViewer::doExport() QDir savename = QDir(defaultPath).filePath(m_file->filename()+".txt"); QString saveName = QFileDialog::getSaveFileName(this, - tr("Export AppleSoft"), savename.path(), tr("Text Files (*.txt)")); + tr("Export Applesoft"), savename.path(), tr("Text Files (*.txt)")); if (saveName == "") return; // User cancelled