[Scummvm-git-logs] scummvm master -> f971e1e4a8f37de71243cd46e8a9fee8e82bce74

antoniou79 a.antoniou79 at gmail.com
Sun Feb 9 20:08:51 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f971e1e4a8 GUI: OPTIONS: Cloud storage list populated with translated string on addCloudControls()


Commit: f971e1e4a8f37de71243cd46e8a9fee8e82bce74
    https://github.com/scummvm/scummvm/commit/f971e1e4a8f37de71243cd46e8a9fee8e82bce74
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2020-02-09T22:06:19+02:00

Commit Message:
GUI: OPTIONS: Cloud storage list populated with translated string on addCloudControls()

Resolves a bug with displaying the wrong (previous) translation when switch theme language

Previously, a translated string was stored in cloudmanager _storages config items, which would become stale if the theme language was changed.

Changed paths:
    backends/cloud/cloudmanager.cpp
    gui/options.cpp


diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp
index 5d805b2..2828422 100644
--- a/backends/cloud/cloudmanager.cpp
+++ b/backends/cloud/cloudmanager.cpp
@@ -94,7 +94,7 @@ void CloudManager::init() {
 	for (uint32 i = 0; i < kStorageTotal; ++i) {
 		Common::String name = getStorageConfigName(i);
 		StorageConfig config;
-		config.name = _(name);
+		config.name = name;
 		config.username = "";
 		config.lastSyncDate = "";
 		config.usedBytes = 0;
@@ -312,7 +312,7 @@ void CloudManager::disconnectStorage(uint32 index) {
 	ConfMan.removeKey(kStoragePrefix + name + "_usedBytes", ConfMan.kCloudDomain);
 
 	StorageConfig config;
-	config.name = _(name);
+	config.name = name;
 	config.username = "";
 	config.lastSyncDate = "";
 	config.usedBytes = 0;
diff --git a/gui/options.cpp b/gui/options.cpp
index 8573147..0260c8c 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1965,8 +1965,9 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 	_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", _("Active storage:"), _("Active cloud storage"));
 	_storagePopUp = new PopUpWidget(boss, prefix + "StoragePopup");
 	Common::StringArray list = CloudMan.listStorages();
-	for (uint32 i = 0; i < list.size(); ++i)
-		_storagePopUp->appendEntry(list[i], i);
+	for (uint32 i = 0; i < list.size(); ++i) {
+		_storagePopUp->appendEntry(_(list[i]), i);
+	}
 	_storagePopUp->setSelected(_selectedStorageIndex);
 
 	if (lowres)




More information about the Scummvm-git-logs mailing list