[Scummvm-cvs-logs] SF.net SVN: scummvm: [28131] scummvm/trunk/gui
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Jul 17 23:59:44 CEST 2007
Revision: 28131
http://scummvm.svn.sourceforge.net/scummvm/?rev=28131&view=rev
Author: thebluegr
Date: 2007-07-17 14:59:44 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Implemented FR #1754616 - "GUI: Add option to delete games using the "Del" Key"
Modified Paths:
--------------
scummvm/trunk/gui/ListWidget.cpp
scummvm/trunk/gui/ListWidget.h
scummvm/trunk/gui/launcher.cpp
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp 2007-07-17 21:35:01 UTC (rev 28130)
+++ scummvm/trunk/gui/ListWidget.cpp 2007-07-17 21:59:44 UTC (rev 28131)
@@ -243,6 +243,17 @@
sendCommand(kListItemActivatedCmd, _selectedItem);
}
break;
+ case Common::KEYCODE_BACKSPACE:
+ case Common::KEYCODE_KP_PERIOD:
+ case Common::KEYCODE_DELETE:
+ if (_selectedItem >= 0) {
+ if (_editable) {
+ // Ignore delete and backspace when the list item is editable
+ } else {
+ sendCommand(kListItemRemovalRequestCmd, _selectedItem);
+ }
+ }
+ break;
case Common::KEYCODE_UP:
if (_selectedItem > 0)
_selectedItem--;
Modified: scummvm/trunk/gui/ListWidget.h
===================================================================
--- scummvm/trunk/gui/ListWidget.h 2007-07-17 21:35:01 UTC (rev 28130)
+++ scummvm/trunk/gui/ListWidget.h 2007-07-17 21:59:44 UTC (rev 28131)
@@ -42,6 +42,7 @@
enum {
kListItemDoubleClickedCmd = 'LIdb', // double click on item - 'data' will be item index
kListItemActivatedCmd = 'LIac', // item activated by return/enter - 'data' will be item index
+ kListItemRemovalRequestCmd = 'LIrm', // request to remove the item with the delete/backspace keys - 'data' will be item index
kListSelectionChangedCmd = 'Lsch' // selection changed - 'data' will be item index
};
Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp 2007-07-17 21:35:01 UTC (rev 28130)
+++ scummvm/trunk/gui/launcher.cpp 2007-07-17 21:59:44 UTC (rev 28131)
@@ -839,6 +839,9 @@
ConfMan.setActiveDomain(_domains[item]);
close();
break;
+ case kListItemRemovalRequestCmd:
+ removeGame(item);
+ break;
case kListSelectionChangedCmd:
updateButtons();
break;
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