diff options
author | Alexander Tkachev | 2016-07-04 14:17:35 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | c32d6fa047d03ca7be0e060aadcf33e5ee7d6d4a (patch) | |
tree | e57c5677941873ca8aba3ff3362fb7d4d54c4b35 | |
parent | 8972f28bc17b6d2f6fee69adcb025c9a561e851f (diff) | |
download | scummvm-rg350-c32d6fa047d03ca7be0e060aadcf33e5ee7d6d4a.tar.gz scummvm-rg350-c32d6fa047d03ca7be0e060aadcf33e5ee7d6d4a.tar.bz2 scummvm-rg350-c32d6fa047d03ca7be0e060aadcf33e5ee7d6d4a.zip |
GUI: Add error message in RemoteBrowser
For the error callback case.
-rw-r--r-- | gui/remotebrowser.cpp | 14 | ||||
-rw-r--r-- | gui/remotebrowser.h | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gui/remotebrowser.cpp b/gui/remotebrowser.cpp index e8921b905a..d176d29b02 100644 --- a/gui/remotebrowser.cpp +++ b/gui/remotebrowser.cpp @@ -31,6 +31,7 @@ #include <backends/networking/curl/request.h> #include <backends/cloud/storage.h> #include <backends/cloud/cloudmanager.h> +#include "message.h" namespace GUI { @@ -39,8 +40,9 @@ enum { kGoUpCmd = 'GoUp' }; -RemoteBrowserDialog::RemoteBrowserDialog(const char *title) - : Dialog("Browser"), _navigationLocked(false), _updateList(false), _workingRequest(nullptr), _ignoreCallback(false) { +RemoteBrowserDialog::RemoteBrowserDialog(const char *title): + Dialog("Browser"), _navigationLocked(false), _updateList(false), _showError(false), + _workingRequest(nullptr), _ignoreCallback(false) { _backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain; new StaticTextWidget(this, "Browser.Headline", title); @@ -121,6 +123,12 @@ void RemoteBrowserDialog::handleTickle() { _updateList = false; } + if (_showError) { + _showError = false; + MessageDialog alert(_("ScummVM couldn't list the directory!")); + alert.runModal(); + } + Dialog::handleTickle(); } @@ -212,7 +220,7 @@ void RemoteBrowserDialog::directoryListedErrorCallback(Networking::ErrorResponse _navigationLocked = false; _node = _backupNode; _updateList = true; - //TODO: show error message + _showError = true; } } // End of namespace GUI diff --git a/gui/remotebrowser.h b/gui/remotebrowser.h index be416154a1..190d8c6895 100644 --- a/gui/remotebrowser.h +++ b/gui/remotebrowser.h @@ -57,6 +57,7 @@ protected: Cloud::StorageFile _choice; bool _navigationLocked; bool _updateList; + bool _showError; Networking::Request *_workingRequest; bool _ignoreCallback; |