mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 06:32:31 +00:00
* Moved handling of events from DownloadList into ElementDownloadList
and WindowLog. * Added bindings to input::TextInput and disabled other bindings while it is active. * ^K now sets ignore_commands. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@750 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -61,10 +61,10 @@ Manager::erase(Bindings* b) {
|
||||
|
||||
void
|
||||
Manager::pressed(int key) {
|
||||
if (m_textInput != NULL && m_textInput->pressed(key))
|
||||
return;
|
||||
|
||||
std::find_if(begin(), end(), std::bind2nd(std::mem_fun(&Bindings::pressed), key));
|
||||
if (m_textInput != NULL)
|
||||
m_textInput->pressed(key);
|
||||
else
|
||||
std::find_if(rbegin(), rend(), std::bind2nd(std::mem_fun(&Bindings::pressed), key));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-6
@@ -37,16 +37,16 @@
|
||||
#ifndef RTORRENT_INPUT_MANAGER_H
|
||||
#define RTORRENT_INPUT_MANAGER_H
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
namespace input {
|
||||
|
||||
class Bindings;
|
||||
class TextInput;
|
||||
|
||||
class Manager : private std::list<Bindings*> {
|
||||
class Manager : private std::vector<Bindings*> {
|
||||
public:
|
||||
typedef std::list<Bindings*> Base;
|
||||
typedef std::vector<Bindings*> Base;
|
||||
|
||||
using Base::iterator;
|
||||
using Base::const_iterator;
|
||||
@@ -59,7 +59,6 @@ public:
|
||||
using Base::rend;
|
||||
|
||||
using Base::push_back;
|
||||
using Base::push_front;
|
||||
|
||||
Manager() : m_textInput(NULL) {}
|
||||
|
||||
@@ -69,8 +68,6 @@ public:
|
||||
|
||||
void set_text_input(TextInput* input = NULL) { m_textInput = input; }
|
||||
|
||||
// Slot for unreacted keys.
|
||||
|
||||
private:
|
||||
TextInput* m_textInput;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user