GUI: Get rid of SaveLoadChooser::setSaveMode.

We already pass the title and process button name to the constructor of
SaveLoadChooser and then do not offer any way of changing it, thus changing
the edit mode of the chooser is kind of pointless and was never actually used.
Instead we pass the mode on SaveLoadChooser construction now.
This commit is contained in:
Johannes Schickel 2012-06-10 04:14:17 +02:00
parent 0e5ae35e34
commit 15046a7529
15 changed files with 25 additions and 50 deletions

View file

@ -802,8 +802,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
int slot;
if (isSave) {
dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"));
dialog->setSaveMode(true);
dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
desc = dialog->getResultString();
@ -824,8 +823,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
if (desc.size() > 28)
desc = Common::String(desc.c_str(), 28);
} else {
dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"));
dialog->setSaveMode(false);
dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
}