* Show "Hashing:" for torrents that are queued for hashing.

* Allow different min/max peers setting for seeding. Patch by Josef
Drexler.

* Man page entry for "safe_sync" and "max/min_peers_seed".

* The p,o,i,u keys are now bound so they change ElementMenu directly.

* Bound ^P and ^N for moving up/down.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@758 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-08-15 19:35:43 +00:00
parent 4d988fccb9
commit ee7016f547
15 changed files with 145 additions and 62 deletions
+17 -8
View File
@@ -72,6 +72,23 @@ TextElementValueBase::print(char* first, char* last, Canvas::attributes_list* at
if (first == last) {
// Do nothing, but ensure that the last attributes are set.
} else if (m_flags & flag_kb) {
// Just use a default width of 5 for now.
first += std::max(snprintf(first, last - first + 1, "%5.1f", (double)val / (1 << 10)), 0);
} else if (m_flags & flag_mb) {
// Just use a default width of 8 for now.
first += std::max(snprintf(first, last - first + 1, "%8.1f", (double)val / (1 << 20)), 0);
} else if (m_flags & flag_xb) {
if (val < (int64_t(1) << 30))
first += std::max(snprintf(first, last - first + 1, "%5.1f MB", (double)val / (int64_t(1) << 20)), 0);
else if (val < (int64_t(1) << 40))
first += std::max(snprintf(first, last - first + 1, "%5.1f GB", (double)val / (int64_t(1) << 30)), 0);
else
first += std::max(snprintf(first, last - first + 1, "%5.1f TB", (double)val / (int64_t(1) << 40)), 0);
} else if (m_flags & flag_timer) {
if (val == 0)
first += std::max(snprintf(first, last - first + 1, "--:--:--"), 0);
@@ -96,14 +113,6 @@ TextElementValueBase::print(char* first, char* last, Canvas::attributes_list* at
first += std::max(snprintf(first, last - first + 1, "%2d:%02d:%02d", u->tm_hour, u->tm_min, u->tm_sec), 0);
} else if (m_flags & flag_kb) {
// Just use a default width of 5 for now.
first += std::max(snprintf(first, last - first + 1, "%5.1f", (double)val / (1 << 10)), 0);
} else if (m_flags & flag_mb) {
// Just use a default width of 5 for now.
first += std::max(snprintf(first, last - first + 1, "%8.1f", (double)val / (1 << 20)), 0);
} else {
first += std::max(snprintf(first, last - first + 1, "%lld", val), 0);
}