From d93d83cec0e4232924a098b11f391abcf903075e Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Sat, 19 Dec 2009 17:54:03 -0500 Subject: Fixes functionality change broke in cbc14c8a3c6614987d2331057e114d92336cbac0, where updates are loaded even if the -d option is given --- src/gui/updatewindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/gui/updatewindow.cpp') diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 600c0bfd..394db9cf 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -119,7 +119,8 @@ std::vector loadTxtFile(const std::string &fileName) } UpdaterWindow::UpdaterWindow(const std::string &updateHost, - const std::string &updatesDir): + const std::string &updatesDir, + bool applyUpdates): Window(_("Updating...")), mDownloadStatus(UPDATE_NEWS), mUpdateHost(updateHost), @@ -133,7 +134,8 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, mDownloadedBytes(0), mMemoryBuffer(NULL), mDownload(NULL), - mUpdateIndex(0) + mUpdateIndex(0), + mLoadUpdates(applyUpdates) { mBrowserBox = new BrowserBox; mScrollArea = new ScrollArea(mBrowserBox); @@ -172,7 +174,9 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, UpdaterWindow::~UpdaterWindow() { - loadUpdates(); + if (mLoadUpdates) + loadUpdates(); + if (mDownload) { mDownload->cancel(); -- cgit v1.2.3-70-g09d2