Work on peer info display.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@260 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-07 23:40:48 +00:00
parent 45404b7473
commit b657554236
10 changed files with 199 additions and 21 deletions
+32
View File
@@ -0,0 +1,32 @@
#include "config.h"
#include <stdexcept>
#include "canvas.h"
#include "window_peer_info.h"
namespace display {
WindowPeerInfo::WindowPeerInfo(PList* l, PList::iterator* f) :
Window(new Canvas, true),
m_list(l),
m_focus(f) {
}
void
WindowPeerInfo::redraw() {
if (Timer::cache() - m_lastDraw < 1000000)
return;
m_lastDraw = Timer::cache();
m_canvas->erase();
if (*m_focus == m_list->end())
mvprintw(0, 0, "No focus");
else
mvprintw(0, 0, "Focus on: %s:%i",
(*m_focus)->get_dns().c_str(),
(*m_focus)->get_port());
}
}