aboutsummaryrefslogtreecommitdiff
path: root/gui/storagewizarddialog.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-10 16:35:23 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit9ee2eb4e60a34948797620a0f80ae0a80037efc0 (patch)
tree582ec42766dbdb505a803678580f4f52c5d4b504 /gui/storagewizarddialog.cpp
parent3e6503743c2f5d90c64bf37e943338c33fc58d2b (diff)
downloadscummvm-rg350-9ee2eb4e60a34948797620a0f80ae0a80037efc0.tar.gz
scummvm-rg350-9ee2eb4e60a34948797620a0f80ae0a80037efc0.tar.bz2
scummvm-rg350-9ee2eb4e60a34948797620a0f80ae0a80037efc0.zip
GUI: Add EditText in StorageWizardDialog
One can enter the code, press 'Connect' button and get a working Storage!
Diffstat (limited to 'gui/storagewizarddialog.cpp')
-rw-r--r--gui/storagewizarddialog.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/gui/storagewizarddialog.cpp b/gui/storagewizarddialog.cpp
index 996365da03..d637440fc8 100644
--- a/gui/storagewizarddialog.cpp
+++ b/gui/storagewizarddialog.cpp
@@ -27,11 +27,13 @@
#include "common/translation.h"
#include "backends/cloud/cloudmanager.h"
+#include "widgets/edittext.h"
namespace GUI {
enum {
- kConnectCmd = 'Cnnt'
+ kConnectCmd = 'Cnnt',
+ kCodeBoxCmd = 'CdBx'
};
StorageWizardDialog::StorageWizardDialog(uint32 storageId): Dialog("GlobalOptions_Cloud_ConnectionWizard"), _storageId(storageId) {
@@ -42,17 +44,18 @@ StorageWizardDialog::StorageWizardDialog(uint32 storageId): Dialog("GlobalOption
new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.NavigateLine", _s("Navigate to the following URL:"));
- Common::String url = "https://www.scummvm.org/cloud-";
+ Common::String url = "https://www.scummvm.org/c/";
switch (storageId) {
- case Cloud::kStorageDropboxId: url += "dropbox"; break;
- case Cloud::kStorageOneDriveId: url += "onedrive"; break;
- case Cloud::kStorageGoogleDriveId: url += "googledrive"; break;
+ case Cloud::kStorageDropboxId: url += "db"; break;
+ case Cloud::kStorageOneDriveId: url += "od"; break;
+ case Cloud::kStorageGoogleDriveId: url += "gd"; break;
}
new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.URLLine", url);
- new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ReturnLine1", _s("Press 'Continue' when you obtain"));
- new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ReturnLine2", _s("the code from the storage."));
+ new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ReturnLine1", _s("Obtain the code from the storage, enter it"));
+ new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ReturnLine2", _s("in the following field and press 'Connect':"));
+ _codeWidget = new EditTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.CodeBox", _s("Code"), 0, kCodeBoxCmd);
// Buttons
new ButtonWidget(this, "GlobalOptions_Cloud_ConnectionWizard.CancelButton", _("Cancel"), 0, kCloseCmd);
@@ -61,7 +64,10 @@ StorageWizardDialog::StorageWizardDialog(uint32 storageId): Dialog("GlobalOption
void StorageWizardDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
+ case kCodeBoxCmd:
+ break;
case kConnectCmd:
+ CloudMan.connectStorage(_storageId, _codeWidget->getEditString());
setResult(1);
close();
break;