fix the colors for Subscribed alerts
This commit is contained in:
parent
f414f341a4
commit
5c0cf9a98d
2 changed files with 5 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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(),))
|
||||
|
||||
|
|
Loading…
Reference in a new issue