mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-16 22:26:16 +00:00
Added logging of some ui events.
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
#include <rak/path.h>
|
#include <rak/path.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <torrent/utils/log.h>
|
||||||
|
|
||||||
#ifdef __sun__
|
#ifdef __sun__
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
@@ -90,6 +91,8 @@ struct _transform_filename {
|
|||||||
|
|
||||||
void
|
void
|
||||||
PathInput::receive_do_complete() {
|
PathInput::receive_do_complete() {
|
||||||
|
lt_log_print(torrent::LOG_UI_EVENTS, "path_input: received completion");
|
||||||
|
|
||||||
size_type dirEnd = find_last_delim();
|
size_type dirEnd = find_last_delim();
|
||||||
|
|
||||||
utils::Directory dir(dirEnd != 0 ? str().substr(0, dirEnd) : "./");
|
utils::Directory dir(dirEnd != 0 ? str().substr(0, dirEnd) : "./");
|
||||||
@@ -123,6 +126,8 @@ PathInput::receive_do_complete() {
|
|||||||
m_showNext = ++utils::Directory::iterator(r.first) != r.second;
|
m_showNext = ++utils::Directory::iterator(r.first) != r.second;
|
||||||
|
|
||||||
if (m_showNext) {
|
if (m_showNext) {
|
||||||
|
lt_log_print(torrent::LOG_UI_EVENTS, "path_input: show next page");
|
||||||
|
|
||||||
for (signal_itr_itr::iterator itr = m_signal_show_range.begin(), last = m_signal_show_range.end(); itr != last; itr++)
|
for (signal_itr_itr::iterator itr = m_signal_show_range.begin(), last = m_signal_show_range.end(); itr != last; itr++)
|
||||||
(*itr)(r.first, r.second);
|
(*itr)(r.first, r.second);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ ElementStringList::activate(display::Frame* frame, bool focus) {
|
|||||||
if (is_active())
|
if (is_active())
|
||||||
throw torrent::internal_error("ui::ElementStringList::activate(...) 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);
|
control->input()->push_back(&m_bindings);
|
||||||
|
|
||||||
m_window = new WStringList();
|
m_window = new WStringList();
|
||||||
@@ -69,6 +71,8 @@ ElementStringList::disable() {
|
|||||||
if (!is_active())
|
if (!is_active())
|
||||||
throw torrent::internal_error("ui::ElementStringList::disable(...) !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);
|
control->input()->erase(&m_bindings);
|
||||||
|
|
||||||
m_frame->clear();
|
m_frame->clear();
|
||||||
@@ -80,6 +84,9 @@ ElementStringList::disable() {
|
|||||||
|
|
||||||
void
|
void
|
||||||
ElementStringList::next_screen() {
|
ElementStringList::next_screen() {
|
||||||
|
if (m_window == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (m_window->get_draw_end() != m_list.end())
|
if (m_window->get_draw_end() != m_list.end())
|
||||||
m_window->set_range(m_window->get_draw_end(), m_list.end());
|
m_window->set_range(m_window->get_draw_end(), m_list.end());
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <torrent/utils/log.h>
|
||||||
|
|
||||||
#include "element_base.h"
|
#include "element_base.h"
|
||||||
|
|
||||||
@@ -69,8 +70,14 @@ public:
|
|||||||
while (first != last)
|
while (first != last)
|
||||||
m_list.push_back(*(first++));
|
m_list.push_back(*(first++));
|
||||||
|
|
||||||
m_window->set_range(m_list.begin(), m_list.end());
|
if (m_window != NULL) {
|
||||||
m_window->mark_dirty();
|
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.
|
// A hack, clean this up.
|
||||||
@@ -81,8 +88,14 @@ public:
|
|||||||
while (first != last)
|
while (first != last)
|
||||||
m_list.push_back((first++)->d_name);
|
m_list.push_back((first++)->d_name);
|
||||||
|
|
||||||
m_window->set_range(m_list.begin(), m_list.end());
|
if (m_window != NULL) {
|
||||||
m_window->mark_dirty();
|
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();
|
void next_screen();
|
||||||
|
|||||||
Reference in New Issue
Block a user