Tab completion functional.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@357 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-03-17 01:07:54 +00:00
parent 8090d4db26
commit cefa2b584d
13 changed files with 275 additions and 17 deletions
+15
View File
@@ -80,6 +80,8 @@ Download::~Download() {
delete m_windowDownloadStatus;
delete m_windowMainStatus;
delete m_bindings;
m_connPeerConnected.disconnect();
m_connPeerDisconnected.disconnect();
}
@@ -216,6 +218,16 @@ Download::receive_change(Display d) {
activate_display(d);
}
void
Download::receive_snub_peer() {
if (m_focus == m_peers.end())
return;
m_focus->set_snubbed(!m_focus->get_snubbed());
mark_dirty();
}
void
Download::bind_keys() {
(*m_bindings)['a'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_throttle), 1);
@@ -245,6 +257,9 @@ Download::bind_keys() {
m_uiArray[DISPLAY_PEER_INFO]->get_bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
m_uiArray[DISPLAY_FILE_LIST]->get_bindings()[KEY_LEFT] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
m_uiArray[DISPLAY_TRACKER_LIST]->get_bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
m_uiArray[DISPLAY_PEER_LIST]->get_bindings()['*'] = sigc::mem_fun(*this, &Download::receive_snub_peer);
m_uiArray[DISPLAY_PEER_INFO]->get_bindings()['*'] = sigc::mem_fun(*this, &Download::receive_snub_peer);
}
void
+2
View File
@@ -88,6 +88,8 @@ private:
void receive_max_peers(int t);
void receive_change(Display d);
void receive_snub_peer();
void bind_keys();
void mark_dirty();
+2 -2
View File
@@ -29,7 +29,7 @@
#include "core/download.h"
#include "input/bindings.h"
#include "input/text_input.h"
#include "input/path_input.h"
#include "display/window_download_list.h"
#include "display/window_http_queue.h"
@@ -48,7 +48,7 @@ namespace ui {
DownloadList::DownloadList(Control* c) :
m_windowTitle(new WTitle("rtorrent " VERSION " - " + torrent::get(torrent::LIBRARY_NAME))),
m_windowStatus(new WStatus(&c->get_core())),
m_windowTextInput(new WInput(new input::TextInput)),
m_windowTextInput(new WInput(new input::PathInput)),
m_windowHttpQueue(new WHttp(&c->get_core().get_http_queue())),
m_taskUpdate(sigc::mem_fun(*this, &DownloadList::task_update)),