* Converting various variables to the new command version.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@891 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-04-17 14:57:56 +00:00
parent 7c121ac049
commit 81637ff5a0
14 changed files with 275 additions and 210 deletions
+6 -4
View File
@@ -126,19 +126,21 @@ void
Root::setup_keys() {
m_control->input()->push_back(&m_bindings);
if (strcasecmp(control->variable()->get_string("key_layout").c_str(), "azerty") == 0) {
const std::string& keyLayout = control->variable()->get_string("get_key_layout");
if (strcasecmp(keyLayout.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 if (strcasecmp(control->variable()->get_string("key_layout").c_str(), "qwertz") == 0) {
} else if (strcasecmp(keyLayout.c_str(), "qwertz") == 0) {
m_bindings['a'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), 1);
m_bindings['y'] = 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['Y'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), -1);
} else if (strcasecmp(control->variable()->get_string("key_layout").c_str(), "dvorak") == 0) {
} else if (strcasecmp(keyLayout.c_str(), "dvorak") == 0) {
m_bindings['a'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_up_throttle), 1);
m_bindings[';'] = 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);
@@ -151,7 +153,7 @@ Root::setup_keys() {
m_bindings['Z'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), -1);
}
if (strcasecmp(control->variable()->get_string("key_layout").c_str(), "dvorak") != 0) {
if (strcasecmp(keyLayout.c_str(), "dvorak") != 0) {
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['S'] = sigc::bind(sigc::mem_fun(*this, &Root::adjust_down_throttle), 5);