From 1d3f427c6b4dd355c1b3e19feb3bf5380fd661c2 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Sun, 18 Sep 2005 09:43:50 +0000 Subject: Corrected a range value bug for derived stats. Fixed, the percentage of the update win, updated debian information. --- src/gui/updatewindow.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/gui/updatewindow.cpp') diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index b0e2a2b8..e0c098f0 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -69,7 +69,7 @@ UpdaterWindow::UpdaterWindow(): mPlayButton->setEnabled(false); mPlayButton->addActionListener(this); mProgressBar = new ProgressBar(0.0, 5, mCancelButton->getY() - 20 - 5, - w - 10, 20, 37, 70, 23); + w - 10, 20, 37, 70, 200); mLabel = new gcn::Label("Connecting..."); mLabel->setPosition(5, mProgressBar->getY() - mLabel->getHeight() - 5); mScrollArea = new ScrollArea(mBrowserBox); @@ -194,10 +194,8 @@ int UpdaterWindow::updateProgress(void *ptr, float progress = dn / dt; UpdaterWindow *uw = reinterpret_cast(ptr); - if (progress < 0) - { - progress = 0.0f; - } + if (progress < 0) progress = 0.0f; + if (progress > 1) progress = 1.0f; std::stringstream progressString; progressString << uw->mCurrentFile -- cgit v1.2.3-70-g09d2