From 654d24e74c56d240b8d622840c135e22a029636d Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sun, 19 Mar 2006 20:43:10 +0000 Subject: Unreverted latest change by Doener due to my lack of proper communication abilities. --- src/gui/updatewindow.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/gui/updatewindow.cpp') 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 -#include #include #include @@ -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) -- cgit v1.2.3-70-g09d2