Adding active/disabled status on windows so it's easier to show/hide

them while keeping the order.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@284 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-16 20:34:20 +00:00
parent e3a0730b33
commit f9975ae9f2
4 changed files with 47 additions and 15 deletions
+9 -5
View File
@@ -45,8 +45,11 @@ DownloadList::~DownloadList() {
void
DownloadList::activate() {
m_textInput->set_active(false);
m_control->get_input().push_front(m_bindings);
m_control->get_display().push_back(m_textInput);
m_control->get_display().push_back(m_status);
m_control->get_display().push_front(m_window);
m_control->get_display().push_front(m_title);
@@ -54,7 +57,7 @@ DownloadList::activate() {
void
DownloadList::disable() {
if (m_textInput->get_focus()) {
if (m_textInput->is_active()) {
m_textInput->get_input()->clear();
receive_exit_input();
}
@@ -64,6 +67,7 @@ DownloadList::disable() {
m_control->get_display().erase(m_title);
m_control->get_display().erase(m_window);
m_control->get_display().erase(m_status);
m_control->get_display().erase(m_textInput);
}
void
@@ -144,8 +148,8 @@ DownloadList::receive_exit_download() {
void
DownloadList::receive_view_input() {
m_control->get_display().erase(m_status);
m_control->get_display().push_back(m_textInput);
m_status->set_active(false);
m_textInput->set_active(true);
m_control->get_display().adjust_layout();
m_control->get_input().set_text_input(m_textInput->get_input());
@@ -158,8 +162,8 @@ DownloadList::receive_view_input() {
void
DownloadList::receive_exit_input() {
m_control->get_display().erase(m_textInput);
m_control->get_display().push_back(m_status);
m_status->set_active(true);
m_textInput->set_active(false);
m_control->get_display().adjust_layout();
m_control->get_input().set_text_input();