mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-15 21:56:18 +00:00
* Moved defininiton of priority enum to torrent/common.h.
* Properly return the size of the Block. * Bumped to 0.10.0/0.6.0. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@711 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -110,15 +110,15 @@ WindowFileList::redraw() {
|
||||
std::string priority;
|
||||
|
||||
switch (e.priority()) {
|
||||
case torrent::File::OFF:
|
||||
case torrent::PRIORITY_OFF:
|
||||
priority = "off";
|
||||
break;
|
||||
|
||||
case torrent::File::NORMAL:
|
||||
case torrent::PRIORITY_NORMAL:
|
||||
priority = " ";
|
||||
break;
|
||||
|
||||
case torrent::File::HIGH:
|
||||
case torrent::PRIORITY_HIGH:
|
||||
priority = "hig";
|
||||
break;
|
||||
|
||||
@@ -128,18 +128,18 @@ WindowFileList::redraw() {
|
||||
};
|
||||
|
||||
m_canvas->print(0, pos, "%c %s %6.1f %s %3d %9s",
|
||||
range.first == *m_focus ? '*' : ' ',
|
||||
path.c_str(),
|
||||
(double)e.size_bytes() / (double)(1 << 20),
|
||||
priority.c_str(),
|
||||
done_percentage(e),
|
||||
e.path()->encoding().c_str());
|
||||
range.first == *m_focus ? '*' : ' ',
|
||||
path.c_str(),
|
||||
(double)e.size_bytes() / (double)(1 << 20),
|
||||
priority.c_str(),
|
||||
done_percentage(e),
|
||||
e.path()->encoding().c_str());
|
||||
|
||||
m_canvas->print(84, pos, "%i - %i %c%c",
|
||||
e.chunk_begin(),
|
||||
e.chunk_begin() != e.chunk_end() ? (e.chunk_end() - 1) : e.chunk_end(),
|
||||
e.is_created() ? 'E' : 'M',
|
||||
e.is_correct_size() ? 'C' : 'W');
|
||||
e.chunk_begin(),
|
||||
e.chunk_begin() != e.chunk_end() ? (e.chunk_end() - 1) : e.chunk_end(),
|
||||
e.is_created() ? 'E' : 'M',
|
||||
e.is_correct_size() ? 'C' : 'W');
|
||||
|
||||
++range.first;
|
||||
++pos;
|
||||
|
||||
@@ -150,17 +150,17 @@ ElementFileList::next_priority(Priority p) {
|
||||
// Ahh... do +1 modulo.
|
||||
|
||||
switch(p) {
|
||||
case torrent::File::OFF:
|
||||
return torrent::File::HIGH;
|
||||
case torrent::PRIORITY_OFF:
|
||||
return torrent::PRIORITY_HIGH;
|
||||
|
||||
case torrent::File::NORMAL:
|
||||
return torrent::File::OFF;
|
||||
case torrent::PRIORITY_NORMAL:
|
||||
return torrent::PRIORITY_OFF;
|
||||
|
||||
case torrent::File::HIGH:
|
||||
return torrent::File::NORMAL;
|
||||
|
||||
case torrent::PRIORITY_HIGH:
|
||||
return torrent::PRIORITY_NORMAL;
|
||||
|
||||
default:
|
||||
return torrent::File::NORMAL;
|
||||
return torrent::PRIORITY_NORMAL;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace ui {
|
||||
|
||||
class ElementFileList : public ElementBase {
|
||||
public:
|
||||
typedef torrent::File::Priority Priority;
|
||||
typedef torrent::priority_t Priority;
|
||||
typedef display::WindowFileList WFileList;
|
||||
|
||||
ElementFileList(core::Download* d);
|
||||
|
||||
Reference in New Issue
Block a user