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.
This commit is contained in:
parent
469a242555
commit
f971e1e4a8
2 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue