Fixed typos

This commit is contained in:
Mark Long 2016-10-30 14:03:39 -05:00
parent c3c80f9f1e
commit d136148a3b
3 changed files with 16 additions and 7 deletions

View File

@ -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): In the pipeline are some more useful features (as I get a chance):
* Syntax Highlighting **(Currently in progress!)** * Syntax Highlighting **(Currently in progress!)**
* More low-level disk exploration tools (sector-level stuff, comparing DOS versions between disks, etc.) * 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 * Processing and analysis of Integer Basic files
* Much more robust disassembly tools: * Much more robust disassembly tools:
* Handling differences between 6502/65C02/65816 ops, as well as "undocumented" ops on the original 6502 * Handling differences between 6502/65C02/65816 ops, as well as "undocumented" ops on the original 6502

View File

@ -495,7 +495,7 @@ QList<ApplesoftToken> ApplesoftRetokenizer::retokenizeNegativeNumbers(QList<Appl
// A = 1 - - 4 should // A = 1 - - 4 should
// A = 1 - - - 4 should, probably, but it's errorprone to say the least, // A = 1 - - - 4 should, probably, but it's errorprone to say the least,
// as are any multiple arbitrary +/-'s. Have to hope for the best here. // as are any multiple arbitrary +/-'s. Have to hope for the best here.
// Best bet would be to look at how AppleSoft handles these values. // Best bet would be to look at how Applesoft handles these values.
// A = - 0 is the same as 0 // A = - 0 is the same as 0
ApplesoftToken token; ApplesoftToken token;

View File

@ -16,7 +16,7 @@ ApplesoftFileViewer::ApplesoftFileViewer(QWidget *parent) :
m_afdv = Q_NULLPTR; m_afdv = Q_NULLPTR;
QSettings settings; QSettings settings;
QString title = QString("AppleSoft Viewer"); QString title = QString("Applesoft Viewer");
m_title = title; m_title = title;
setWindowTitle(title); setWindowTitle(title);
@ -266,7 +266,7 @@ void ApplesoftFileViewer::setFile(ApplesoftFile *file) {
m_file = file; m_file = file;
m_formatter->setFile(file); m_formatter->setFile(file);
QString title = QString("AppleSoft Viewer: %1").arg(m_file->filename()); QString title = QString("Applesoft Viewer: %1").arg(m_file->filename());
m_title = title; m_title = title;
setWindowTitle(title); setWindowTitle(title);
QTextDocument *doc = ui->textArea->document(); QTextDocument *doc = ui->textArea->document();
@ -349,14 +349,23 @@ void ApplesoftFileViewer::doPrint()
QPrinter printer; QPrinter printer;
QPrintDialog dialog(&printer, this); QPrintDialog dialog(&printer, this);
dialog.setWindowTitle(tr("Print AppleSoft File")); dialog.setWindowTitle(tr("Print Applesoft File"));
if (ui->textArea->textCursor().hasSelection()) if (ui->textArea->textCursor().hasSelection())
dialog.addEnabledOption(QAbstractPrintDialog::PrintSelection); dialog.addEnabledOption(QAbstractPrintDialog::PrintSelection);
if (dialog.exec() != QDialog::Accepted) { if (dialog.exec() != QDialog::Accepted) {
return; 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; } bool ApplesoftFileViewer::canExport() const { return true; }
@ -367,7 +376,7 @@ void ApplesoftFileViewer::doExport()
QDir savename = QDir(defaultPath).filePath(m_file->filename()+".txt"); QDir savename = QDir(defaultPath).filePath(m_file->filename()+".txt");
QString saveName = QFileDialog::getSaveFileName(this, 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 if (saveName == "") return; // User cancelled