GUI: Inform use about ignored games when mass adding

This commit is contained in:
Max Horn 2011-05-02 13:39:34 +02:00
parent 44e3efe888
commit d521d6a1c2
2 changed files with 7 additions and 3 deletions

View File

@ -62,6 +62,7 @@ enum {
MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
: Dialog("MassAdd"),
_dirsScanned(0),
_oldGamesCount(0),
_okButton(0),
_dirProgressText(0),
_gameProgressText(0) {
@ -212,8 +213,10 @@ void MassAddDialog::handleTickle() {
break;
}
}
if (duplicate)
if (duplicate) {
_oldGamesCount++;
break; // Skip duplicates
}
}
result["path"] = path;
_games.push_back(result);
@ -243,14 +246,14 @@ void MassAddDialog::handleTickle() {
snprintf(buf, sizeof(buf), "%s", _("Scan complete!"));
_dirProgressText->setLabel(buf);
snprintf(buf, sizeof(buf), _("Discovered %d new games."), _games.size());
snprintf(buf, sizeof(buf), _("Discovered %d new games, ignored %d previously added games."), _games.size(), _oldGamesCount);
_gameProgressText->setLabel(buf);
} else {
snprintf(buf, sizeof(buf), _("Scanned %d directories ..."), _dirsScanned);
_dirProgressText->setLabel(buf);
snprintf(buf, sizeof(buf), _("Discovered %d new games ..."), _games.size());
snprintf(buf, sizeof(buf), _("Discovered %d new games, ignored %d previously added games ..."), _games.size(), _oldGamesCount);
_gameProgressText->setLabel(buf);
}

View File

@ -62,6 +62,7 @@ private:
Common::HashMap<Common::String, StringArray> _pathToTargets;
int _dirsScanned;
int _oldGamesCount;
Widget *_okButton;
StaticTextWidget *_dirProgressText;