mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-11 12:42:31 +00:00
* Added "key_layout" option with support for azerty.
* Delayed the hash done signal. * Allow quick hash checks that only handles invalid chunks. * Show failed counter for peers. * Updated the man page. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@737 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+18
-7
@@ -37,11 +37,13 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string.h>
|
||||
#include <sigc++/bind.h>
|
||||
#include <torrent/torrent.h>
|
||||
|
||||
#include "display/window_statusbar.h"
|
||||
#include "input/manager.h"
|
||||
#include "utils/variable_map.h"
|
||||
|
||||
#include "control.h"
|
||||
#include "download_list.h"
|
||||
@@ -94,17 +96,26 @@ void
|
||||
Root::setup_keys() {
|
||||
m_control->input()->push_back(&m_bindings);
|
||||
|
||||
m_bindings['a'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), 1);
|
||||
m_bindings['z'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), -1);
|
||||
if (strcasecmp(control->variable()->get_string("key_layout").c_str(), "azerty") == 0) {
|
||||
m_bindings['q'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), 1);
|
||||
m_bindings['w'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), -1);
|
||||
m_bindings['Q'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), 1);
|
||||
m_bindings['W'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), -1);
|
||||
|
||||
} else {
|
||||
m_bindings['a'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), 1);
|
||||
m_bindings['z'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), -1);
|
||||
m_bindings['A'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), 1);
|
||||
m_bindings['Z'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), -1);
|
||||
}
|
||||
|
||||
m_bindings['s'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), 5);
|
||||
m_bindings['x'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), -5);
|
||||
m_bindings['d'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), 50);
|
||||
m_bindings['c'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), -50);
|
||||
|
||||
m_bindings['A'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), 1);
|
||||
m_bindings['Z'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), -1);
|
||||
m_bindings['S'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), 5);
|
||||
m_bindings['X'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), -5);
|
||||
|
||||
m_bindings['d'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), 50);
|
||||
m_bindings['c'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), -50);
|
||||
m_bindings['D'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), 50);
|
||||
m_bindings['C'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), -50);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user