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
This commit is contained in:
stephena 2013-05-29 16:45:18 +00:00
parent 969d4b5fe2
commit 3eddecdd01
11 changed files with 34 additions and 39 deletions

View File

@ -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()) if(_selectedItem < -1 || _selectedItem >= (int)myDisasm->list.size())
return EmptyString; return EmptyString;
@ -596,7 +596,7 @@ void RomListWidget::endEditMode()
return; return;
// Send a message that editing finished with a return/enter key press // 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; _editMode = false;
sendCommand(RomListWidget::kRomChangedCmd, _selectedItem, _id); sendCommand(RomListWidget::kRomChangedCmd, _selectedItem, _id);

View File

@ -35,8 +35,6 @@ class CheckListWidget;
/** RomListWidget */ /** RomListWidget */
class RomListWidget : public EditableWidget class RomListWidget : public EditableWidget
{ {
// friend class RomWidget;
public: public:
enum { enum {
kBreakpointChangedCmd = 'RLbp', // click on the checkbox for a breakpoint kBreakpointChangedCmd = 'RLbp', // click on the checkbox for a breakpoint
@ -55,7 +53,7 @@ class RomListWidget : public EditableWidget
void setSelected(int item); void setSelected(int item);
void setHighlighted(int item); void setHighlighted(int item);
const string& getEditString() const; const string& getText() const;
void startEditMode(); void startEditMode();
void endEditMode(); void endEditMode();

View File

@ -116,7 +116,7 @@ cerr << cmd << " " << data << " " << id << endl;
case RomListWidget::kRomChangedCmd: case RomListWidget::kRomChangedCmd:
// 'data' is the line in the disassemblylist to be accessed // 'data' is the line in the disassemblylist to be accessed
patchROM(data, myRomList->getEditString()); patchROM(data, myRomList->getText());
break; break;
#if 0 #if 0

View File

@ -26,10 +26,7 @@
class GuiObject; class GuiObject;
class EditTextWidget; class EditTextWidget;
#include "Array.hxx"
#include "Widget.hxx"
#include "Command.hxx" #include "Command.hxx"
#include "CartDebug.hxx"
#include "RomListWidget.hxx" #include "RomListWidget.hxx"
class RomWidget : public Widget, public CommandSender class RomWidget : public Widget, public CommandSender

View File

@ -45,7 +45,7 @@ class EditableWidget : public Widget, public CommandSender
virtual ~EditableWidget(); virtual ~EditableWidget();
virtual void setText(const string& str, bool changed = false); 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; } bool isEditable() const { return _editable; }
void setEditable(bool editable); void setEditable(bool editable);

View File

@ -213,14 +213,14 @@ void FileSnapDialog::loadConfig()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FileSnapDialog::saveConfig() void FileSnapDialog::saveConfig()
{ {
instance().settings().setValue("romdir", myRomPath->getEditString()); instance().settings().setValue("romdir", myRomPath->getText());
instance().settings().setValue("snapsavedir", mySnapSavePath->getEditString()); instance().settings().setValue("snapsavedir", mySnapSavePath->getText());
instance().settings().setValue("snaploaddir", mySnapLoadPath->getEditString()); instance().settings().setValue("snaploaddir", mySnapLoadPath->getText());
instance().settings().setValue("cheatfile", myCheatFile->getEditString()); instance().settings().setValue("cheatfile", myCheatFile->getText());
instance().settings().setValue("palettefile", myPaletteFile->getEditString()); instance().settings().setValue("palettefile", myPaletteFile->getText());
instance().settings().setValue("propsfile", myPropsFile->getEditString()); instance().settings().setValue("propsfile", myPropsFile->getText());
instance().settings().setValue("statedir", myStatePath->getEditString()); instance().settings().setValue("statedir", myStatePath->getText());
instance().settings().setValue("nvramdir", myNVRamPath->getEditString()); instance().settings().setValue("nvramdir", myNVRamPath->getText());
instance().settings().setValue("sssingle", mySnapSingle->getState()); instance().settings().setValue("sssingle", mySnapSingle->getState());
instance().settings().setValue("ss1x", mySnap1x->getState()); instance().settings().setValue("ss1x", mySnap1x->getState());
instance().settings().setValue("ssinterval", instance().settings().setValue("ssinterval",
@ -286,42 +286,42 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
break; break;
case kChooseRomDirCmd: case kChooseRomDirCmd:
myBrowser->show("Select ROM directory:", myRomPath->getEditString(), myBrowser->show("Select ROM directory:", myRomPath->getText(),
BrowserDialog::Directories, kRomDirChosenCmd); BrowserDialog::Directories, kRomDirChosenCmd);
break; break;
case kChooseSnapSaveDirCmd: case kChooseSnapSaveDirCmd:
myBrowser->show("Select snapshot save directory:", mySnapSavePath->getEditString(), myBrowser->show("Select snapshot save directory:", mySnapSavePath->getText(),
BrowserDialog::Directories, kSnapSaveDirChosenCmd); BrowserDialog::Directories, kSnapSaveDirChosenCmd);
break; break;
case kChooseSnapLoadDirCmd: case kChooseSnapLoadDirCmd:
myBrowser->show("Select snapshot load directory:", mySnapLoadPath->getEditString(), myBrowser->show("Select snapshot load directory:", mySnapLoadPath->getText(),
BrowserDialog::Directories, kSnapLoadDirChosenCmd); BrowserDialog::Directories, kSnapLoadDirChosenCmd);
break; break;
case kChooseCheatFileCmd: case kChooseCheatFileCmd:
myBrowser->show("Select cheat file:", myCheatFile->getEditString(), myBrowser->show("Select cheat file:", myCheatFile->getText(),
BrowserDialog::FileLoad, kCheatFileChosenCmd); BrowserDialog::FileLoad, kCheatFileChosenCmd);
break; break;
case kChoosePaletteFileCmd: case kChoosePaletteFileCmd:
myBrowser->show("Select palette file:", myPaletteFile->getEditString(), myBrowser->show("Select palette file:", myPaletteFile->getText(),
BrowserDialog::FileLoad, kPaletteFileChosenCmd); BrowserDialog::FileLoad, kPaletteFileChosenCmd);
break; break;
case kChoosePropsFileCmd: case kChoosePropsFileCmd:
myBrowser->show("Select properties file:", myPropsFile->getEditString(), myBrowser->show("Select properties file:", myPropsFile->getText(),
BrowserDialog::FileLoad, kPropsFileChosenCmd); BrowserDialog::FileLoad, kPropsFileChosenCmd);
break; break;
case kChooseNVRamDirCmd: case kChooseNVRamDirCmd:
myBrowser->show("Select NVRAM directory:", myNVRamPath->getEditString(), myBrowser->show("Select NVRAM directory:", myNVRamPath->getText(),
BrowserDialog::Directories, kNVRamDirChosenCmd); BrowserDialog::Directories, kNVRamDirChosenCmd);
break; break;
case kChooseStateDirCmd: case kChooseStateDirCmd:
myBrowser->show("Select state directory:", myStatePath->getEditString(), myBrowser->show("Select state directory:", myStatePath->getText(),
BrowserDialog::Directories, kStateDirChosenCmd); BrowserDialog::Directories, kStateDirChosenCmd);
break; break;

View File

@ -510,11 +510,11 @@ void GameInfoDialog::saveConfig()
return; return;
// Cartridge properties // Cartridge properties
myGameProperties.set(Cartridge_Name, myName->getEditString()); myGameProperties.set(Cartridge_Name, myName->getText());
myGameProperties.set(Cartridge_Manufacturer, myManufacturer->getEditString()); myGameProperties.set(Cartridge_Manufacturer, myManufacturer->getText());
myGameProperties.set(Cartridge_ModelNo, myModelNo->getEditString()); myGameProperties.set(Cartridge_ModelNo, myModelNo->getText());
myGameProperties.set(Cartridge_Rarity, myRarity->getEditString()); myGameProperties.set(Cartridge_Rarity, myRarity->getText());
myGameProperties.set(Cartridge_Note, myNote->getEditString()); myGameProperties.set(Cartridge_Note, myNote->getText());
myGameProperties.set(Cartridge_Sound, mySound->getSelectedTag().toString()); myGameProperties.set(Cartridge_Sound, mySound->getSelectedTag().toString());
myGameProperties.set(Cartridge_Type, myType->getSelectedTag().toString()); myGameProperties.set(Cartridge_Type, myType->getSelectedTag().toString());
@ -537,8 +537,8 @@ void GameInfoDialog::saveConfig()
// Display properties // Display properties
myGameProperties.set(Display_Format, myFormat->getSelectedTag().toString()); myGameProperties.set(Display_Format, myFormat->getSelectedTag().toString());
myGameProperties.set(Display_YStart, myYStart->getEditString()); myGameProperties.set(Display_YStart, myYStart->getText());
myGameProperties.set(Display_Height, myHeight->getEditString()); myGameProperties.set(Display_Height, myHeight->getText());
myGameProperties.set(Display_Phosphor, myPhosphor->getSelectedTag().toString()); myGameProperties.set(Display_Phosphor, myPhosphor->getSelectedTag().toString());
myGameProperties.set(Display_PPBlend, myPPBlendLabel->getLabel()); myGameProperties.set(Display_PPBlend, myPPBlendLabel->getLabel());

View File

@ -254,7 +254,7 @@ void InputDialog::saveConfig()
Paddles::setMouseSensitivity(sensitivity); Paddles::setMouseSensitivity(sensitivity);
// AtariVox serial port // AtariVox serial port
instance().settings().setValue("avoxport", myAVoxPort->getEditString()); instance().settings().setValue("avoxport", myAVoxPort->getText());
// Allow all 4 joystick directions // Allow all 4 joystick directions
bool allowall4 = myAllowAll4->getState(); bool allowall4 = myAllowAll4->getState();

View File

@ -147,7 +147,7 @@ void InputTextDialog::setTitle(const string& title)
const string& InputTextDialog::getResult(int idx) const string& InputTextDialog::getResult(int idx)
{ {
if((unsigned int)idx < myInput.size()) if((unsigned int)idx < myInput.size())
return myInput[idx]->getEditString(); return myInput[idx]->getText();
else else
return EmptyString; return EmptyString;
} }

View File

@ -330,7 +330,7 @@ void LauncherDialog::loadDirListing()
myGameList->appendGame(" [..]", "", "", true); myGameList->appendGame(" [..]", "", "", true);
// Now add the directory entries // Now add the directory entries
bool domatch = myPattern && myPattern->getEditString() != ""; bool domatch = myPattern && myPattern->getText() != "";
for(unsigned int idx = 0; idx < files.size(); idx++) for(unsigned int idx = 0; idx < files.size(); idx++)
{ {
bool isDir = files[idx].isDirectory(); 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 // 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; continue;
myGameList->appendGame(name, files[idx].getPath(), "", isDir); myGameList->appendGame(name, files[idx].getPath(), "", isDir);

View File

@ -121,7 +121,7 @@ void RomAuditDialog::loadConfig()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void RomAuditDialog::auditRoms() void RomAuditDialog::auditRoms()
{ {
const string& auditPath = myRomPath->getEditString(); const string& auditPath = myRomPath->getText();
myResults1->setLabel(""); myResults1->setLabel("");
myResults2->setLabel(""); myResults2->setLabel("");
@ -203,7 +203,7 @@ void RomAuditDialog::handleCommand(CommandSender* sender, int cmd,
break; break;
case kChooseAuditDirCmd: case kChooseAuditDirCmd:
myBrowser->show("Select ROM directory to audit:", myRomPath->getEditString(), myBrowser->show("Select ROM directory to audit:", myRomPath->getText(),
BrowserDialog::Directories, kAuditDirChosenCmd); BrowserDialog::Directories, kAuditDirChosenCmd);
break; break;