Task Scheduler, log viewer pops up and disapperes. good good

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@308 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-26 21:58:59 +00:00
parent 9fe97ee490
commit ef3a8fcd83
15 changed files with 221 additions and 49 deletions
+12
View File
@@ -28,6 +28,7 @@ DownloadList::DownloadList(Control* c) :
m_textInput(new WInput(new input::TextInput)),
m_windowHttpQueue(new WHttp(&c->get_core().get_http_queue())),
m_taskUpdate(sigc::mem_fun(*this, &DownloadList::task_update)),
m_download(NULL),
m_focus(c->get_core().get_download_list().end()),
m_control(c),
@@ -55,6 +56,8 @@ DownloadList::~DownloadList() {
void
DownloadList::activate() {
m_taskUpdate.insert(utils::Timer::cache() + 1000000);
m_textInput->set_active(false);
m_control->get_input().push_front(m_bindings);
@@ -69,6 +72,8 @@ DownloadList::activate() {
void
DownloadList::disable() {
m_taskUpdate.remove();
if (m_textInput->is_active()) {
m_textInput->get_input()->clear();
receive_exit_input();
@@ -191,6 +196,13 @@ DownloadList::receive_exit_input() {
m_bindings->erase(KEY_ENTER);
}
void
DownloadList::task_update() {
m_windowLog->receive_update();
m_taskUpdate.insert(utils::Timer::cache() + 1000000);
}
void
DownloadList::bind_keys(input::Bindings* b) {
(*b)['a'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::receive_throttle), 1);
+6
View File
@@ -3,6 +3,8 @@
#include <sigc++/slot.h>
#include "utils/task.h"
namespace display {
class WindowDownloadList;
class WindowHttpQueue;
@@ -60,6 +62,8 @@ private:
void receive_view_input();
void receive_exit_input();
void task_update();
void bind_keys(input::Bindings* b);
void mark_dirty();
@@ -71,6 +75,8 @@ private:
WInput* m_textInput;
WHttp* m_windowHttpQueue;
utils::Task m_taskUpdate;
Download* m_download;
DList* m_list;