aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-11 20:34:46 +0000
committerJohannes Schickel2008-09-11 20:34:46 +0000
commit73174eb8ef95ea05a969ab1d2a423a39287627ce (patch)
treef88cbae75d12e5859573e8c983e5b3f556a6eddd
parentd996b305c5d0f6d53b62760aa5f2fab526897efb (diff)
downloadscummvm-rg350-73174eb8ef95ea05a969ab1d2a423a39287627ce.tar.gz
scummvm-rg350-73174eb8ef95ea05a969ab1d2a423a39287627ce.tar.bz2
scummvm-rg350-73174eb8ef95ea05a969ab1d2a423a39287627ce.zip
Little more cleanup.
svn-id: r34497
-rw-r--r--gui/launcher.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index e093d4bb55..8039a49509 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -496,7 +496,6 @@ public:
~SaveLoadChooser();
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
- const String &getResultString() const;
void setList(const StringList& list);
int runModal(const EnginePlugin *plugin, const String &target);
@@ -533,10 +532,6 @@ SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel)
SaveLoadChooser::~SaveLoadChooser() {
}
-const Common::String &SaveLoadChooser::getResultString() const {
- return _list->getSelectedString();
-}
-
int SaveLoadChooser::runModal(const EnginePlugin *plugin, const String &target) {
if (_gfxWidget)
_gfxWidget->setGfx(0);
@@ -557,7 +552,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
case GUI::kListItemActivatedCmd:
case GUI::kListItemDoubleClickedCmd:
if (selItem >= 0) {
- if (!getResultString().empty()) {
+ if (!_list->getSelectedString().empty()) {
_list->endEditMode();
setResult(atoi(_saveList[selItem].save_slot().c_str()));
close();
@@ -565,7 +560,6 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
}
break;
case kChooseCmd:
- _list->endEditMode();
setResult(atoi(_saveList[selItem].save_slot().c_str()));
close();
break;
@@ -575,10 +569,10 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
// Disable these buttons if nothing is selected, or if an empty
// list item is selected.
- _chooseButton->setEnabled(selItem >= 0 && (!getResultString().empty()));
+ _chooseButton->setEnabled(selItem >= 0 && (!_list->getSelectedString().empty()));
_chooseButton->draw();
// Delete will always be disabled if the engine doesn't support it.
- _deleteButton->setEnabled(_delSupport && (selItem >= 0) && (!getResultString().empty()));
+ _deleteButton->setEnabled(_delSupport && (selItem >= 0) && (!_list->getSelectedString().empty()));
_deleteButton->draw();
} break;
case kDelCmd:
@@ -632,7 +626,7 @@ void SaveLoadChooser::updateSaveList() {
StringList saveNames;
for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x)
- saveNames.push_back(x->description().c_str());
+ saveNames.push_back(x->description());
_list->setList(saveNames);
}