aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-20 12:14:22 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commita11b004b6bc18a23b5ab257f4da4ff9e5429c9d9 (patch)
tree927b51a8f610471386fab3db2117c0ed7b300760
parent8e9d106658467181370d12e97f178032f083390c (diff)
downloadscummvm-rg350-a11b004b6bc18a23b5ab257f4da4ff9e5429c9d9.tar.gz
scummvm-rg350-a11b004b6bc18a23b5ab257f4da4ff9e5429c9d9.tar.bz2
scummvm-rg350-a11b004b6bc18a23b5ab257f4da4ff9e5429c9d9.zip
GUI: Show warning in DownloadDialog
If user's connection seems limited, ScummVM shows a warning message to prevent using that by accident.
-rw-r--r--gui/downloaddialog.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 42c962895f..df8783736e 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -22,6 +22,7 @@
#include "gui/downloaddialog.h"
#include "backends/cloud/cloudmanager.h"
+#include "backends/networking/connection/islimited.h"
#include "common/config-manager.h"
#include "common/translation.h"
#include "engines/metaengine.h"
@@ -112,6 +113,12 @@ void DownloadDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
}
bool DownloadDialog::selectDirectories() {
+ if (Networking::Connection::isLimited()) {
+ MessageDialog alert(_("It looks like your connection is limited. "
+ "Do you really want to download files with it?"), _("Yes"), _("No"));
+ if (alert.runModal() != GUI::kMessageOK) return false;
+ }
+
//first user should select remote directory to download
if (_remoteBrowser->runModal() <= 0) return false;