From 1353a304f3b953b516815478825161413aef2d78 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 9 Nov 2008 21:09:26 +0000 Subject: Do not allow the user to alter the description of write protected save slots in the GMM save dialog svn-id: r34978 --- gui/launcher.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 68a8fca0de..5440decdc8 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -573,8 +573,17 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da case GUI::kListSelectionChangedCmd: updateSelection(true); - if (_list->isEditable()) - _list->startEditMode(); + if (_list->isEditable()) { + if (!_metaInfoSupport) { + _list->startEditMode(); + } else { + SaveStateDescriptor desc = (*_plugin)->querySaveMetaInfos(_target.c_str(), atoi(_saveList[selItem].save_slot().c_str())); + // Don't allow the user to change the description of write protected games + if (!desc.getBool("is_write_protected")) + _list->startEditMode(); + } + } + break; case kDelCmd: if (selItem >= 0 && _delSupport) { -- cgit v1.2.3