mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-11 20:52:30 +00:00
* Allow Frame's to be located in both rows and columns. Improved min
height/width for windows. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@748 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -45,11 +45,9 @@
|
||||
namespace display {
|
||||
|
||||
WindowLog::WindowLog(core::Log* l) :
|
||||
Window(new Canvas, false, 0),
|
||||
Window(new Canvas, flag_width_dynamic, 0, 0),
|
||||
m_log(l) {
|
||||
|
||||
m_active = false;
|
||||
|
||||
// We're trying out scheduled tasks instead.
|
||||
m_connUpdate = l->signal_update().connect(sigc::mem_fun(*this, &WindowLog::receive_update));
|
||||
}
|
||||
@@ -69,7 +67,7 @@ WindowLog::redraw() {
|
||||
|
||||
int pos = 0;
|
||||
|
||||
for (core::Log::iterator itr = m_log->begin(), end = find_older(); itr != end && pos < m_canvas->get_height(); ++itr) {
|
||||
for (core::Log::iterator itr = m_log->begin(), end = find_older(); itr != end && pos < m_canvas->height(); ++itr) {
|
||||
char buffer[16];
|
||||
print_hhmmss_local(buffer, buffer + 16, static_cast<time_t>(itr->first.seconds()));
|
||||
|
||||
@@ -80,7 +78,7 @@ WindowLog::redraw() {
|
||||
void
|
||||
WindowLog::receive_update() {
|
||||
iterator itr = find_older();
|
||||
int h = std::min(std::distance(m_log->begin(), itr), (std::iterator_traits<iterator>::difference_type)10);
|
||||
extent_type h = std::min(std::distance(m_log->begin(), itr), (std::iterator_traits<iterator>::difference_type)10);
|
||||
|
||||
if (h != m_minHeight) {
|
||||
set_active(h != 0);
|
||||
|
||||
Reference in New Issue
Block a user