* 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:
rakshasa
2006-07-31 00:26:58 +00:00
parent fa5ff92e24
commit 62beb9d9ed
24 changed files with 272 additions and 261 deletions
+4 -4
View File
@@ -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
View File
@@ -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;
};