mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +00:00
add vi/emacs keybind for stopping/removing torrent from download list
This commit is contained in:
@@ -25,11 +25,11 @@ ElementDownloadList::ElementDownloadList() {
|
||||
if (m_view == NULL)
|
||||
throw torrent::internal_error("View \"main\" must be present to initialize the main display.");
|
||||
|
||||
m_bindings['\x13'] = std::bind(&ElementDownloadList::receive_command, this, "d.start=");
|
||||
m_bindings['\x04'] = std::bind(&ElementDownloadList::receive_command, this, "branch=d.state=,d.stop=,d.erase=");
|
||||
m_bindings['\x0B'] = std::bind(&ElementDownloadList::receive_command, this, "d.ignore_commands.set=1; d.stop=; d.close=");
|
||||
m_bindings['\x12'] = std::bind(&ElementDownloadList::receive_command, this, "d.complete.set=0; d.check_hash=");
|
||||
m_bindings['\x05'] = std::bind(&ElementDownloadList::receive_command, this, "f.multicall=,f.set_create_queued=0,f.set_resize_queued=0; print=\"Queued create/resize of files in torrent.\"");
|
||||
m_bindings['\x13'] = std::bind(&ElementDownloadList::receive_command, this, "d.start=");
|
||||
m_bindings[KEY_STOP] = m_bindings[control->ui()->navigation_key(RT_KEY_STOP)] = std::bind(&ElementDownloadList::receive_command, this, "branch=d.state=,d.stop=,d.erase=");
|
||||
m_bindings['\x0B'] = std::bind(&ElementDownloadList::receive_command, this, "d.ignore_commands.set=1; d.stop=; d.close=");
|
||||
m_bindings['\x12'] = std::bind(&ElementDownloadList::receive_command, this, "d.complete.set=0; d.check_hash=");
|
||||
m_bindings['\x05'] = std::bind(&ElementDownloadList::receive_command, this, "f.multicall=,f.set_create_queued=0,f.set_resize_queued=0; print=\"Queued create/resize of files in torrent.\"");
|
||||
|
||||
m_bindings['+'] = std::bind(&ElementDownloadList::receive_next_priority, this);
|
||||
m_bindings['-'] = std::bind(&ElementDownloadList::receive_prev_priority, this);
|
||||
|
||||
+4
-2
@@ -38,7 +38,8 @@ static const int emacs_keymap[RT_KEYMAP_MAX] = {
|
||||
'H' - '@',
|
||||
'A' - '@',
|
||||
'E' - '@',
|
||||
'L'
|
||||
'L',
|
||||
'D' - '@' // could be null instead to avoid confusion
|
||||
};
|
||||
|
||||
static const int vi_keymap[RT_KEYMAP_MAX] = {
|
||||
@@ -52,7 +53,8 @@ static const int vi_keymap[RT_KEYMAP_MAX] = {
|
||||
'D' - '@',
|
||||
'H',
|
||||
'G',
|
||||
'L' - '@'
|
||||
'L' - '@',
|
||||
'x'
|
||||
};
|
||||
|
||||
Root::Root() {
|
||||
|
||||
+2
-1
@@ -35,7 +35,8 @@ enum NavigationKeymap {
|
||||
RT_KEY_HOME,
|
||||
RT_KEY_END,
|
||||
RT_KEY_TOGGLE_LAYOUT,
|
||||
RT_KEYMAP_MAX,
|
||||
RT_KEY_STOP,
|
||||
RT_KEYMAP_MAX
|
||||
};
|
||||
|
||||
class DownloadList;
|
||||
|
||||
Reference in New Issue
Block a user