[Scummvm-cvs-logs] SF.net SVN: scummvm:[34979] scummvm/trunk/gui/launcher.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Nov 9 22:20:44 CET 2008
Revision: 34979
http://scummvm.svn.sourceforge.net/scummvm/?rev=34979&view=rev
Author: thebluegr
Date: 2008-11-09 21:20:44 +0000 (Sun, 09 Nov 2008)
Log Message:
-----------
Cleanup and simplification
Modified Paths:
--------------
scummvm/trunk/gui/launcher.cpp
Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp 2008-11-09 21:09:26 UTC (rev 34978)
+++ scummvm/trunk/gui/launcher.cpp 2008-11-09 21:20:44 UTC (rev 34979)
@@ -572,18 +572,6 @@
break;
case GUI::kListSelectionChangedCmd:
updateSelection(true);
-
- 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) {
@@ -677,6 +665,7 @@
bool isDeletable = _delSupport;
bool isWriteProtected = false;
+ bool startEditMode = _list->isEditable();
if (selItem >= 0 && !_list->getSelectedString().empty() && _metaInfoSupport) {
SaveStateDescriptor desc = (*_plugin)->querySaveMetaInfos(_target.c_str(), atoi(_saveList[selItem].save_slot().c_str()));
@@ -684,6 +673,10 @@
isDeletable = desc.getBool("is_deletable") && _delSupport;
isWriteProtected = desc.getBool("is_write_protected");
+ // Don't allow the user to change the description of write protected games
+ if (isWriteProtected)
+ startEditMode = false;
+
if (_thumbnailSupport) {
const Graphics::Surface *thumb = desc.getThumbnail();
if (thumb) {
@@ -727,6 +720,9 @@
// Disable the save button if nothing is selected, or if the selected
// game is write protected
_chooseButton->setEnabled(selItem >= 0 && !isWriteProtected);
+
+ if (startEditMode)
+ _list->startEditMode();
} else {
// Disable the load button if nothing is selected, or if an empty
// list item is selected.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list