From b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 7 Sep 2012 22:09:11 +0300 Subject: Improve constructors in some classes. --- src/gui/updaterwindow.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/gui/updaterwindow.cpp') diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp index 496e651b3..83b0756c9 100644 --- a/src/gui/updaterwindow.cpp +++ b/src/gui/updaterwindow.cpp @@ -137,6 +137,8 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, const bool applyUpdates, const int updateType): Window(_("Updating..."), false, nullptr, "update.xml"), + ActionListener(), + KeyListener(), mDownloadStatus(UPDATE_NEWS), mUpdateHost(updateHost), mUpdatesDir(updatesDir), @@ -153,7 +155,14 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, mUpdateIndex(0), mUpdateIndexOffset(0), mLoadUpdates(applyUpdates), - mUpdateType(updateType) + mUpdateType(updateType), + mLabel(new Label(_("Connecting..."))), + mCancelButton(new Button(_("Cancel"), "cancel", this)), + mPlayButton(new Button(_("Play"), "play", this)), + mProgressBar(new ProgressBar(0.0, 310, 20)), + mBrowserBox(new BrowserBox), + mScrollArea(new ScrollArea(mBrowserBox, true, "update_background.xml")), + mUpdateServerPath(mUpdateHost) { setWindowName("UpdaterWindow"); setResizable(true); @@ -161,13 +170,6 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, setMinWidth(320); setMinHeight(240); - mBrowserBox = new BrowserBox; - mScrollArea = new ScrollArea(mBrowserBox, true, "update_background.xml"); - mLabel = new Label(_("Connecting...")); - mProgressBar = new ProgressBar(0.0, 310, 20); - mCancelButton = new Button(_("Cancel"), "cancel", this); - mPlayButton = new Button(_("Play"), "play", this); - mProgressBar->setSmoothProgress(false); mBrowserBox->setOpaque(false); mBrowserBox->setLinkHandler(this); @@ -191,7 +193,6 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, setVisible(true); mCancelButton->requestFocus(); - mUpdateServerPath = mUpdateHost; removeProtocol(mUpdateServerPath); // Try to download the updates list -- cgit v1.2.3-70-g09d2