summaryrefslogtreecommitdiff
path: root/src/gui/updatewindow.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-03-19 20:43:10 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-03-19 20:43:10 +0000
commit654d24e74c56d240b8d622840c135e22a029636d (patch)
tree5eb8b94f7832bdbb6d21c7ded6e6da6b5f8f3464 /src/gui/updatewindow.cpp
parent3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6 (diff)
downloadmana-client-654d24e74c56d240b8d622840c135e22a029636d.tar.gz
mana-client-654d24e74c56d240b8d622840c135e22a029636d.tar.bz2
mana-client-654d24e74c56d240b8d622840c135e22a029636d.tar.xz
mana-client-654d24e74c56d240b8d622840c135e22a029636d.zip
Unreverted latest change by Doener due to my lack of proper communication abilities.
Diffstat (limited to 'src/gui/updatewindow.cpp')
-rw-r--r--src/gui/updatewindow.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index 9db09f27..4f43d1fc 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -24,7 +24,6 @@
#include "updatewindow.h"
#include <iostream>
-#include <sstream>
#include <SDL.h>
#include <SDL_thread.h>
@@ -41,6 +40,8 @@
#include "../log.h"
#include "../main.h"
+#include "../utils/tostring.h"
+
UpdaterWindow::UpdaterWindow():
Window("Updating..."),
mThread(NULL), mMutex(NULL), mDownloadStatus(UPDATE_NEWS),
@@ -190,10 +191,8 @@ int UpdaterWindow::updateProgress(void *ptr,
if (progress < 0) progress = 0.0f;
if (progress > 1) progress = 1.0f;
- std::stringstream progressString;
- progressString << uw->mCurrentFile
- << " (" << ((int)(progress * 100)) << "%)";
- uw->setLabel(progressString.str().c_str());
+ uw->setLabel(
+ uw->mCurrentFile + " (" + toString((int)progress * 100) + "%)");
uw->setProgress(progress);
if (state != UPDATE_STATE || uw->mDownloadStatus == UPDATE_ERROR)