diff options
author | Max Horn | 2011-05-02 13:39:34 +0200 |
---|---|---|
committer | Max Horn | 2011-05-02 13:40:25 +0200 |
commit | d521d6a1c2ac78f2f47c5e6c97b95019faab65ec (patch) | |
tree | a31df0ac36fe1c8e8b03d5e4eb6bf55ddef7a1bf | |
parent | 44e3efe888ba59a74f6a40b49d6a4a1a15cc771d (diff) | |
download | scummvm-rg350-d521d6a1c2ac78f2f47c5e6c97b95019faab65ec.tar.gz scummvm-rg350-d521d6a1c2ac78f2f47c5e6c97b95019faab65ec.tar.bz2 scummvm-rg350-d521d6a1c2ac78f2f47c5e6c97b95019faab65ec.zip |
GUI: Inform use about ignored games when mass adding
-rw-r--r-- | gui/massadd.cpp | 9 | ||||
-rw-r--r-- | gui/massadd.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gui/massadd.cpp b/gui/massadd.cpp index c5af6c6bb4..80d580d2a0 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -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); } diff --git a/gui/massadd.h b/gui/massadd.h index 3dbab43df1..6aad392b0d 100644 --- a/gui/massadd.h +++ b/gui/massadd.h @@ -62,6 +62,7 @@ private: Common::HashMap<Common::String, StringArray> _pathToTargets; int _dirsScanned; + int _oldGamesCount; Widget *_okButton; StaticTextWidget *_dirProgressText; |