* Added view of blocks in transfer list view.

* Show chunks with only queued transfers with an underscore in chunks
seen view. Patch by Josef Drexler, public domain.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@719 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-06-12 22:34:41 +00:00
parent 38f0cdbce2
commit b3b4acaad8
4 changed files with 105 additions and 22 deletions
+17 -7
View File
@@ -50,20 +50,30 @@ namespace display {
class WindowDownloadTransferList : public Window {
public:
struct assigned_type {
assigned_type(torrent::BlockTransfer::key_type key, uint32_t last, char id) : m_key(key), m_last(last), m_id(id) { }
torrent::BlockTransfer::key_type m_key;
uint32_t m_last;
char m_id;
};
typedef std::vector<assigned_type> assigned_vector;
WindowDownloadTransferList(core::Download* d, unsigned int* focus);
virtual void redraw();
virtual void redraw();
unsigned int rows() const;
unsigned int max_focus() const { return std::max<int>(rows() - get_height() + 1, 0); }
unsigned int rows() const;
unsigned int max_focus() const { return std::max<int>(rows() - get_height() + 1, 0); }
private:
char peer_id(torrent::BlockTransfer::key_type key);
char key_id(torrent::BlockTransfer::key_type key);
core::Download* m_download;
core::Download* m_download;
unsigned int* m_focus;
unsigned int* m_focus;
assigned_vector m_assigned;
};
}