From 10ff3141d9278ab9e983aac3ec7c29dc15116cff Mon Sep 17 00:00:00 2001 From: rakshasa Date: Tue, 19 Jul 2005 14:00:20 +0000 Subject: [PATCH] * Added posix_fallocate to File::reserve, though it is disabled by default. * Added some checks to the keyboard input code in the client, perhaps it'll fix the bug some OpenBSD people are encountering. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@501 e378c898-3ddf-0310-93e7-cc216c733640 --- src/input/text_input.cc | 15 --------------- src/ui/download_list.cc | 6 ++++++ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/input/text_input.cc b/src/input/text_input.cc index 032633ee..2d5283c6 100644 --- a/src/input/text_input.cc +++ b/src/input/text_input.cc @@ -36,7 +36,6 @@ #include "config.h" -#include #include #include "text_input.h" @@ -45,8 +44,6 @@ namespace input { bool TextInput::pressed(int key) { - //std::stringstream str; - if (m_alt) { m_alt = false; @@ -102,18 +99,6 @@ TextInput::pressed(int key) { default: return false; - - // Testcode. -// if (key == KEY_ENTER || key == '\n') -// return false; - -// str << "\\x" << std::hex << key; - -// Base::insert(m_pos, str.str()); - -// m_pos += str.str().length(); - -// return true; } } diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc index 5fbc1569..e1e4576a 100644 --- a/src/ui/download_list.cc +++ b/src/ui/download_list.cc @@ -241,6 +241,9 @@ DownloadList::receive_check_hash() { void DownloadList::receive_view_input(bool useDefault) { + if (m_windowTextInput->get_active()) + return; + m_control->get_ui().window_statusbar()->set_active(false); m_windowTextInput->set_active(true); m_control->get_display().adjust_layout(); @@ -255,6 +258,9 @@ DownloadList::receive_view_input(bool useDefault) { void DownloadList::receive_exit_input(bool useDefault) { + if (!m_windowTextInput->get_active()) + return; + m_control->get_ui().window_statusbar()->set_active(true); m_windowTextInput->set_active(false);