diff options
author | Alexander Tkachev | 2016-07-03 20:09:51 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 97c0bbd2388ac049970fc3c99ebdc072c75724f1 (patch) | |
tree | 4eeec1e047cbbcb845499e52bc6d602bfa0f2b37 /gui/options.cpp | |
parent | acce1c89ab2b9b362fa9f2fc32ae813c62038705 (diff) | |
download | scummvm-rg350-97c0bbd2388ac049970fc3c99ebdc072c75724f1.tar.gz scummvm-rg350-97c0bbd2388ac049970fc3c99ebdc072c75724f1.tar.bz2 scummvm-rg350-97c0bbd2388ac049970fc3c99ebdc072c75724f1.zip |
GUI: Add DownloadDialog sketch
Diffstat (limited to 'gui/options.cpp')
-rw-r--r-- | gui/options.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 2ab6b1eb6b..1ea64cab3d 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -42,6 +42,7 @@ #include "audio/musicplugin.h" #include "audio/mixer.h" #include "audio/fmopl.h" +#include "downloaddialog.h" #ifdef USE_CLOUD #include "backends/cloud/cloudmanager.h" @@ -92,7 +93,8 @@ enum { #ifdef USE_CLOUD enum { kConfigureStorageCmd = 'cfst', - kRefreshStorageCmd = 'rfst' + kRefreshStorageCmd = 'rfst', + kDownloadStorageCmd = 'dlst' }; #endif @@ -1292,6 +1294,7 @@ GlobalOptionsDialog::GlobalOptionsDialog() _storageConnectButton = new ButtonWidget(tab, "GlobalOptions_Cloud.ConnectButton", _("Connect"), _("Open wizard dialog to connect your cloud storage account"), kConfigureStorageCmd); _storageRefreshButton = new ButtonWidget(tab, "GlobalOptions_Cloud.RefreshButton", _("Refresh"), _("Refresh current cloud storage information (username and usage)"), kRefreshStorageCmd); + _storageDownloadButton = new ButtonWidget(tab, "GlobalOptions_Cloud.DownloadButton", _("Downloads"), _("Open downloads manager dialog"), kDownloadStorageCmd); setupCloudTab(); _redrawCloudTab = false; @@ -1598,6 +1601,12 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 CloudMan.listDirectory(dir, new Common::Callback<GlobalOptionsDialog, Cloud::Storage::ListDirectoryResponse>(this, &GlobalOptionsDialog::storageListDirectoryCallback), nullptr); break; } + case kDownloadStorageCmd: + { + DownloadDialog dialog(_selectedStorageIndex); + dialog.runModal(); + break; + } #endif #ifdef GUI_ENABLE_KEYSDIALOG case kChooseKeyMappingCmd: @@ -1696,6 +1705,7 @@ void GlobalOptionsDialog::setupCloudTab() { } if (_storageConnectButton) _storageConnectButton->setVisible(shown); if (_storageRefreshButton) _storageRefreshButton->setVisible(shown && _selectedStorageIndex == CloudMan.getStorageIndex()); + if (_storageDownloadButton) _storageDownloadButton->setVisible(shown && _selectedStorageIndex == CloudMan.getStorageIndex()); } void GlobalOptionsDialog::storageInfoCallback(Cloud::Storage::StorageInfoResponse response) { |