mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-09 23:59:22 +00:00
Up and down on the download list working.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@250 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+9
-14
@@ -15,6 +15,8 @@
|
||||
|
||||
#include "input/bindings.h"
|
||||
#include "input/manager.h"
|
||||
#include "ui/control.h"
|
||||
#include "ui/download_list.h"
|
||||
|
||||
#include "signal_handler.h"
|
||||
|
||||
@@ -24,9 +26,6 @@ bool is_shutting_down = false;
|
||||
core::Poll poll;
|
||||
core::DownloadList downloads;
|
||||
|
||||
display::Manager displayManager;
|
||||
input::Manager inputManager;
|
||||
|
||||
void
|
||||
set_shutdown() {
|
||||
start_shutdown = true;
|
||||
@@ -51,16 +50,14 @@ main(int argc, char** argv) {
|
||||
|
||||
display::Canvas::init();
|
||||
|
||||
inputManager.push_back(new input::Bindings);
|
||||
ui::Control uiControl;
|
||||
ui::DownloadList uiDownloadList(&downloads, &uiControl);
|
||||
|
||||
poll.slot_read_stdin(sigc::mem_fun(inputManager, &input::Manager::pressed));
|
||||
uiDownloadList.activate();
|
||||
|
||||
poll.slot_read_stdin(sigc::mem_fun(uiControl.get_input(), &input::Manager::pressed));
|
||||
poll.register_http();
|
||||
|
||||
display::WindowDownloadList* wdl = new display::WindowDownloadList(&downloads);
|
||||
|
||||
displayManager.push_back(new display::WindowTitle);
|
||||
displayManager.push_back(wdl);
|
||||
|
||||
torrent::initialize();
|
||||
torrent::listen_open(6880, 6999);
|
||||
|
||||
@@ -71,8 +68,6 @@ main(int argc, char** argv) {
|
||||
|
||||
itr->open();
|
||||
itr->hash_check();
|
||||
|
||||
wdl->set_focus(itr);
|
||||
}
|
||||
|
||||
SignalHandler::set_handler(SIGINT, sigc::ptr_fun(&set_shutdown));
|
||||
@@ -81,8 +76,8 @@ main(int argc, char** argv) {
|
||||
if (start_shutdown && !is_shutting_down)
|
||||
do_shutdown();
|
||||
|
||||
displayManager.adjust_layout();
|
||||
displayManager.do_update();
|
||||
uiControl.get_display().adjust_layout();
|
||||
uiControl.get_display().do_update();
|
||||
|
||||
poll.poll();
|
||||
poll.work();
|
||||
|
||||
Reference in New Issue
Block a user