[Scummvm-git-logs] scummvm master -> 9fb0538cb3a21d0507cb3f58f0300a1d69098933
bluegr
noreply at scummvm.org
Sun May 18 07:02:45 UTC 2025
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
8913980743 CLOUD: Skip Mode Select in setup wizard if only manual mode is available
a14d7dbd88 CLOUD: Cleanup unused kOpenUrlStorageCmd
f44a548d3f CLOUD: Remember selected storage and pass it on to kCloudConnectionWizardOpenUrlStorageCmd in setup wizard
9fb0538cb3 CLOUD: Avoid overloading runModal
Commit: 891398074340c067598c02f7f8d5e653cb01b147
https://github.com/scummvm/scummvm/commit/891398074340c067598c02f7f8d5e653cb01b147
Author: Christian Kündig (christian at kuendig.info)
Date: 2025-05-18T10:02:41+03:00
Commit Message:
CLOUD: Skip Mode Select in setup wizard if only manual mode is available
Changed paths:
gui/cloudconnectionwizard.cpp
diff --git a/gui/cloudconnectionwizard.cpp b/gui/cloudconnectionwizard.cpp
index 9aad64f9e84..c9e393831bf 100644
--- a/gui/cloudconnectionwizard.cpp
+++ b/gui/cloudconnectionwizard.cpp
@@ -77,7 +77,11 @@ CloudConnectionWizard::CloudConnectionWizard() :
_manualModeButton = nullptr;
_codeBox = nullptr;
+#ifdef USE_SDL_NET
showStep(Step::MODE_SELECT);
+#else
+ showStep(Step::MANUAL_MODE_STEP_1);
+#endif
_callback = new Common::Callback<CloudConnectionWizard, const Networking::ErrorResponse &>(this, &CloudConnectionWizard::storageConnectionCallback);
}
@@ -316,7 +320,9 @@ void CloudConnectionWizard::hideStepQuickModeSuccess() {
void CloudConnectionWizard::showStepManualMode1() {
_headlineLabel->setLabel(_("Manual Mode: Step 1"));
showContainer("ConnectionWizard_ManualModeStep1");
+#ifdef USE_SDL_NET
showBackButton();
+#endif
showNextButton();
_label0 = new StaticTextWidget(_container, "ConnectionWizard_ManualModeStep1.Line1", _("Open this link in your browser:"));
Commit: a14d7dbd886815ab1f7ed1ce7b4f2c6f3d4476af
https://github.com/scummvm/scummvm/commit/a14d7dbd886815ab1f7ed1ce7b4f2c6f3d4476af
Author: Christian Kündig (christian at kuendig.info)
Date: 2025-05-18T10:02:41+03:00
Commit Message:
CLOUD: Cleanup unused kOpenUrlStorageCmd
Changed paths:
gui/options.cpp
diff --git a/gui/options.cpp b/gui/options.cpp
index 43baa0ae08b..60cd91661a2 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -139,7 +139,6 @@ enum {
kServerPortClearCmd = 'spcl',
kChooseRootDirCmd = 'chrp',
kRootPathClearCmd = 'clrp',
- kOpenUrlStorageCmd = 'OpUr',
kDisconnectStorageCmd = 'DcSt',
kEnableStorageCmd = 'EnSt'
};
@@ -3496,31 +3495,6 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
dialog.runModal();
break;
}
- case kOpenUrlStorageCmd: {
- Common::String url = "https://cloud.scummvm.org/";
- switch (_selectedStorageIndex) {
- case Cloud::kStorageDropboxId:
- url += "dropbox?refresh_token=true";
- break;
- case Cloud::kStorageOneDriveId:
- url += "onedrive";
- break;
- case Cloud::kStorageGoogleDriveId:
- url += "gdrive";
- break;
- case Cloud::kStorageBoxId:
- url += "box";
- break;
- default:
- break;
- }
-
- if (!g_system->openUrl(url)) {
- MessageDialog alert(_("Failed to open URL!\nPlease navigate to this page manually."));
- alert.runModal();
- }
- break;
- }
case kDisconnectStorageCmd: {
if (_selectedStorageIndex == CloudMan.getStorageIndex() && CloudMan.isWorking()) {
bool cancel = true;
Commit: f44a548d3f4575b6115aff9e7f468191ea52a2b7
https://github.com/scummvm/scummvm/commit/f44a548d3f4575b6115aff9e7f468191ea52a2b7
Author: Christian Kündig (christian at kuendig.info)
Date: 2025-05-18T10:02:41+03:00
Commit Message:
CLOUD: Remember selected storage and pass it on to kCloudConnectionWizardOpenUrlStorageCmd in setup wizard
Changed paths:
gui/cloudconnectionwizard.cpp
gui/cloudconnectionwizard.h
gui/options.cpp
diff --git a/gui/cloudconnectionwizard.cpp b/gui/cloudconnectionwizard.cpp
index c9e393831bf..07b08c77a7a 100644
--- a/gui/cloudconnectionwizard.cpp
+++ b/gui/cloudconnectionwizard.cpp
@@ -580,6 +580,11 @@ void CloudConnectionWizard::manualModeStorageConnectionCallback(const Networking
// public
+int CloudConnectionWizard::runModal(uint32 selectedStorageIndex) {
+ _selectedStorageIndex = selectedStorageIndex;
+ return Dialog::runModal();
+}
+
void CloudConnectionWizard::open() {
Dialog::open();
#ifdef USE_SDL_NET
@@ -616,12 +621,31 @@ void CloudConnectionWizard::handleCommand(CommandSender *sender, uint32 cmd, uin
#endif // USE_SDL_NET
break;
- case kCloudConnectionWizardOpenUrlStorageCmd:
- if (!g_system->openUrl("https://cloud.scummvm.org/")) {
+ case kCloudConnectionWizardOpenUrlStorageCmd: {
+ Common::String url = "https://cloud.scummvm.org/";
+ switch (_selectedStorageIndex) {
+ case Cloud::kStorageDropboxId:
+ url += "dropbox/271?refresh_token=true";
+ break;
+ case Cloud::kStorageOneDriveId:
+ url += "onedrive/271";
+ break;
+ case Cloud::kStorageGoogleDriveId:
+ url += "gdrive/271";
+ break;
+ case Cloud::kStorageBoxId:
+ url += "box/271";
+ break;
+ default:
+ break;
+ }
+
+ if (!g_system->openUrl(url)) {
MessageDialog alert(_("Failed to open URL!\nPlease navigate to this page manually."));
alert.runModal();
}
break;
+ }
case kCloudConnectionWizardPasteCodeCmd:
if (g_system->hasTextInClipboard()) {
diff --git a/gui/cloudconnectionwizard.h b/gui/cloudconnectionwizard.h
index c163bfe1974..e67f35320f9 100644
--- a/gui/cloudconnectionwizard.h
+++ b/gui/cloudconnectionwizard.h
@@ -34,6 +34,7 @@ class ButtonWidget;
class EditTextWidget;
class CloudConnectionWizard : public Dialog {
+ using Dialog::runModal;
enum class Step {
NONE,
MODE_SELECT,
@@ -55,6 +56,7 @@ class CloudConnectionWizard : public Dialog {
Networking::ErrorCallback _callback;
bool _connecting;
Common::U32String _errorMessage;
+ uint32 _selectedStorageIndex;
// common and generic widgets
StaticTextWidget *_headlineLabel;
@@ -127,6 +129,7 @@ public:
CloudConnectionWizard();
~CloudConnectionWizard() override;
+ int runModal(uint32 selectedStorageIndex);
void open() override;
void close() override;
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
diff --git a/gui/options.cpp b/gui/options.cpp
index 60cd91661a2..6eeb893ac65 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -3467,7 +3467,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
}
case kOpenCloudConnectionWizardCmd: {
CloudConnectionWizard wizard;
- wizard.runModal();
+ wizard.runModal(_selectedStorageIndex);
setupCloudTab();
reflowLayout();
break;
Commit: 9fb0538cb3a21d0507cb3f58f0300a1d69098933
https://github.com/scummvm/scummvm/commit/9fb0538cb3a21d0507cb3f58f0300a1d69098933
Author: Christian Kündig (christian at kuendig.info)
Date: 2025-05-18T10:02:41+03:00
Commit Message:
CLOUD: Avoid overloading runModal
Changed paths:
gui/cloudconnectionwizard.cpp
gui/cloudconnectionwizard.h
gui/options.cpp
diff --git a/gui/cloudconnectionwizard.cpp b/gui/cloudconnectionwizard.cpp
index 07b08c77a7a..b29e96ca294 100644
--- a/gui/cloudconnectionwizard.cpp
+++ b/gui/cloudconnectionwizard.cpp
@@ -580,7 +580,7 @@ void CloudConnectionWizard::manualModeStorageConnectionCallback(const Networking
// public
-int CloudConnectionWizard::runModal(uint32 selectedStorageIndex) {
+int CloudConnectionWizard::runStorageModal(uint32 selectedStorageIndex) {
_selectedStorageIndex = selectedStorageIndex;
return Dialog::runModal();
}
diff --git a/gui/cloudconnectionwizard.h b/gui/cloudconnectionwizard.h
index e67f35320f9..8cef2be5994 100644
--- a/gui/cloudconnectionwizard.h
+++ b/gui/cloudconnectionwizard.h
@@ -34,7 +34,6 @@ class ButtonWidget;
class EditTextWidget;
class CloudConnectionWizard : public Dialog {
- using Dialog::runModal;
enum class Step {
NONE,
MODE_SELECT,
@@ -129,7 +128,7 @@ public:
CloudConnectionWizard();
~CloudConnectionWizard() override;
- int runModal(uint32 selectedStorageIndex);
+ int runStorageModal(uint32 selectedStorageIndex);
void open() override;
void close() override;
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
diff --git a/gui/options.cpp b/gui/options.cpp
index 6eeb893ac65..d700c203456 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -3467,7 +3467,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
}
case kOpenCloudConnectionWizardCmd: {
CloudConnectionWizard wizard;
- wizard.runModal(_selectedStorageIndex);
+ wizard.runStorageModal(_selectedStorageIndex);
setupCloudTab();
reflowLayout();
break;
More information about the Scummvm-git-logs
mailing list