Created
August 23, 2011 06:04
-
-
Save kiko/1164453 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/command_network.cc b/src/command_network.cc | |
index c2e7963..7390afa 100644 | |
--- a/src/command_network.cc | |
+++ b/src/command_network.cc | |
@@ -618,6 +618,15 @@ initialize_command_network() { | |
CMD2_VAR_BOOL ("log.handshake", false); | |
CMD2_VAR_STRING ("log.tracker", ""); | |
+ CMD2_ANY ("colors.done_fg_color", std::bind(&ui::Root::get_done_fg_color, control->ui())); | |
+ CMD2_ANY_VALUE_V ("colors.done_fg_color.set", std::bind(&ui::Root::set_done_fg_color, control->ui(), std::placeholders::_2)); | |
+ CMD2_ANY ("colors.done_bg_color", std::bind(&ui::Root::get_done_bg_color, control->ui())); | |
+ CMD2_ANY_VALUE_V ("colors.done_bg_color.set", std::bind(&ui::Root::set_done_bg_color, control->ui(), std::placeholders::_2)); | |
+ CMD2_ANY ("colors.active_fg_color", std::bind(&ui::Root::get_active_fg_color, control->ui())); | |
+ CMD2_ANY_VALUE_V ("colors.active_fg_color.set", std::bind(&ui::Root::set_active_fg_color, control->ui(), std::placeholders::_2)); | |
+ CMD2_ANY ("colors.active_bg_color", std::bind(&ui::Root::get_active_bg_color, control->ui())); | |
+ CMD2_ANY_VALUE_V ("colors.active_bg_color.set", std::bind(&ui::Root::set_active_bg_color, control->ui(), std::placeholders::_2)); | |
+ | |
// CMD2_ANY_STRING ("encoding_list", std::bind(&apply_encoding_list, std::placeholders::_2)); | |
CMD2_ANY_STRING ("encoding.add", std::bind(&apply_encoding_list, std::placeholders::_2)); | |
diff --git a/src/display/canvas.cc b/src/display/canvas.cc | |
index 970d060..297a09a 100644 | |
--- a/src/display/canvas.cc | |
+++ b/src/display/canvas.cc | |
@@ -99,6 +99,10 @@ Canvas::initialize() { | |
m_isInitialized = true; | |
initscr(); | |
+ start_color(); | |
+ use_default_colors(); | |
+ init_pair(2, -1, -1); | |
+ init_pair(1, -1, -1); | |
raw(); | |
noecho(); | |
nodelay(stdscr, TRUE); | |
diff --git a/src/display/window_download_list.cc b/src/display/window_download_list.cc | |
index 71efec0..3b6351d 100644 | |
--- a/src/display/window_download_list.cc | |
+++ b/src/display/window_download_list.cc | |
@@ -37,6 +37,7 @@ | |
#include "config.h" | |
#include <rak/algorithm.h> | |
+#include <torrent/rate.h> | |
#include "core/download.h" | |
#include "core/view.h" | |
@@ -96,12 +97,32 @@ WindowDownloadList::redraw() { | |
char* position; | |
char* last = buffer + m_canvas->width() - 2 + 1; | |
+ if( pos >= m_canvas->height() ) break; | |
position = print_download_title(buffer, last, *range.first); | |
- m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); | |
- | |
+ | |
+ m_canvas->print(0, pos, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); | |
+ if( (*range.first)->is_done() ) { | |
+ if( (*range.first)->download()->info()->up_rate()->rate() != 0 ) { | |
+ m_canvas->set_attr(0, pos, m_canvas->width()-1, A_BOLD, 2); | |
+ } else { | |
+ m_canvas->set_attr(0, pos, m_canvas->width()-1, A_NORMAL, 2); | |
+ } | |
+ } else if( (*range.first)->is_active() ) { | |
+ if( (*range.first)->download()->info()->down_rate()->rate() != 0 ) { | |
+ m_canvas->set_attr(0, pos, m_canvas->width()-1, A_BOLD, 1); | |
+ } else { | |
+ m_canvas->set_attr(0, pos, m_canvas->width()-1, A_NORMAL, 1); | |
+ } | |
+ } | |
+ pos++; | |
+ | |
+ if( pos >= m_canvas->height() ) break; | |
+ | |
position = print_download_info(buffer, last, *range.first); | |
m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); | |
+ if( pos >= m_canvas->height() ) break; | |
+ | |
position = print_download_status(buffer, last, *range.first); | |
m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); | |
@@ -109,4 +130,40 @@ WindowDownloadList::redraw() { | |
} | |
} | |
+void | |
+WindowDownloadList::set_done_fg_color(int64_t color) { | |
+ short fg, bg; | |
+ pair_content(2, &fg, &bg); | |
+ if( color < 0 ) color = -1; | |
+ color = color % 8; | |
+ init_pair(2, (short)color, bg); | |
+} | |
+ | |
+void | |
+WindowDownloadList::set_done_bg_color(int64_t color) { | |
+ short fg, bg; | |
+ pair_content(2, &fg, &bg); | |
+ if( color < 0 ) color = -1; | |
+ color = color % 8; | |
+ init_pair(2, fg, (short)color); | |
+} | |
+ | |
+void | |
+WindowDownloadList::set_active_fg_color(int64_t color) { | |
+ short fg, bg; | |
+ pair_content(1, &fg, &bg); | |
+ if( color < 0 ) color = -1; | |
+ color = color % 8; | |
+ init_pair(1, (short)color, bg); | |
+} | |
+ | |
+void | |
+WindowDownloadList::set_active_bg_color(int64_t color) { | |
+ short fg, bg; | |
+ pair_content(1, &fg, &bg); | |
+ if( color < 0 ) color = -1; | |
+ color = color % 8; | |
+ init_pair(1, fg, (short)color); | |
+} | |
+ | |
} | |
diff --git a/src/display/window_download_list.h b/src/display/window_download_list.h | |
index 4ce5ea1..313e87b 100644 | |
--- a/src/display/window_download_list.h | |
+++ b/src/display/window_download_list.h | |
@@ -59,6 +59,10 @@ public: | |
virtual void redraw(); | |
void set_view(core::View* l); | |
+ void set_done_fg_color(int64_t color); | |
+ void set_done_bg_color(int64_t color); | |
+ void set_active_fg_color(int64_t color); | |
+ void set_active_bg_color(int64_t color); | |
private: | |
core::View* m_view; | |
diff --git a/src/main.cc b/src/main.cc | |
index 7f714ae..0d57f5a 100644 | |
--- a/src/main.cc | |
+++ b/src/main.cc | |
@@ -365,6 +365,11 @@ main(int argc, char** argv) { | |
CMD2_REDIRECT ("ip", "network.local_address.set"); | |
CMD2_REDIRECT ("port_range", "network.port_range.set"); | |
+ CMD2_REDIRECT ("done_fg_color", "colors.done_fg_color.set"); | |
+ CMD2_REDIRECT ("done_bg_color", "colors.done_bg_color.set"); | |
+ CMD2_REDIRECT ("active_fg_color", "colors.active_fg_color.set"); | |
+ CMD2_REDIRECT ("active_bg_color", "colors.active_bg_color.set"); | |
+ | |
CMD2_REDIRECT_GENERIC("dht", "dht.mode.set"); | |
CMD2_REDIRECT_GENERIC("dht_port", "dht.port.set"); | |
diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc | |
index 518eda6..d331373 100644 | |
--- a/src/ui/download_list.cc | |
+++ b/src/ui/download_list.cc | |
@@ -137,6 +137,11 @@ DownloadList::unfocus_download(core::Download* d) { | |
current_view()->next_focus(); | |
} | |
+display::WindowDownloadList* | |
+DownloadList::current_window_list() { | |
+ return dynamic_cast<ElementDownloadList*>(m_uiArray[DISPLAY_DOWNLOAD_LIST])->window(); | |
+} | |
+ | |
void | |
DownloadList::activate_display(Display displayType) { | |
if (!is_active()) | |
diff --git a/src/ui/download_list.h b/src/ui/download_list.h | |
index dda1b34..11137fa 100644 | |
--- a/src/ui/download_list.h | |
+++ b/src/ui/download_list.h | |
@@ -101,6 +101,7 @@ public: | |
void activate_display(Display d); | |
core::View* current_view(); | |
+ display::WindowDownloadList* current_window_list(); | |
void set_current_view(const std::string& name); | |
void slot_open_uri(SlotOpenUri s) { m_slotOpenUri = s; } | |
diff --git a/src/ui/element_download_list.h b/src/ui/element_download_list.h | |
index ed5de30..7c0fb9d 100644 | |
--- a/src/ui/element_download_list.h | |
+++ b/src/ui/element_download_list.h | |
@@ -60,6 +60,7 @@ public: | |
void disable(); | |
core::View* view() { return m_view; } | |
+ WDownloadList* window() { return m_window; } | |
void set_view(core::View* l); | |
void receive_command(const char* cmd); | |
diff --git a/src/ui/root.cc b/src/ui/root.cc | |
index 07abf34..cb95814 100644 | |
--- a/src/ui/root.cc | |
+++ b/src/ui/root.cc | |
@@ -45,6 +45,7 @@ | |
#include "core/manager.h" | |
#include "display/frame.h" | |
+#include "display/window_download_list.h" | |
#include "display/window_http_queue.h" | |
#include "display/window_title.h" | |
#include "display/window_input.h" | |
@@ -66,7 +67,11 @@ Root::Root() : | |
m_windowTitle(NULL), | |
m_windowHttpQueue(NULL), | |
m_windowInput(NULL), | |
- m_windowStatusbar(NULL) { | |
+ m_windowStatusbar(NULL), | |
+ done_fg_color(-1), | |
+ done_bg_color(-1), | |
+ active_fg_color(-1), | |
+ active_bg_color(-1) { | |
} | |
void | |
@@ -98,6 +103,10 @@ Root::init(Control* c) { | |
setup_keys(); | |
m_downloadList->activate(rootFrame->frame(1)); | |
+ m_downloadList->current_window_list()->set_done_fg_color(done_fg_color); | |
+ m_downloadList->current_window_list()->set_done_bg_color(done_bg_color); | |
+ m_downloadList->current_window_list()->set_active_fg_color(active_fg_color); | |
+ m_downloadList->current_window_list()->set_active_bg_color(active_bg_color); | |
} | |
void | |
@@ -273,4 +282,44 @@ Root::current_input() { | |
return m_windowInput->input(); | |
} | |
+int | |
+Root::get_done_fg_color() { | |
+ return done_fg_color; | |
+} | |
+ | |
+void | |
+Root::set_done_fg_color(int64_t color) { | |
+ done_fg_color = color; | |
+} | |
+ | |
+int | |
+Root::get_done_bg_color() { | |
+ return done_bg_color; | |
+} | |
+ | |
+void | |
+Root::set_done_bg_color(int64_t color) { | |
+ done_bg_color = color; | |
+} | |
+ | |
+int | |
+Root::get_active_fg_color() { | |
+ return active_fg_color; | |
+} | |
+ | |
+void | |
+Root::set_active_fg_color(int64_t color) { | |
+ active_fg_color = color; | |
+} | |
+ | |
+int | |
+Root::get_active_bg_color() { | |
+ return active_bg_color; | |
+} | |
+ | |
+void | |
+Root::set_active_bg_color(int64_t color) { | |
+ active_bg_color = color; | |
+} | |
+ | |
} | |
diff --git a/src/ui/root.h b/src/ui/root.h | |
index e9a7907..3384341 100644 | |
--- a/src/ui/root.h | |
+++ b/src/ui/root.h | |
@@ -83,6 +83,15 @@ public: | |
void set_down_throttle_i64(int64_t throttle) { set_down_throttle(throttle >> 10); } | |
void set_up_throttle_i64(int64_t throttle) { set_up_throttle(throttle >> 10); } | |
+ int get_done_fg_color(); | |
+ void set_done_fg_color(int64_t color); | |
+ int get_done_bg_color(); | |
+ void set_done_bg_color(int64_t color); | |
+ int get_active_fg_color(); | |
+ void set_active_fg_color(int64_t color); | |
+ int get_active_bg_color(); | |
+ void set_active_bg_color(int64_t color); | |
+ | |
void adjust_down_throttle(int throttle); | |
void adjust_up_throttle(int throttle); | |
@@ -105,6 +114,11 @@ private: | |
WStatusbar* m_windowStatusbar; | |
input::Bindings m_bindings; | |
+ | |
+ int64_t done_fg_color; | |
+ int64_t done_bg_color; | |
+ int64_t active_fg_color; | |
+ int64_t active_bg_color; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc | |
index 518eda6..33eab8e 100644 | |
--- a/src/ui/download_list.cc | |
+++ b/src/ui/download_list.cc | |
@@ -349,9 +349,16 @@ DownloadList::setup_keys() { | |
m_uiArray[DISPLAY_LOG]->bindings()['B' - '@'] = | |
m_uiArray[DISPLAY_LOG]->bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD_LIST); | |
+ m_uiArray[DISPLAY_LOG]->bindings()['h'] = | |
+ m_uiArray[DISPLAY_LOG]->bindings()['B' - '@'] = | |
+ m_uiArray[DISPLAY_LOG]->bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD_LIST); | |
+ | |
m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()[KEY_RIGHT] = | |
m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['F' - '@'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD); | |
- m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['l'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_LOG); | |
+ | |
+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['l'] = | |
+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['F' - '@'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD); | |
+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['L'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_LOG); | |
} | |
} | |
diff --git a/src/ui/element_chunks_seen.cc b/src/ui/element_chunks_seen.cc | |
index 8ee1dd9..5336b05 100644 | |
--- a/src/ui/element_chunks_seen.cc | |
+++ b/src/ui/element_chunks_seen.cc | |
@@ -54,8 +54,12 @@ ElementChunksSeen::ElementChunksSeen(core::Download* d) : | |
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ | |
m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_next); | |
+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_next); | |
m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_prev); | |
+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_prev); | |
m_bindings[KEY_NPAGE] = sigc::mem_fun(*this, &ElementChunksSeen::receive_pagenext); | |
m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementChunksSeen::receive_pageprev); | |
} | |
diff --git a/src/ui/element_download_list.cc b/src/ui/element_download_list.cc | |
index e8b26f0..daa6279 100644 | |
--- a/src/ui/element_download_list.cc | |
+++ b/src/ui/element_download_list.cc | |
@@ -97,7 +97,9 @@ ElementDownloadList::ElementDownloadList() : | |
m_bindings['0'] = sigc::bind(sigc::mem_fun(*this, &ElementDownloadList::receive_change_view), "active"); | |
m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_prev); | |
+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_prev); | |
m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_next); | |
+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_next); | |
} | |
void | |
diff --git a/src/ui/element_file_list.cc b/src/ui/element_file_list.cc | |
index b8b4c96..9f262ad 100644 | |
--- a/src/ui/element_file_list.cc | |
+++ b/src/ui/element_file_list.cc | |
@@ -65,7 +65,9 @@ ElementFileList::ElementFileList(core::Download* d) : | |
m_collapsed(false) { | |
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_select); | |
+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_select); | |
m_bindings[' '] = sigc::mem_fun(*this, &ElementFileList::receive_priority); | |
m_bindings['*'] = sigc::mem_fun(*this, &ElementFileList::receive_change_all); | |
@@ -74,7 +76,9 @@ ElementFileList::ElementFileList(core::Download* d) : | |
m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementFileList::receive_pageprev); | |
m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_next); | |
+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_next); | |
m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_prev); | |
+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_prev); | |
} | |
inline ElementText* | |
diff --git a/src/ui/element_menu.cc b/src/ui/element_menu.cc | |
index 04130f3..b6b3ee9 100644 | |
--- a/src/ui/element_menu.cc | |
+++ b/src/ui/element_menu.cc | |
@@ -72,11 +72,15 @@ ElementMenu::ElementMenu() : | |
m_entry(entry_invalid) { | |
// Move bindings into a function that defines default bindings. | |
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_select); | |
+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_select); | |
m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_prev); | |
+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_prev); | |
m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_next); | |
+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_next); | |
} | |
ElementMenu::~ElementMenu() { | |
diff --git a/src/ui/element_peer_list.cc b/src/ui/element_peer_list.cc | |
index 7b69f48..7c89d5b 100644 | |
--- a/src/ui/element_peer_list.cc | |
+++ b/src/ui/element_peer_list.cc | |
@@ -73,14 +73,18 @@ ElementPeerList::ElementPeerList(core::Download* d) : | |
m_elementInfo->slot_exit(sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_LIST)); | |
- m_bindings['k'] = sigc::mem_fun(this, &ElementPeerList::receive_disconnect_peer); | |
+ m_bindings['K'] = sigc::mem_fun(this, &ElementPeerList::receive_disconnect_peer); | |
m_bindings['*'] = sigc::mem_fun(this, &ElementPeerList::receive_snub_peer); | |
m_bindings['B'] = sigc::mem_fun(this, &ElementPeerList::receive_ban_peer); | |
- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_INFO); | |
+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_INFO); | |
m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_prev); | |
+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_prev); | |
m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_next); | |
+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_next); | |
} | |
ElementPeerList::~ElementPeerList() { | |
diff --git a/src/ui/element_text.cc b/src/ui/element_text.cc | |
index a7496f2..4c2e171 100644 | |
--- a/src/ui/element_text.cc | |
+++ b/src/ui/element_text.cc | |
@@ -54,7 +54,9 @@ 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' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ | |
+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
// m_bindings[KEY_UP] = sigc::mem_fun(this, &ElementText::entry_prev); | |
// m_bindings[KEY_DOWN] = sigc::mem_fun(this, &ElementText::entry_next); | |
diff --git a/src/ui/element_tracker_list.cc b/src/ui/element_tracker_list.cc | |
index 7d81b89..5584653 100644 | |
--- a/src/ui/element_tracker_list.cc | |
+++ b/src/ui/element_tracker_list.cc | |
@@ -55,12 +55,15 @@ ElementTrackerList::ElementTrackerList(core::Download* d) : | |
m_focus(0) { | |
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
m_bindings[' '] = sigc::mem_fun(*this, &ElementTrackerList::receive_cycle_group); | |
m_bindings['*'] = sigc::mem_fun(*this, &ElementTrackerList::receive_disable); | |
m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_next); | |
+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_next); | |
m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev); | |
+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev); | |
} | |
void | |
diff --git a/src/ui/element_transfer_list.cc b/src/ui/element_transfer_list.cc | |
index 50eaec6..f14a2d2 100644 | |
--- a/src/ui/element_transfer_list.cc | |
+++ b/src/ui/element_transfer_list.cc | |
@@ -54,8 +54,12 @@ ElementTransferList::ElementTransferList(core::Download* d) : | |
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); | |
+ | |
m_bindings[KEY_DOWN] = sigc::mem_fun(*this, &ElementTransferList::receive_next); | |
+ m_bindings['j'] = sigc::mem_fun(*this, &ElementTransferList::receive_next); | |
m_bindings[KEY_UP] = sigc::mem_fun(*this, &ElementTransferList::receive_prev); | |
+ m_bindings['k'] = sigc::mem_fun(*this, &ElementTransferList::receive_prev); | |
m_bindings[KEY_NPAGE] = sigc::mem_fun(*this, &ElementTransferList::receive_pagenext); | |
m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementTransferList::receive_pageprev); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment