mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-06 22:29:23 +00:00
Added logging of some ui events.
This commit is contained in:
@@ -55,6 +55,8 @@ ElementStringList::activate(display::Frame* frame, bool focus) {
|
||||
if (is_active())
|
||||
throw torrent::internal_error("ui::ElementStringList::activate(...) is_active().");
|
||||
|
||||
lt_log_print(torrent::LOG_UI_EVENTS, "element_string_list: activate");
|
||||
|
||||
control->input()->push_back(&m_bindings);
|
||||
|
||||
m_window = new WStringList();
|
||||
@@ -69,6 +71,8 @@ ElementStringList::disable() {
|
||||
if (!is_active())
|
||||
throw torrent::internal_error("ui::ElementStringList::disable(...) !is_active().");
|
||||
|
||||
lt_log_print(torrent::LOG_UI_EVENTS, "element_string_list: deactivate");
|
||||
|
||||
control->input()->erase(&m_bindings);
|
||||
|
||||
m_frame->clear();
|
||||
@@ -80,6 +84,9 @@ ElementStringList::disable() {
|
||||
|
||||
void
|
||||
ElementStringList::next_screen() {
|
||||
if (m_window == NULL)
|
||||
return;
|
||||
|
||||
if (m_window->get_draw_end() != m_list.end())
|
||||
m_window->set_range(m_window->get_draw_end(), m_list.end());
|
||||
else
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <torrent/utils/log.h>
|
||||
|
||||
#include "element_base.h"
|
||||
|
||||
@@ -69,8 +70,14 @@ public:
|
||||
while (first != last)
|
||||
m_list.push_back(*(first++));
|
||||
|
||||
m_window->set_range(m_list.begin(), m_list.end());
|
||||
m_window->mark_dirty();
|
||||
if (m_window != NULL) {
|
||||
lt_log_print(torrent::LOG_UI_EVENTS, "element_string_list: set range (visible)");
|
||||
|
||||
m_window->set_range(m_list.begin(), m_list.end());
|
||||
m_window->mark_dirty();
|
||||
} else {
|
||||
lt_log_print(torrent::LOG_UI_EVENTS, "element_string_list: set range (hidden)");
|
||||
}
|
||||
}
|
||||
|
||||
// A hack, clean this up.
|
||||
@@ -81,8 +88,14 @@ public:
|
||||
while (first != last)
|
||||
m_list.push_back((first++)->d_name);
|
||||
|
||||
m_window->set_range(m_list.begin(), m_list.end());
|
||||
m_window->mark_dirty();
|
||||
if (m_window != NULL) {
|
||||
lt_log_print(torrent::LOG_UI_EVENTS, "element_string_list: set dirent range (visible)");
|
||||
|
||||
m_window->set_range(m_list.begin(), m_list.end());
|
||||
m_window->mark_dirty();
|
||||
} else {
|
||||
lt_log_print(torrent::LOG_UI_EVENTS, "element_string_list: set dirent range (hidden)");
|
||||
}
|
||||
}
|
||||
|
||||
void next_screen();
|
||||
|
||||
Reference in New Issue
Block a user