diff options
-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; |