diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-07 22:09:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-07 22:09:11 +0300 |
commit | b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 (patch) | |
tree | ee27a5a1ace7e5dbc588466dc623013e4d5cea99 /src/gui/updaterwindow.cpp | |
parent | 7d3059516fc25134d0d29b497e546f2846162399 (diff) | |
download | mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.gz mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.bz2 mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.xz mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/gui/updaterwindow.cpp')
-rw-r--r-- | src/gui/updaterwindow.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
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 |