aboutsummaryrefslogtreecommitdiff
path: root/gui/massadd.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-05-11 00:30:02 -0400
committerMatthew Hoops2011-05-11 00:30:28 -0400
commita1d41da096c0bcf502a85919cb1cb1ee471719c5 (patch)
tree8c51419daa486f1d4833757db4715dadab6c3497 /gui/massadd.cpp
parentaccb0c2a5d0c9e7b353cda4b74f511a498ed8073 (diff)
parent33c3e19cea2a08fbf26ecbe940763e8ee1c37d28 (diff)
downloadscummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.gz
scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.bz2
scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.zip
Merge remote branch 'upstream/master' into t7g-ios
Conflicts: audio/decoders/qdm2.h common/util.cpp engines/groovie/music.cpp engines/groovie/resource.h video/qt_decoder.cpp video/qt_decoder.h
Diffstat (limited to 'gui/massadd.cpp')
-rw-r--r--gui/massadd.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 197caae675..80d580d2a0 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -24,14 +24,13 @@
#include "engines/metaengine.h"
#include "common/algorithm.h"
-#include "common/events.h"
-#include "common/func.h"
#include "common/config-manager.h"
+#include "common/debug.h"
+#include "common/system.h"
#include "common/translation.h"
#include "gui/launcher.h" // For addGameToConf()
#include "gui/massadd.h"
-#include "gui/gui-manager.h"
#include "gui/widget.h"
#include "gui/widgets/list.h"
@@ -63,6 +62,7 @@ enum {
MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
: Dialog("MassAdd"),
_dirsScanned(0),
+ _oldGamesCount(0),
_okButton(0),
_dirProgressText(0),
_gameProgressText(0) {
@@ -213,8 +213,10 @@ void MassAddDialog::handleTickle() {
break;
}
}
- if (duplicate)
+ if (duplicate) {
+ _oldGamesCount++;
break; // Skip duplicates
+ }
}
result["path"] = path;
_games.push_back(result);
@@ -244,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);
}