Hide/show input and status bar depending on whetever input has focus.

Added removal of downloads. 


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@283 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-16 20:03:40 +00:00
parent ab065e598b
commit e3a0730b33
7 changed files with 66 additions and 37 deletions
+10 -9
View File
@@ -1,15 +1,15 @@
#include "config.h"
#include <sstream>
#include <ncurses.h>
#include "text_input.h"
#include <sstream>
namespace input {
bool
TextInput::pressed(int key) {
std::stringstream str;
//std::stringstream str;
if (m_alt) {
m_alt = false;
@@ -32,6 +32,7 @@ TextInput::pressed(int key) {
} else {
switch (key) {
case 0x08:
case KEY_BACKSPACE:
if (m_pos != 0)
Base::erase(--m_pos, 1);
@@ -64,19 +65,19 @@ TextInput::pressed(int key) {
break;
default:
//return false;
return false;
// Testcode.
if (key == KEY_ENTER || key == '\n')
return false;
// if (key == KEY_ENTER || key == '\n')
// return false;
str << "\\x" << std::hex << key;
// str << "\\x" << std::hex << key;
Base::insert(m_pos, str.str());
// Base::insert(m_pos, str.str());
m_pos += str.str().length();
// m_pos += str.str().length();
return true;
// return true;
}
}