Added file view.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@322 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-03-04 22:00:39 +00:00
parent 8d36f7c374
commit 9e0db66b58
14 changed files with 305 additions and 45 deletions
+7 -5
View File
@@ -23,12 +23,13 @@ WindowPeerInfo::redraw() {
m_canvas->erase();
int y = 0;
torrent::Download d = m_download->get_download();
m_canvas->print(0, y++, "Hash: %s", utils::string_to_hex(m_download->get_download().get_hash()).c_str());
m_canvas->print(0, y++, "Hash: %s", utils::string_to_hex(d.get_hash()).c_str());
m_canvas->print(0, y++, "Chunks: %u / %u * %u",
m_download->get_download().get_chunks_done(),
m_download->get_download().get_chunks_total(),
m_download->get_download().get_chunks_size());
d.get_chunks_done(),
d.get_chunks_total(),
d.get_chunks_size());
y++;
@@ -41,7 +42,8 @@ WindowPeerInfo::redraw() {
m_canvas->print(0, y++, "DNS: %s:%hu", (*m_focus)->get_dns().c_str(), (*m_focus)->get_port());
m_canvas->print(0, y++, "Id: %s" , utils::escape_string((*m_focus)->get_id()).c_str());
m_canvas->print(0, y++, "Snubbed: %s", (*m_focus)->get_snubbed() ? "Yes" : "No");
m_canvas->print(0, y++, "Done: %i%", (*m_focus)->get_chunks_done());
m_canvas->print(0, y++, "Done: %i%", d.get_chunks_total() ? (*m_focus)->get_chunks_done() / d.get_chunks_total() : 0);
m_canvas->print(0, y++, "Rate: %5.1f/%5.1f KB Total: %.1f/%.1f MB",
(double)(*m_focus)->get_rate_up() / (double)(1 << 10),