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())
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);

View File

@ -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();

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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());

View File

@ -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();

View File

@ -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;
}

View File

@ -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);

View File

@ -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;