From 3eddecdd01478fa887c5af1ac15f8030d03c2328 Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 29 May 2013 16:45:18 +0000 Subject: [PATCH] Oops, now that I've changed EditableWidget::setText, I have to change the getter to match. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2744 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/debugger/gui/RomListWidget.cxx | 4 ++-- src/debugger/gui/RomListWidget.hxx | 4 +--- src/debugger/gui/RomWidget.cxx | 2 +- src/debugger/gui/RomWidget.hxx | 3 --- src/gui/EditableWidget.hxx | 2 +- src/gui/FileSnapDialog.cxx | 32 +++++++++++++++--------------- src/gui/GameInfoDialog.cxx | 14 ++++++------- src/gui/InputDialog.cxx | 2 +- src/gui/InputTextDialog.cxx | 2 +- src/gui/LauncherDialog.cxx | 4 ++-- src/gui/RomAuditDialog.cxx | 4 ++-- 11 files changed, 34 insertions(+), 39 deletions(-) diff --git a/src/debugger/gui/RomListWidget.cxx b/src/debugger/gui/RomListWidget.cxx index b7ac78183..6b3408da7 100644 --- a/src/debugger/gui/RomListWidget.cxx +++ b/src/debugger/gui/RomListWidget.cxx @@ -170,7 +170,7 @@ void RomListWidget::setHighlighted(int item) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const string& RomListWidget::getEditString() const +const string& RomListWidget::getText() const { if(_selectedItem < -1 || _selectedItem >= (int)myDisasm->list.size()) return EmptyString; @@ -596,7 +596,7 @@ void RomListWidget::endEditMode() return; // Send a message that editing finished with a return/enter key press - // The parent then calls getEditString() to get the newly entered data + // The parent then calls getText() to get the newly entered data _editMode = false; sendCommand(RomListWidget::kRomChangedCmd, _selectedItem, _id); diff --git a/src/debugger/gui/RomListWidget.hxx b/src/debugger/gui/RomListWidget.hxx index be017b2c8..bdf7a5a65 100644 --- a/src/debugger/gui/RomListWidget.hxx +++ b/src/debugger/gui/RomListWidget.hxx @@ -35,8 +35,6 @@ class CheckListWidget; /** RomListWidget */ class RomListWidget : public EditableWidget { -// friend class RomWidget; - public: enum { kBreakpointChangedCmd = 'RLbp', // click on the checkbox for a breakpoint @@ -55,7 +53,7 @@ class RomListWidget : public EditableWidget void setSelected(int item); void setHighlighted(int item); - const string& getEditString() const; + const string& getText() const; void startEditMode(); void endEditMode(); diff --git a/src/debugger/gui/RomWidget.cxx b/src/debugger/gui/RomWidget.cxx index 50032e410..1a0201bcd 100644 --- a/src/debugger/gui/RomWidget.cxx +++ b/src/debugger/gui/RomWidget.cxx @@ -116,7 +116,7 @@ cerr << cmd << " " << data << " " << id << endl; case RomListWidget::kRomChangedCmd: // 'data' is the line in the disassemblylist to be accessed - patchROM(data, myRomList->getEditString()); + patchROM(data, myRomList->getText()); break; #if 0 diff --git a/src/debugger/gui/RomWidget.hxx b/src/debugger/gui/RomWidget.hxx index 3ef50fcda..928032630 100644 --- a/src/debugger/gui/RomWidget.hxx +++ b/src/debugger/gui/RomWidget.hxx @@ -26,10 +26,7 @@ class GuiObject; class EditTextWidget; -#include "Array.hxx" -#include "Widget.hxx" #include "Command.hxx" -#include "CartDebug.hxx" #include "RomListWidget.hxx" class RomWidget : public Widget, public CommandSender diff --git a/src/gui/EditableWidget.hxx b/src/gui/EditableWidget.hxx index 27bb06001..c02c4b135 100644 --- a/src/gui/EditableWidget.hxx +++ b/src/gui/EditableWidget.hxx @@ -45,7 +45,7 @@ class EditableWidget : public Widget, public CommandSender virtual ~EditableWidget(); virtual void setText(const string& str, bool changed = false); - virtual const string& getEditString() const { return _editString; } + virtual const string& getText() const { return _editString; } bool isEditable() const { return _editable; } void setEditable(bool editable); diff --git a/src/gui/FileSnapDialog.cxx b/src/gui/FileSnapDialog.cxx index 43945a687..5d22059f9 100644 --- a/src/gui/FileSnapDialog.cxx +++ b/src/gui/FileSnapDialog.cxx @@ -213,14 +213,14 @@ void FileSnapDialog::loadConfig() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void FileSnapDialog::saveConfig() { - instance().settings().setValue("romdir", myRomPath->getEditString()); - instance().settings().setValue("snapsavedir", mySnapSavePath->getEditString()); - instance().settings().setValue("snaploaddir", mySnapLoadPath->getEditString()); - instance().settings().setValue("cheatfile", myCheatFile->getEditString()); - instance().settings().setValue("palettefile", myPaletteFile->getEditString()); - instance().settings().setValue("propsfile", myPropsFile->getEditString()); - instance().settings().setValue("statedir", myStatePath->getEditString()); - instance().settings().setValue("nvramdir", myNVRamPath->getEditString()); + instance().settings().setValue("romdir", myRomPath->getText()); + instance().settings().setValue("snapsavedir", mySnapSavePath->getText()); + instance().settings().setValue("snaploaddir", mySnapLoadPath->getText()); + instance().settings().setValue("cheatfile", myCheatFile->getText()); + instance().settings().setValue("palettefile", myPaletteFile->getText()); + instance().settings().setValue("propsfile", myPropsFile->getText()); + instance().settings().setValue("statedir", myStatePath->getText()); + instance().settings().setValue("nvramdir", myNVRamPath->getText()); instance().settings().setValue("sssingle", mySnapSingle->getState()); instance().settings().setValue("ss1x", mySnap1x->getState()); instance().settings().setValue("ssinterval", @@ -286,42 +286,42 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd, break; case kChooseRomDirCmd: - myBrowser->show("Select ROM directory:", myRomPath->getEditString(), + myBrowser->show("Select ROM directory:", myRomPath->getText(), BrowserDialog::Directories, kRomDirChosenCmd); break; case kChooseSnapSaveDirCmd: - myBrowser->show("Select snapshot save directory:", mySnapSavePath->getEditString(), + myBrowser->show("Select snapshot save directory:", mySnapSavePath->getText(), BrowserDialog::Directories, kSnapSaveDirChosenCmd); break; case kChooseSnapLoadDirCmd: - myBrowser->show("Select snapshot load directory:", mySnapLoadPath->getEditString(), + myBrowser->show("Select snapshot load directory:", mySnapLoadPath->getText(), BrowserDialog::Directories, kSnapLoadDirChosenCmd); break; case kChooseCheatFileCmd: - myBrowser->show("Select cheat file:", myCheatFile->getEditString(), + myBrowser->show("Select cheat file:", myCheatFile->getText(), BrowserDialog::FileLoad, kCheatFileChosenCmd); break; case kChoosePaletteFileCmd: - myBrowser->show("Select palette file:", myPaletteFile->getEditString(), + myBrowser->show("Select palette file:", myPaletteFile->getText(), BrowserDialog::FileLoad, kPaletteFileChosenCmd); break; case kChoosePropsFileCmd: - myBrowser->show("Select properties file:", myPropsFile->getEditString(), + myBrowser->show("Select properties file:", myPropsFile->getText(), BrowserDialog::FileLoad, kPropsFileChosenCmd); break; case kChooseNVRamDirCmd: - myBrowser->show("Select NVRAM directory:", myNVRamPath->getEditString(), + myBrowser->show("Select NVRAM directory:", myNVRamPath->getText(), BrowserDialog::Directories, kNVRamDirChosenCmd); break; case kChooseStateDirCmd: - myBrowser->show("Select state directory:", myStatePath->getEditString(), + myBrowser->show("Select state directory:", myStatePath->getText(), BrowserDialog::Directories, kStateDirChosenCmd); break; diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index c1e577d56..ee28b1ce4 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -510,11 +510,11 @@ void GameInfoDialog::saveConfig() return; // Cartridge properties - myGameProperties.set(Cartridge_Name, myName->getEditString()); - myGameProperties.set(Cartridge_Manufacturer, myManufacturer->getEditString()); - myGameProperties.set(Cartridge_ModelNo, myModelNo->getEditString()); - myGameProperties.set(Cartridge_Rarity, myRarity->getEditString()); - myGameProperties.set(Cartridge_Note, myNote->getEditString()); + myGameProperties.set(Cartridge_Name, myName->getText()); + myGameProperties.set(Cartridge_Manufacturer, myManufacturer->getText()); + myGameProperties.set(Cartridge_ModelNo, myModelNo->getText()); + myGameProperties.set(Cartridge_Rarity, myRarity->getText()); + myGameProperties.set(Cartridge_Note, myNote->getText()); myGameProperties.set(Cartridge_Sound, mySound->getSelectedTag().toString()); myGameProperties.set(Cartridge_Type, myType->getSelectedTag().toString()); @@ -537,8 +537,8 @@ void GameInfoDialog::saveConfig() // Display properties myGameProperties.set(Display_Format, myFormat->getSelectedTag().toString()); - myGameProperties.set(Display_YStart, myYStart->getEditString()); - myGameProperties.set(Display_Height, myHeight->getEditString()); + myGameProperties.set(Display_YStart, myYStart->getText()); + myGameProperties.set(Display_Height, myHeight->getText()); myGameProperties.set(Display_Phosphor, myPhosphor->getSelectedTag().toString()); myGameProperties.set(Display_PPBlend, myPPBlendLabel->getLabel()); diff --git a/src/gui/InputDialog.cxx b/src/gui/InputDialog.cxx index d6ebc156e..3481f2110 100644 --- a/src/gui/InputDialog.cxx +++ b/src/gui/InputDialog.cxx @@ -254,7 +254,7 @@ void InputDialog::saveConfig() Paddles::setMouseSensitivity(sensitivity); // AtariVox serial port - instance().settings().setValue("avoxport", myAVoxPort->getEditString()); + instance().settings().setValue("avoxport", myAVoxPort->getText()); // Allow all 4 joystick directions bool allowall4 = myAllowAll4->getState(); diff --git a/src/gui/InputTextDialog.cxx b/src/gui/InputTextDialog.cxx index 83d84c43d..566f02785 100644 --- a/src/gui/InputTextDialog.cxx +++ b/src/gui/InputTextDialog.cxx @@ -147,7 +147,7 @@ void InputTextDialog::setTitle(const string& title) const string& InputTextDialog::getResult(int idx) { if((unsigned int)idx < myInput.size()) - return myInput[idx]->getEditString(); + return myInput[idx]->getText(); else return EmptyString; } diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 473ff3966..9b08167e6 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -330,7 +330,7 @@ void LauncherDialog::loadDirListing() myGameList->appendGame(" [..]", "", "", true); // Now add the directory entries - bool domatch = myPattern && myPattern->getEditString() != ""; + bool domatch = myPattern && myPattern->getText() != ""; for(unsigned int idx = 0; idx < files.size(); idx++) { bool isDir = files[idx].isDirectory(); @@ -349,7 +349,7 @@ void LauncherDialog::loadDirListing() } // Skip over files that don't match the pattern in the 'pattern' textbox - if(domatch && !isDir && !matchPattern(name, myPattern->getEditString())) + if(domatch && !isDir && !matchPattern(name, myPattern->getText())) continue; myGameList->appendGame(name, files[idx].getPath(), "", isDir); diff --git a/src/gui/RomAuditDialog.cxx b/src/gui/RomAuditDialog.cxx index f29b8703a..5eb748761 100644 --- a/src/gui/RomAuditDialog.cxx +++ b/src/gui/RomAuditDialog.cxx @@ -121,7 +121,7 @@ void RomAuditDialog::loadConfig() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void RomAuditDialog::auditRoms() { - const string& auditPath = myRomPath->getEditString(); + const string& auditPath = myRomPath->getText(); myResults1->setLabel(""); myResults2->setLabel(""); @@ -203,7 +203,7 @@ void RomAuditDialog::handleCommand(CommandSender* sender, int cmd, break; case kChooseAuditDirCmd: - myBrowser->show("Select ROM directory to audit:", myRomPath->getEditString(), + myBrowser->show("Select ROM directory to audit:", myRomPath->getText(), BrowserDialog::Directories, kAuditDirChosenCmd); break;