diff options
| -rw-r--r-- | gui/massadd.cpp | 9 | ||||
| -rw-r--r-- | gui/massadd.h | 1 | 
2 files changed, 10 insertions, 0 deletions
diff --git a/gui/massadd.cpp b/gui/massadd.cpp index b0adce3f47..1578e75b25 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -24,6 +24,7 @@  #include "common/config-manager.h"  #include "common/debug.h"  #include "common/system.h" +#include "common/taskbar.h"  #include "common/translation.h"  #include "gui/launcher.h"	// For addGameToConf() @@ -60,6 +61,7 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)  	: Dialog("MassAdd"),  	_dirsScanned(0),  	_oldGamesCount(0), +	_dirTotal(0),  	_okButton(0),  	_dirProgressText(0),  	_gameProgressText(0) { @@ -130,6 +132,9 @@ struct GameDescLess {  void MassAddDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { +	// Remove progress bar from taskbar +	g_system->getTaskbarManager()->setProgressState(Common::TaskbarManager::kTaskbarNoProgress); +  	// FIXME: It's a really bad thing that we use two arbitrary constants  	if (cmd == kOkCmd) {  		// Sort the detected games. This is not strictly necessary, but nice for @@ -226,10 +231,14 @@ void MassAddDialog::handleTickle() {  		for (Common::FSList::const_iterator file = files.begin(); file != files.end(); ++file) {  			if (file->isDirectory()) {  				_scanStack.push(*file); + +				_dirTotal++;  			}  		}  		_dirsScanned++; + +		g_system->getTaskbarManager()->setProgressValue(_dirsScanned, _dirTotal);  	} diff --git a/gui/massadd.h b/gui/massadd.h index 15cef7ba68..7350213835 100644 --- a/gui/massadd.h +++ b/gui/massadd.h @@ -60,6 +60,7 @@ private:  	int _dirsScanned;  	int _oldGamesCount; +	int _dirTotal;  	Widget *_okButton;  	StaticTextWidget *_dirProgressText;  | 
