* Changing priority of a directory changes the priority for all files

within that directory.

* Removed a buggy hack in FileListIterator::operator++().

* Cleaned up display of file sizes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@835 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-12-27 15:11:41 +00:00
parent 06dad41ff8
commit 0854e65775
4 changed files with 41 additions and 21 deletions
+5 -11
View File
@@ -114,22 +114,16 @@ WindowFileList::redraw() {
int64_t val = e->size_bytes();
if (val < (int64_t(1) << 30))
m_canvas->print(8, pos, "%5.1fMb", (double)val / (int64_t(1) << 20));
else if (val < (int64_t(1) << 40))
m_canvas->print(8, pos, "%5.1fGb", (double)val / (int64_t(1) << 30));
if (val < (int64_t(1000) << 20))
m_canvas->print(8, pos, "%5.1f M", (double)val / (int64_t(1) << 20));
else if (val < (int64_t(1000) << 30))
m_canvas->print(8, pos, "%5.1f G", (double)val / (int64_t(1) << 30));
else
m_canvas->print(8, pos, "%5.1fTb", (double)val / (int64_t(1) << 40));
m_canvas->print(8, pos, "%5.1f T", (double)val / (int64_t(1) << 40));
m_canvas->print(16 + itr.depth(), pos, "| %s",
itr.depth() < (*itr)->path()->size() ? (*itr)->path()->at(itr.depth()).c_str() : "UNKNOWN");
// %6.1f %s %3d %9s",
// (double)e->size_bytes() / (double)(1 << 20),
// priority.c_str(),
// done_percentage(e),
// e->path()->encoding().c_str());
// m_canvas->print(104, pos, "%i - %i %c%c %u %u",
// e->range().first,
// e->range().first != e->range().second ? (e->range().second - 1) : e->range().second,