aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-05 15:05:30 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit3da38ca60b65d3f1bd67b049f3c4b2a90a4d6a19 (patch)
tree6c5d1175fb367bc6e73a86d1ff73a39ca467bc95 /gui/options.cpp
parent211d9ed5f67712f5e0a1b23e7b3fb492b5256f89 (diff)
downloadscummvm-rg350-3da38ca60b65d3f1bd67b049f3c4b2a90a4d6a19.tar.gz
scummvm-rg350-3da38ca60b65d3f1bd67b049f3c4b2a90a4d6a19.tar.bz2
scummvm-rg350-3da38ca60b65d3f1bd67b049f3c4b2a90a4d6a19.zip
CLOUD: Replace USE_CLOUD with USE_LIBCURL
In most cases that's the right one to check. USE_CLOUD is defined when either USE_LIBCURL or USE_SDL_NET are, which means if there is no curl, USE_CLOUD still could be defined and linking errors would appear.
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index bf692f8fad..9d9833496f 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -44,7 +44,7 @@
#include "audio/fmopl.h"
#include "downloaddialog.h"
-#ifdef USE_CLOUD
+#ifdef USE_LIBCURL
#include "backends/cloud/cloudmanager.h"
#include "gui/storagewizarddialog.h"
#endif
@@ -90,7 +90,7 @@ enum {
};
#endif
-#if defined USE_CLOUD || defined USE_SDL_NET
+#ifdef USE_CLOUD
enum {
kConfigureStorageCmd = 'cfst',
kRefreshStorageCmd = 'rfst',
@@ -1266,7 +1266,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
new ButtonWidget(tab, "GlobalOptions_Misc.UpdatesCheckManuallyButton", _("Check now"), 0, kUpdatesCheckCmd);
#endif
-#if defined USE_CLOUD || defined USE_SDL_NET
+#ifdef USE_CLOUD
//
// 7) The cloud tab
//
@@ -1275,7 +1275,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
else
tab->addTab(_c("Cloud", "lowres"));
-#ifdef USE_CLOUD
+#ifdef USE_LIBCURL
_selectedStorageIndex = CloudMan.getStorageIndex();
#else
_selectedStorageIndex = 0;
@@ -1283,7 +1283,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
_storagePopUpDesc = new StaticTextWidget(tab, "GlobalOptions_Cloud.StoragePopupDesc", _("Storage:"), _("Active cloud storage"));
_storagePopUp = new PopUpWidget(tab, "GlobalOptions_Cloud.StoragePopup");
-#ifdef USE_CLOUD
+#ifdef USE_LIBCURL
Common::StringArray list = CloudMan.listStorages();
for (uint32 i = 0; i < list.size(); ++i)
_storagePopUp->appendEntry(list[i], i);
@@ -1463,7 +1463,7 @@ void GlobalOptionsDialog::close() {
}
#endif
-#ifdef USE_CLOUD
+#ifdef USE_LIBCURL
if (CloudMan.getStorageIndex() != _selectedStorageIndex) {
if (!CloudMan.switchStorage(_selectedStorageIndex)) {
bool anotherStorageIsWorking = CloudMan.isWorking();
@@ -1590,7 +1590,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
}
break;
}
-#ifdef USE_CLOUD
+#ifdef USE_LIBCURL
case kPopUpItemSelectedCmd:
{
setupCloudTab();
@@ -1694,13 +1694,15 @@ void GlobalOptionsDialog::reflowLayout() {
_tabWidget->setActiveTab(activeTab);
OptionsDialog::reflowLayout();
+#ifdef USE_CLOUD
setupCloudTab();
+#endif
}
-#if defined USE_CLOUD || defined USE_SDL_NET
+#ifdef USE_CLOUD
void GlobalOptionsDialog::setupCloudTab() {
int serverLabelPosition = -1; //no override
-#ifdef USE_CLOUD
+#ifdef USE_LIBCURL
_selectedStorageIndex = _storagePopUp->getSelectedTag();
bool shown = (_selectedStorageIndex != Cloud::kStorageNoneId);
@@ -1770,7 +1772,7 @@ void GlobalOptionsDialog::setupCloudTab() {
#endif
}
#endif
-#ifdef USE_CLOUD
+#ifdef USE_LIBCURL
void GlobalOptionsDialog::storageInfoCallback(Cloud::Storage::StorageInfoResponse response) {
//we could've used response.value.email()
//but Storage already notified CloudMan