diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-23 22:00:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:16 +0300 |
commit | c2a7004213529c403faeb6fdcc374699aa2f53b5 (patch) | |
tree | f5701ef3412923bc0e5e033033bd52960d66acc3 /src/gui/updaterwindow.cpp | |
parent | e8a4474319aca4a32869fa1ebb8b5ebbd98237f6 (diff) | |
download | manaplus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.gz manaplus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.bz2 manaplus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.xz manaplus-c2a7004213529c403faeb6fdcc374699aa2f53b5.zip |
improve getState/setState in Client.
Diffstat (limited to 'src/gui/updaterwindow.cpp')
-rw-r--r-- | src/gui/updaterwindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp index f17621f6f..f41269179 100644 --- a/src/gui/updaterwindow.cpp +++ b/src/gui/updaterwindow.cpp @@ -257,7 +257,7 @@ void UpdaterWindow::enable() mPlayButton->requestFocus(); if (mUpdateType & LoginData::Upd_Close) - Client::setState(STATE_LOAD_DATA); + client->setState(STATE_LOAD_DATA); } void UpdaterWindow::action(const gcn::ActionEvent &event) @@ -276,7 +276,7 @@ void UpdaterWindow::action(const gcn::ActionEvent &event) } else if (eventId == "play") { - Client::setState(STATE_LOAD_DATA); + client->setState(STATE_LOAD_DATA); } } @@ -286,7 +286,7 @@ void UpdaterWindow::keyPressed(gcn::KeyEvent &keyEvent) if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL)) { action(gcn::ActionEvent(nullptr, mCancelButton->getActionEventId())); - Client::setState(STATE_LOGIN); + client->setState(STATE_LOGIN); } else if (actionId == static_cast<int>(Input::KEY_GUI_SELECT) || actionId == static_cast<int>(Input::KEY_GUI_SELECT2)) @@ -465,7 +465,7 @@ int UpdaterWindow::updateProgress(void *ptr, DownloadStatus status, uw->setProgress(progress); - if (Client::getState() != STATE_UPDATE + if (client->getState() != STATE_UPDATE || uw->mDownloadStatus == UPDATE_ERROR) { // If the action was canceled return an error code to stop the mThread |