diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-08-01 16:00:01 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-08-01 16:00:01 +0200 |
commit | 271fd662a18d0a289fa73c1f42885a451accb1b8 (patch) | |
tree | 269f43afb5f345a4cb0bc290366aa96c17cbae45 /src/windows/input_placeholders.py | |
parent | ba93f3f236e68b14d84c9bc621c638c4f79207f9 (diff) | |
download | poezio-271fd662a18d0a289fa73c1f42885a451accb1b8.tar.gz poezio-271fd662a18d0a289fa73c1f42885a451accb1b8.tar.bz2 poezio-271fd662a18d0a289fa73c1f42885a451accb1b8.tar.xz poezio-271fd662a18d0a289fa73c1f42885a451accb1b8.zip |
Entirely remove the g_lock (used to avoid a few race conditions with ncures)
Diffstat (limited to 'src/windows/input_placeholders.py')
-rw-r--r-- | src/windows/input_placeholders.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/windows/input_placeholders.py b/src/windows/input_placeholders.py index 796cf0ad..6fd7975a 100644 --- a/src/windows/input_placeholders.py +++ b/src/windows/input_placeholders.py @@ -7,7 +7,7 @@ import logging log = logging.getLogger(__name__) -from . import Win, g_lock +from . import Win from theming import get_theme, to_curses_attr @@ -25,11 +25,10 @@ class HelpText(Win): log.debug('Refresh: %s', self.__class__.__name__) if txt: self.txt = txt - with g_lock: - self._win.erase() - self.addstr(0, 0, self.txt[:self.width-1], to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) - self.finish_line(get_theme().COLOR_INFORMATION_BAR) - self._refresh() + self._win.erase() + self.addstr(0, 0, self.txt[:self.width-1], to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) + self.finish_line(get_theme().COLOR_INFORMATION_BAR) + self._refresh() def do_command(self, key, raw=False): return False @@ -58,11 +57,10 @@ class YesNoInput(Win): log.debug('Refresh: %s', self.__class__.__name__) if txt: self.txt = txt - with g_lock: - self._win.erase() - self.addstr(0, 0, self.txt[:self.width-1], to_curses_attr(get_theme().COLOR_WARNING_PROMPT)) - self.finish_line(get_theme().COLOR_WARNING_PROMPT) - self._refresh() + self._win.erase() + self.addstr(0, 0, self.txt[:self.width-1], to_curses_attr(get_theme().COLOR_WARNING_PROMPT)) + self.finish_line(get_theme().COLOR_WARNING_PROMPT) + self._refresh() def do_command(self, key, raw=False): if key.lower() in self.key_func: |