From 8dc5b07818ce513b1b716375e1dc36e39fe8cfa3 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Mon, 19 Mar 2012 19:35:34 +0100 Subject: [PATCH] Map delete key to remove torrent(s) dialog --- deluge/ui/console/modes/alltorrents.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index 9ad03d1eb..2b2c6f506 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -49,7 +49,7 @@ from add_util import add_torrent from input_popup import InputPopup from torrentdetail import TorrentDetail from preferences import Preferences -from torrent_actions import torrent_actions_popup +from torrent_actions import torrent_actions_popup, ACTION from eventview import EventView from legacy import Legacy @@ -909,6 +909,11 @@ class AllTorrents(BaseMode, component.Component): self._scroll_up(self.cursel) elif c == curses.KEY_END: self._scroll_down(self.numtorrents-self.cursel) + elif c == curses.KEY_DC: + if self.cursel not in self.marked: + self.marked.append(self.cursel) + self.last_mark = self.cursel + torrent_actions_popup(self,self._selected_torrent_ids(), action=ACTION.REMOVE) elif c == curses.KEY_RIGHT: # We enter a new mode for the selected torrent here