summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.py8
-rw-r--r--src/windows.py4
2 files changed, 5 insertions, 7 deletions
diff --git a/src/keyboard.py b/src/keyboard.py
index 4ee620d4..942d9a70 100644
--- a/src/keyboard.py
+++ b/src/keyboard.py
@@ -23,7 +23,7 @@ shortcut, like ^A, M-a or KEY_RESIZE)
import time
-last_char_time = None
+last_timeout = time.time()
def get_next_byte(s):
"""
@@ -45,13 +45,11 @@ def read_char(s):
Read one utf-8 char
see http://en.wikipedia.org/wiki/UTF-8#Description
"""
- # We use a timer to know if we are pasting from the
- # clipboard or not
- # global last_char_time
- # last_char_time = time.time()
+ global last_timeout
s.timeout(1000)
(first, char) = get_next_byte(s)
if first is None and char is None:
+ last_timeout = time.time()
return None
if not isinstance(first, int): # Keyboard special, like KEY_HOME etc
return char
diff --git a/src/windows.py b/src/windows.py
index c8476d18..6273790d 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -1403,7 +1403,7 @@ class RosterWin(Win):
else:
self.addstr(display_name)
if contact.get_ask() == 'asked':
- self.addstr('?', common.curses_color_pair(theme.COLOR_HIGHLIGHT_TEXT))
+ self.addstr('?', common.curses_color_pair(theme.COLOR_HIGHLIGHT_NICK))
def draw_resource_line(self, y, resource, colored):
"""
@@ -1462,7 +1462,7 @@ class ContactInfoWin(Win):
self.addstr(1, 0, 'Subscription: %s' % (contact.get_subscription(),))
if contact.get_ask():
if contact.get_ask() == 'asked':
- self.addstr(' Ask: %s' % (contact.get_ask(),), common.curses_color_pair(theme.COLOR_HIGHLIGHT_TEXT))
+ self.addstr(' Ask: %s' % (contact.get_ask(),), common.curses_color_pair(theme.COLOR_HIGHLIGHT_NICK))
else:
self.addstr(' Ask: %s' % (contact.get_ask(),))