aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJohannes Schickel2008-11-09 20:33:15 +0000
committerJohannes Schickel2008-11-09 20:33:15 +0000
commitbc829e721becf2e6b2ecdb1e963c4d2ccbe0701c (patch)
tree41395eea9019f3c6f1259b67a852db97dc22d5d5 /gui
parent818d87f44897d6ede9b201282ca89ced278150a4 (diff)
downloadscummvm-rg350-bc829e721becf2e6b2ecdb1e963c4d2ccbe0701c.tar.gz
scummvm-rg350-bc829e721becf2e6b2ecdb1e963c4d2ccbe0701c.tar.bz2
scummvm-rg350-bc829e721becf2e6b2ecdb1e963c4d2ccbe0701c.zip
Cleanup (and a little bug fix :-P).
svn-id: r34975
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 761cf0082f..897f85f25d 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -714,9 +714,16 @@ void SaveLoadChooser::updateSelection(bool redraw) {
}
- // Disable these buttons if nothing is selected, or if an empty
- // list item is selected.
- _chooseButton->setEnabled(selItem >= 0 && ((!_list->getSelectedString().empty())) || (_list->isEditable() && !isWriteProtected));
+ if (_list->isEditable()) {
+ // Disable the save button if nothing is selected, or if the selected
+ // game is write protected
+ _chooseButton->setEnabled(selItem >= 0 && !isWriteProtected);
+ } else {
+ // Disable the load button if nothing is selected, or if an empty
+ // list item is selected.
+ _chooseButton->setEnabled(selItem >= 0 && !_list->getSelectedString().empty());
+ }
+
// Delete will always be disabled if the engine doesn't support it.
_deleteButton->setEnabled(isDeletable && (selItem >= 0) && (!_list->getSelectedString().empty()));