EditGameDialog only needs the game description, not the full GameSettings -> changing constructor accordingly

svn-id: r20750
This commit is contained in:
Max Horn 2006-02-18 11:12:08 +00:00
parent e13315928b
commit db5bd6e17e

View file

@ -114,7 +114,7 @@ class EditGameDialog : public OptionsDialog {
typedef Common::String String; typedef Common::String String;
typedef Common::StringList StringList; typedef Common::StringList StringList;
public: public:
EditGameDialog(const String &domain, GameSettings target); EditGameDialog(const String &domain, const char *desc);
void open(); void open();
void close(); void close();
@ -137,7 +137,7 @@ protected:
CheckboxWidget *_globalVolumeOverride; CheckboxWidget *_globalVolumeOverride;
}; };
EditGameDialog::EditGameDialog(const String &domain, GameSettings target) EditGameDialog::EditGameDialog(const String &domain, const char *desc)
: OptionsDialog(domain, 10, 40, 320 - 2 * 10, 140) { : OptionsDialog(domain, 10, 40, 320 - 2 * 10, 140) {
const int screenW = g_system->getOverlayWidth(); const int screenW = g_system->getOverlayWidth();
@ -176,8 +176,8 @@ EditGameDialog::EditGameDialog(const String &domain, GameSettings target)
// GAME: Determine the description string // GAME: Determine the description string
String description(ConfMan.get("description", domain)); String description(ConfMan.get("description", domain));
if (description.isEmpty() && target.description) { if (description.isEmpty() && desc) {
description = target.description; description = desc;
} }
// GUI: Add tab widget // GUI: Add tab widget
@ -714,7 +714,7 @@ void LauncherDialog::addGame() {
} }
// Display edit dialog for the new entry // Display edit dialog for the new entry
EditGameDialog editDialog(domain, result); EditGameDialog editDialog(domain, result.description);
if (editDialog.runModal() > 0) { if (editDialog.runModal() > 0) {
// User pressed OK, so make changes permanent // User pressed OK, so make changes permanent
@ -761,7 +761,7 @@ void LauncherDialog::editGame(int item) {
String gameId(ConfMan.get("gameid", _domains[item])); String gameId(ConfMan.get("gameid", _domains[item]));
if (gameId.isEmpty()) if (gameId.isEmpty())
gameId = _domains[item]; gameId = _domains[item];
EditGameDialog editDialog(_domains[item], GameDetector::findGame(gameId)); EditGameDialog editDialog(_domains[item], GameDetector::findGame(gameId).description);
if (editDialog.runModal() > 0) { if (editDialog.runModal() > 0) {
// User pressed OK, so make changes permanent // User pressed OK, so make changes permanent