Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Updated rtorrent patch
diff --git src/ui/download_list.cc src/ui/download_list.cc
index e3abc9a..4684f0c 100644
--- src/ui/download_list.cc
+++ src/ui/download_list.cc
@@ -349,11 +349,14 @@ DownloadList::setup_keys() {
m_uiArray[DISPLAY_LOG]->bindings()[KEY_LEFT] =
m_uiArray[DISPLAY_LOG]->bindings()['B' - '@'] =
- m_uiArray[DISPLAY_LOG]->bindings()[' '] = std::tr1::bind(&DownloadList::activate_display, this, DISPLAY_DOWNLOAD_LIST);
+ m_uiArray[DISPLAY_LOG]->bindings()[' '] =
+ m_uiArray[DISPLAY_LOG]->bindings()['h'] = std::tr1::bind(&DownloadList::activate_display, this, DISPLAY_DOWNLOAD_LIST);
m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()[KEY_RIGHT] =
- m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['F' - '@'] = std::tr1::bind(&DownloadList::activate_display, this, DISPLAY_DOWNLOAD);
- m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['l'] = std::tr1::bind(&DownloadList::activate_display, this, DISPLAY_LOG);
+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['F' - '@'] =
+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['l'] = std::tr1::bind(&DownloadList::activate_display, this, DISPLAY_DOWNLOAD);
+
+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['L'] = std::tr1::bind(&DownloadList::activate_display, this, DISPLAY_LOG);
}
}
diff --git src/ui/element_chunks_seen.cc src/ui/element_chunks_seen.cc
index 71b5860..654a7a1 100644
--- src/ui/element_chunks_seen.cc
+++ src/ui/element_chunks_seen.cc
@@ -52,10 +52,14 @@ ElementChunksSeen::ElementChunksSeen(core::Download* d) :
m_window(NULL),
m_focus(0) {
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
+ m_bindings[KEY_LEFT] = m_bindings['B' - '@'] =
+ m_bindings['h'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
+
+ m_bindings[KEY_DOWN] = m_bindings['N' - '@'] =
+ m_bindings['j'] = std::tr1::bind(&ElementChunksSeen::receive_next, this);
+ m_bindings[KEY_UP] = m_bindings['P' - '@'] =
+ m_bindings['k'] = std::tr1::bind(&ElementChunksSeen::receive_prev, this);
- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = std::tr1::bind(&ElementChunksSeen::receive_next, this);
- m_bindings[KEY_UP] = m_bindings['P' - '@'] = std::tr1::bind(&ElementChunksSeen::receive_prev, this);
m_bindings[KEY_NPAGE] = std::tr1::bind(&ElementChunksSeen::receive_pagenext, this);
m_bindings[KEY_PPAGE] = std::tr1::bind(&ElementChunksSeen::receive_pageprev, this);
}
diff --git src/ui/element_download_list.cc src/ui/element_download_list.cc
index 7d6aff0..0511640 100644
--- src/ui/element_download_list.cc
+++ src/ui/element_download_list.cc
@@ -97,8 +97,8 @@ ElementDownloadList::ElementDownloadList() :
m_bindings['9'] = std::tr1::bind(&ElementDownloadList::receive_change_view, this, "leeching");
m_bindings['0'] = std::tr1::bind(&ElementDownloadList::receive_change_view, this, "active");
- m_bindings[KEY_UP] = m_bindings['P' - '@'] = std::tr1::bind(&ElementDownloadList::receive_prev, this);
- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = std::tr1::bind(&ElementDownloadList::receive_next, this);
+ m_bindings[KEY_UP] = m_bindings['k'] = m_bindings['P' - '@'] = std::tr1::bind(&ElementDownloadList::receive_prev, this);
+ m_bindings[KEY_DOWN] = m_bindings['j'] = m_bindings['N' - '@'] = std::tr1::bind(&ElementDownloadList::receive_next, this);
}
void
diff --git src/ui/element_file_list.cc src/ui/element_file_list.cc
index 4653f80..644485e 100644
--- src/ui/element_file_list.cc
+++ src/ui/element_file_list.cc
@@ -63,8 +63,8 @@ ElementFileList::ElementFileList(core::Download* d) :
m_selected(iterator(d->download()->file_list()->begin())),
m_collapsed(false) {
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
- m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = std::tr1::bind(&ElementFileList::receive_select, this);
+ m_bindings[KEY_LEFT] = m_bindings['h'] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
+ m_bindings[KEY_RIGHT] = m_bindings['l'] = m_bindings['F' - '@'] = std::tr1::bind(&ElementFileList::receive_select, this);
m_bindings[' '] = std::tr1::bind(&ElementFileList::receive_priority, this);
m_bindings['*'] = std::tr1::bind(&ElementFileList::receive_change_all, this);
@@ -72,8 +72,8 @@ ElementFileList::ElementFileList(core::Download* d) :
m_bindings[KEY_NPAGE] = std::tr1::bind(&ElementFileList::receive_pagenext, this);
m_bindings[KEY_PPAGE] = std::tr1::bind(&ElementFileList::receive_pageprev, this);
- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = std::tr1::bind(&ElementFileList::receive_next, this);
- m_bindings[KEY_UP] = m_bindings['P' - '@'] = std::tr1::bind(&ElementFileList::receive_prev, this);
+ m_bindings[KEY_DOWN] = m_bindings['j'] = m_bindings['N' - '@'] = std::tr1::bind(&ElementFileList::receive_next, this);
+ m_bindings[KEY_UP] = m_bindings['k'] = m_bindings['P' - '@'] = std::tr1::bind(&ElementFileList::receive_prev, this);
}
inline ElementText*
diff --git src/ui/element_menu.cc src/ui/element_menu.cc
index 21caf7f..d2f58fe 100644
--- src/ui/element_menu.cc
+++ src/ui/element_menu.cc
@@ -72,11 +72,11 @@ ElementMenu::ElementMenu() :
m_entry(entry_invalid) {
// Move bindings into a function that defines default bindings.
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
- m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = std::tr1::bind(&ElementMenu::entry_select, this);
+ m_bindings[KEY_LEFT] = m_bindings['h'] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
+ m_bindings[KEY_RIGHT] = m_bindings['l'] = m_bindings['F' - '@'] = std::tr1::bind(&ElementMenu::entry_select, this);
- m_bindings[KEY_UP] = m_bindings['P' - '@'] = std::tr1::bind(&ElementMenu::entry_prev, this);
- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = std::tr1::bind(&ElementMenu::entry_next, this);
+ m_bindings[KEY_UP] = m_bindings['k'] = m_bindings['P' - '@'] = std::tr1::bind(&ElementMenu::entry_prev, this);
+ m_bindings[KEY_DOWN] = m_bindings['j'] = m_bindings['N' - '@'] = std::tr1::bind(&ElementMenu::entry_next, this);
}
ElementMenu::~ElementMenu() {
diff --git src/ui/element_peer_list.cc src/ui/element_peer_list.cc
index dc80e5b..9653215 100644
--- src/ui/element_peer_list.cc
+++ src/ui/element_peer_list.cc
@@ -76,14 +76,14 @@ ElementPeerList::ElementPeerList(core::Download* d) :
m_elementInfo->slot_exit(std::tr1::bind(&ElementPeerList::activate_display, this, DISPLAY_LIST));
- m_bindings['k'] = std::tr1::bind(&ElementPeerList::receive_disconnect_peer, this);
+ m_bindings['K'] = std::tr1::bind(&ElementPeerList::receive_disconnect_peer, this);
m_bindings['*'] = std::tr1::bind(&ElementPeerList::receive_snub_peer, this);
m_bindings['B'] = std::tr1::bind(&ElementPeerList::receive_ban_peer, this);
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
- m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = std::tr1::bind(&ElementPeerList::activate_display, this, DISPLAY_INFO);
+ m_bindings[KEY_LEFT] = m_bindings['h'] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
+ m_bindings[KEY_RIGHT] = m_bindings['l'] = m_bindings['F' - '@'] = std::tr1::bind(&ElementPeerList::activate_display, this, DISPLAY_INFO);
- m_bindings[KEY_UP] = m_bindings['P' - '@'] = std::tr1::bind(&ElementPeerList::receive_prev, this);
- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = std::tr1::bind(&ElementPeerList::receive_next, this);
+ m_bindings[KEY_UP] = m_bindings['k'] = m_bindings['P' - '@'] = std::tr1::bind(&ElementPeerList::receive_prev, this);
+ m_bindings[KEY_DOWN] = m_bindings['j'] = m_bindings['N' - '@'] = std::tr1::bind(&ElementPeerList::receive_next, this);
}
ElementPeerList::~ElementPeerList() {
diff --git src/ui/element_text.cc src/ui/element_text.cc
index c24ac3a..5c6e2d2 100644
--- src/ui/element_text.cc
+++ src/ui/element_text.cc
@@ -54,7 +54,7 @@ ElementText::ElementText(rpc::target_type target) :
m_columnWidth(0) {
// Move bindings into a function that defines default bindings.
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
+ m_bindings[KEY_LEFT] = m_bindings['h'] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
// m_bindings[KEY_UP] = std::tr1::bind(this, &ElementText::entry_prev);
// m_bindings[KEY_DOWN] = std::tr1::bind(this, &ElementText::entry_next);
diff --git src/ui/element_tracker_list.cc src/ui/element_tracker_list.cc
index 0cbf9ba..c104622 100644
--- src/ui/element_tracker_list.cc
+++ src/ui/element_tracker_list.cc
@@ -54,13 +54,13 @@ ElementTrackerList::ElementTrackerList(core::Download* d) :
m_window(NULL),
m_focus(0) {
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
+ m_bindings[KEY_LEFT] = m_bindings['h'] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
m_bindings[' '] = std::tr1::bind(&ElementTrackerList::receive_cycle_group, this);
m_bindings['*'] = std::tr1::bind(&ElementTrackerList::receive_disable, this);
- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = std::tr1::bind(&ElementTrackerList::receive_next, this);
- m_bindings[KEY_UP] = m_bindings['P' - '@'] = std::tr1::bind(&ElementTrackerList::receive_prev, this);
+ m_bindings[KEY_DOWN] = m_bindings['j'] = m_bindings['N' - '@'] = std::tr1::bind(&ElementTrackerList::receive_next, this);
+ m_bindings[KEY_UP] = m_bindings['k'] = m_bindings['P' - '@'] = std::tr1::bind(&ElementTrackerList::receive_prev, this);
}
void
diff --git src/ui/element_transfer_list.cc src/ui/element_transfer_list.cc
index 2892966..926dc4b 100644
--- src/ui/element_transfer_list.cc
+++ src/ui/element_transfer_list.cc
@@ -52,10 +52,10 @@ ElementTransferList::ElementTransferList(core::Download* d) :
m_window(NULL),
m_focus(0) {
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
+ m_bindings[KEY_LEFT] = m_bindings['h'] = m_bindings['B' - '@'] = std::tr1::bind(&slot_type::operator(), &m_slot_exit);
- m_bindings[KEY_DOWN] = std::tr1::bind(&ElementTransferList::receive_next, this);
- m_bindings[KEY_UP] = std::tr1::bind(&ElementTransferList::receive_prev, this);
+ m_bindings[KEY_DOWN] = m_bindings['j'] = std::tr1::bind(&ElementTransferList::receive_next, this);
+ m_bindings[KEY_UP] = m_bindings['k'] = std::tr1::bind(&ElementTransferList::receive_prev, this);
m_bindings[KEY_NPAGE] = std::tr1::bind(&ElementTransferList::receive_pagenext, this);
m_bindings[KEY_PPAGE] = std::tr1::bind(&ElementTransferList::receive_pageprev, this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.