* Set Content::m_chunkSize before adding files.

* Removed the old FileList and replaced it with the cleaned up
EntryList code. The API now gives a FileList* instead of FileList.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@810 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-11-22 12:57:38 +00:00
parent e3f59ee9e4
commit 281f924556
8 changed files with 49 additions and 38 deletions
+5 -5
View File
@@ -76,9 +76,9 @@ WindowFileList::redraw() {
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(10)).round_seconds());
m_canvas->erase();
torrent::FileList fl = m_download->download()->file_list();
torrent::FileList* fl = m_download->download()->file_list();
if (fl.size() == 0 || m_canvas->height() < 2)
if (fl->size_files() == 0 || m_canvas->height() < 2)
return;
int pos = 0;
@@ -92,13 +92,13 @@ WindowFileList::redraw() {
++pos;
if (*m_focus >= fl.size())
if (*m_focus >= fl->size_files())
throw std::logic_error("WindowFileList::redraw() called on an object with a bad focus value");
Range range = rak::advance_bidirectional<unsigned int>(0, *m_focus, fl.size(), m_canvas->height() - pos);
Range range = rak::advance_bidirectional<unsigned int>(0, *m_focus, fl->size_files(), m_canvas->height() - pos);
while (range.first != range.second) {
torrent::File* e = fl.get(range.first);
torrent::File* e = fl->at_index(range.first);
std::string path = e->path()->as_string();