diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-04-10 20:03:16 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-04-10 20:03:16 +0200 |
commit | 5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a (patch) | |
tree | 9430036f3d49b7b095d2a4b588fdbb3aa4a698af /src | |
parent | f414f341a40c622365f127ef27c7e8f19b6fc47a (diff) | |
download | poezio-5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a.tar.gz poezio-5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a.tar.bz2 poezio-5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a.tar.xz poezio-5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a.zip |
fix the colors for Subscribed alerts
Diffstat (limited to 'src')
-rw-r--r-- | src/keyboard.py | 8 | ||||
-rw-r--r-- | src/windows.py | 4 |
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(),)) |