From d2d49e224b5aa0839a5636f1c751062dc9a613c7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 17 Jul 2007 21:59:44 +0000 Subject: Implemented FR #1754616 - "GUI: Add option to delete games using the "Del" Key" svn-id: r28131 --- gui/ListWidget.cpp | 11 +++++++++++ gui/ListWidget.h | 1 + gui/launcher.cpp | 3 +++ 3 files changed, 15 insertions(+) (limited to 'gui') diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 3d5c3dee62..1ca6846e86 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -243,6 +243,17 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { 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--; diff --git a/gui/ListWidget.h b/gui/ListWidget.h index fe3dd4cd7e..50d16f494f 100644 --- a/gui/ListWidget.h +++ b/gui/ListWidget.h @@ -42,6 +42,7 @@ enum NumberingMode { 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 }; diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 712cc78883..59404dfd74 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -839,6 +839,9 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat ConfMan.setActiveDomain(_domains[item]); close(); break; + case kListItemRemovalRequestCmd: + removeGame(item); + break; case kListSelectionChangedCmd: updateButtons(); break; -- cgit v1.2.3 From 3cddad33738aa7aa2f9ad486a0bc542dd2c2f1cb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 30 Jul 2007 19:18:39 +0000 Subject: Add James to credits for his Music Enhancement project svn-id: r28336 --- gui/credits.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index fba9350bca..ece794a7f3 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -229,6 +229,9 @@ static const char *credits[] = { "\\C\\c0""Chris Gray", "\\C\\c0""", "\\C\\c0""", +"\\C\\c1""ScummVM Music Enhancement project", +"\\C\\c0""James Woodcock", +"\\C\\c0""", "\\C\\c1""Websites (design)", "\\C\\c0""Dob\363 Bal\341zs", "\\C\\c2""Website design", -- cgit v1.2.3 From 7c2857ce8145d2f371cd36119bbc59d968d93034 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 31 Jul 2007 11:58:59 +0000 Subject: Revert last change to credits. svn-id: r28355 --- gui/credits.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index ece794a7f3..fba9350bca 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -229,9 +229,6 @@ static const char *credits[] = { "\\C\\c0""Chris Gray", "\\C\\c0""", "\\C\\c0""", -"\\C\\c1""ScummVM Music Enhancement project", -"\\C\\c0""James Woodcock", -"\\C\\c0""", "\\C\\c1""Websites (design)", "\\C\\c0""Dob\363 Bal\341zs", "\\C\\c2""Website design", -- cgit v1.2.3