summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-11 17:32:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-11 17:32:57 +0300
commit86b8c903900a59f99b2e1f02232476d600ae5a12 (patch)
tree6cb05135934459df645e4e82119536bc579980a2 /src/gui/windows
parentfdfe2900f11958b7851f6c57a15ad0dc80334a11 (diff)
downloadmv-86b8c903900a59f99b2e1f02232476d600ae5a12.tar.gz
mv-86b8c903900a59f99b2e1f02232476d600ae5a12.tar.bz2
mv-86b8c903900a59f99b2e1f02232476d600ae5a12.tar.xz
mv-86b8c903900a59f99b2e1f02232476d600ae5a12.zip
Improve a bit variables order in some classes.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/updaterwindow.cpp20
-rw-r--r--src/gui/windows/updaterwindow.h50
2 files changed, 35 insertions, 35 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index e72308da7..507cdfd16 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -159,27 +159,19 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
Window(_("Updating..."), false, nullptr, "update.xml"),
ActionListener(),
KeyListener(),
+ mDownloadProgress(0.0F),
mDownloadStatus(UPDATE_NEWS),
mUpdateHost(updateHost),
mUpdatesDir(updatesDir),
mUpdatesDirReal(updatesDir),
mCurrentFile("news.txt"),
mNewLabelCaption(),
- mDownloadProgress(0.0F),
mDownloadMutex(),
mCurrentChecksum(0),
- mStoreInMemory(true),
- mDownloadComplete(true),
- mUserCancel(false),
- mDownloadedBytes(0),
mMemoryBuffer(nullptr),
mDownload(nullptr),
mUpdateFiles(),
mTempUpdateFiles(),
- mUpdateIndex(0),
- mUpdateIndexOffset(0),
- mLoadUpdates(applyUpdates),
- mUpdateType(updateType),
// TRANSLATORS: updater window label
mLabel(new Label(this, _("Connecting..."))),
// TRANSLATORS: updater window button
@@ -192,7 +184,15 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
"browserbox.xml")),
mScrollArea(new ScrollArea(this, mBrowserBox,
true, "update_background.xml")),
- mUpdateServerPath(mUpdateHost)
+ mUpdateServerPath(mUpdateHost),
+ mDownloadedBytes(0),
+ mUpdateIndex(0),
+ mUpdateIndexOffset(0),
+ mUpdateType(updateType),
+ mStoreInMemory(true),
+ mDownloadComplete(true),
+ mUserCancel(false),
+ mLoadUpdates(applyUpdates)
{
setWindowName("UpdaterWindow");
setResizable(true);
diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h
index 79d764752..638f88faf 100644
--- a/src/gui/windows/updaterwindow.h
+++ b/src/gui/windows/updaterwindow.h
@@ -198,6 +198,9 @@ private:
UPDATE_RESOURCES2
};
+ /** The new progress value to be set in the logic method. */
+ float mDownloadProgress;
+
/** Status of the current download. */
UpdateDownloadStatus mDownloadStatus;
@@ -215,9 +218,6 @@ private:
/** The new label caption to be set in the logic method. */
std::string mNewLabelCaption;
- /** The new progress value to be set in the logic method. */
- float mDownloadProgress;
-
// The mutex used to guard access to mNewLabelCaption
// and mDownloadProgress.
Mutex mDownloadMutex;
@@ -225,18 +225,6 @@ private:
/** The Adler32 checksum of the file currently downloading. */
unsigned long mCurrentChecksum;
- /** A flag to indicate whether to use a memory buffer or a regular file. */
- bool mStoreInMemory;
-
- /** Flag that show if current download is complete. */
- bool mDownloadComplete;
-
- /** Flag that show if the user has canceled the update. */
- bool mUserCancel;
-
- /** Byte count currently downloaded in mMemoryBuffer. */
- int mDownloadedBytes;
-
/** Buffer for files downloaded to memory. */
char *mMemoryBuffer;
@@ -249,24 +237,36 @@ private:
/** List of temp files to download. */
std::vector<UpdateFile> mTempUpdateFiles;
+ Label *mLabel; /**< Progress bar caption. */
+ Button *mCancelButton; /**< Button to stop the update process. */
+ Button *mPlayButton; /**< Button to start playing. */
+ ProgressBar *mProgressBar; /**< Update progress bar. */
+ BrowserBox *mBrowserBox; /**< Box to display news. */
+ ScrollArea *mScrollArea; /**< Used to scroll news box. */
+ std::string mUpdateServerPath;
+
+ /** Byte count currently downloaded in mMemoryBuffer. */
+ int mDownloadedBytes;
+
/** Index of the file to be downloaded. */
unsigned int mUpdateIndex;
/** Index offset for disaplay downloaded file. */
unsigned int mUpdateIndexOffset;
- /** Tells ~UpdaterWindow() if it should load updates */
- bool mLoadUpdates;
-
int mUpdateType;
- Label *mLabel; /**< Progress bar caption. */
- Button *mCancelButton; /**< Button to stop the update process. */
- Button *mPlayButton; /**< Button to start playing. */
- ProgressBar *mProgressBar; /**< Update progress bar. */
- BrowserBox *mBrowserBox; /**< Box to display news. */
- ScrollArea *mScrollArea; /**< Used to scroll news box. */
- std::string mUpdateServerPath;
+ /** A flag to indicate whether to use a memory buffer or a regular file. */
+ bool mStoreInMemory;
+
+ /** Flag that show if current download is complete. */
+ bool mDownloadComplete;
+
+ /** Flag that show if the user has canceled the update. */
+ bool mUserCancel;
+
+ /** Tells ~UpdaterWindow() if it should load updates */
+ bool mLoadUpdates;
};
#endif // GUI_WINDOWS_UPDATERWINDOW_H