summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-20 13:18:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-20 13:18:47 +0300
commit0369cb5dc2e5dae4acdb0753c3b309ef874c96ae (patch)
treead49bd867bc44ad953c49b43df9c4e2c2705aa34 /src/gui
parent0ad3a821e42471a052027419336df2132613e9f3 (diff)
downloadmv-0369cb5dc2e5dae4acdb0753c3b309ef874c96ae.tar.gz
mv-0369cb5dc2e5dae4acdb0753c3b309ef874c96ae.tar.bz2
mv-0369cb5dc2e5dae4acdb0753c3b309ef874c96ae.tar.xz
mv-0369cb5dc2e5dae4acdb0753c3b309ef874c96ae.zip
Move downloadstatus into separate file.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/serverdialog.cpp6
-rw-r--r--src/gui/windows/serverdialog.h2
-rw-r--r--src/gui/windows/updaterwindow.cpp8
-rw-r--r--src/gui/windows/updaterwindow.h2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index cc0a4f184..a56c79a3b 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -680,10 +680,10 @@ void ServerDialog::saveCustomServers(const ServerInfo &currentServer,
config.setValue("MostUsedServerName" + toString(savedServerCount), "");
}
-int ServerDialog::downloadUpdate(void *ptr, DownloadStatus status,
+int ServerDialog::downloadUpdate(void *ptr, DownloadStatus::Type status,
size_t total, size_t remaining)
{
- if (!ptr || status == DOWNLOAD_STATUS_CANCELLED)
+ if (!ptr || status == DownloadStatus::CANCELLED)
return -1;
ServerDialog *const sd = reinterpret_cast<ServerDialog*>(ptr);
@@ -692,7 +692,7 @@ int ServerDialog::downloadUpdate(void *ptr, DownloadStatus status,
if (!sd->mDownload)
return -1;
- if (status == DOWNLOAD_STATUS_COMPLETE)
+ if (status == DownloadStatus::COMPLETE)
{
finished = true;
}
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index 88b6a7caf..e2ab64ada 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -114,7 +114,7 @@ class ServerDialog final : public Window,
bool needUpdateServers() const;
- static int downloadUpdate(void *ptr, DownloadStatus status,
+ static int downloadUpdate(void *ptr, DownloadStatus::Type status,
size_t total, size_t remaining);
Mutex mMutex;
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 2735f85dc..4e0f609ac 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -456,19 +456,19 @@ void UpdaterWindow::loadPatch()
mScrollArea->setVerticalScrollAmount(0);
}
-int UpdaterWindow::updateProgress(void *ptr, DownloadStatus status,
+int UpdaterWindow::updateProgress(void *ptr, DownloadStatus::Type status,
size_t dt, size_t dn)
{
UpdaterWindow *const uw = reinterpret_cast<UpdaterWindow *>(ptr);
if (!uw)
return -1;
- if (status == DOWNLOAD_STATUS_COMPLETE)
+ if (status == DownloadStatus::COMPLETE)
{
uw->mDownloadComplete = true;
}
- else if (status == DOWNLOAD_STATUS_ERROR ||
- status == DOWNLOAD_STATUS_CANCELLED)
+ else if (status == DownloadStatus::ERROR ||
+ status == DownloadStatus::CANCELLED)
{
if (uw->mDownloadStatus == UPDATE_COMPLETE)
{ // ignoring error in last state (was UPDATE_PATCH)
diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h
index 144e0903a..332f0d629 100644
--- a/src/gui/windows/updaterwindow.h
+++ b/src/gui/windows/updaterwindow.h
@@ -155,7 +155,7 @@ private:
/**
* A download callback for progress updates.
*/
- static int updateProgress(void *ptr, DownloadStatus status,
+ static int updateProgress(void *ptr, DownloadStatus::Type status,
size_t dt, size_t dn);
/**