[Scummvm-git-logs] scummvm master -> 0feaeb1ab00b563e4a84cb72e60d09b6d60f6e55
sev-
noreply at scummvm.org
Sun Nov 5 21:10:22 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3d5ee80403 GUI: Fix usage of dummy autosave in empty autosave slot
030c889bcf GUI:Properly initialise isWriteProtected variable
0feaeb1ab0 GUI: Relocate variable declaration & initialize
Commit: 3d5ee804036ebd07c5cf671ca441bfce71c79f5f
https://github.com/scummvm/scummvm/commit/3d5ee804036ebd07c5cf671ca441bfce71c79f5f
Author: macca8 (brubooks at tpg.com.au)
Date: 2023-11-05T22:10:17+01:00
Commit Message:
GUI: Fix usage of dummy autosave in empty autosave slot
Changes include:
- the empty autosave slot's Delete button is now disabled (since no save file exists).
- adds the dummy autosave's name to the empty autosave button's label & tooltip.
- the empty autosave button is now disabled.
Changed paths:
gui/saveload-dialog.cpp
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index aa750bc4611..198cfcb48e2 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -636,7 +636,7 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
if (!_saveList[selItem].getLocked() && desc.getSaveSlot() >= 0 && !desc.getDescription().empty())
_saveList[selItem] = desc;
- isDeletable = desc.getDeletableFlag() && _delSupport;
+ isDeletable = _saveList[selItem].getDeletableFlag() && _delSupport;
isWriteProtected = desc.getWriteProtectedFlag() ||
_saveList[selItem].getWriteProtectedFlag();
isLocked = desc.getLocked();
@@ -1159,10 +1159,10 @@ void SaveLoadChooserGrid::updateSaves() {
} else {
curButton.button->setGfx(kThumbnailWidth, kThumbnailHeight2, 0, 0, 0);
}
- curButton.description->setLabel(Common::U32String(Common::String::format("%d. ", saveSlot)) + desc.getDescription());
+ curButton.description->setLabel(Common::U32String(Common::String::format("%d. ", saveSlot)) + _saveList[i].getDescription());
Common::U32String tooltip(_("Name: "));
- tooltip += desc.getDescription();
+ tooltip += _saveList[i].getDescription();
if (_saveDateSupport) {
const Common::U32String &saveDate = desc.getSaveDate();
@@ -1191,7 +1191,9 @@ void SaveLoadChooserGrid::updateSaves() {
// In save mode we disable the button, when it's write protected.
// TODO: Maybe we should not display it at all then?
// We also disable and description the button if slot is locked
- if ((_saveMode && desc.getWriteProtectedFlag()) || desc.getLocked()) {
+ isWriteProtected = desc.getWriteProtectedFlag() ||
+ _saveList[i].getWriteProtectedFlag();
+ if ((_saveMode && isWriteProtected) || desc.getLocked()) {
curButton.button->setEnabled(false);
} else {
curButton.button->setEnabled(true);
Commit: 030c889bcf151632e8905165b80cc76afddeffd5
https://github.com/scummvm/scummvm/commit/030c889bcf151632e8905165b80cc76afddeffd5
Author: macca8 (brubooks at tpg.com.au)
Date: 2023-11-05T22:10:17+01:00
Commit Message:
GUI:Properly initialise isWriteProtected variable
Changed paths:
gui/saveload-dialog.cpp
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 198cfcb48e2..6d748cf78d8 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -1191,7 +1191,7 @@ void SaveLoadChooserGrid::updateSaves() {
// In save mode we disable the button, when it's write protected.
// TODO: Maybe we should not display it at all then?
// We also disable and description the button if slot is locked
- isWriteProtected = desc.getWriteProtectedFlag() ||
+ bool isWriteProtected = desc.getWriteProtectedFlag() ||
_saveList[i].getWriteProtectedFlag();
if ((_saveMode && isWriteProtected) || desc.getLocked()) {
curButton.button->setEnabled(false);
Commit: 0feaeb1ab00b563e4a84cb72e60d09b6d60f6e55
https://github.com/scummvm/scummvm/commit/0feaeb1ab00b563e4a84cb72e60d09b6d60f6e55
Author: macca8 (brubooks at tpg.com.au)
Date: 2023-11-05T22:10:17+01:00
Commit Message:
GUI: Relocate variable declaration & initialize
Changed paths:
gui/saveload-dialog.cpp
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 6d748cf78d8..7e9fbd40d38 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -1145,6 +1145,8 @@ void SaveLoadChooserGrid::hideButtons() {
void SaveLoadChooserGrid::updateSaves() {
hideButtons();
+ bool isWriteProtected = false;
+
for (uint i = _curPage * _entriesPerPage, curNum = 0; i < _saveList.size() && curNum < _entriesPerPage; ++i, ++curNum) {
const uint saveSlot = _saveList[i].getSaveSlot();
@@ -1191,7 +1193,7 @@ void SaveLoadChooserGrid::updateSaves() {
// In save mode we disable the button, when it's write protected.
// TODO: Maybe we should not display it at all then?
// We also disable and description the button if slot is locked
- bool isWriteProtected = desc.getWriteProtectedFlag() ||
+ isWriteProtected = desc.getWriteProtectedFlag() ||
_saveList[i].getWriteProtectedFlag();
if ((_saveMode && isWriteProtected) || desc.getLocked()) {
curButton.button->setEnabled(false);
More information about the Scummvm-git-logs
mailing list