summaryrefslogtreecommitdiff
path: root/src/tabs
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-01-28 09:46:51 +0100
committermathieui <mathieui@mathieui.net>2015-01-28 09:54:30 +0100
commit3c46d49704de86635508439f524c684903dc81d3 (patch)
tree0c8e02a7a6f4d7e50e2d8842c86ce294e5189627 /src/tabs
parent0a7b4360adb26b102d85f3191f1061ce7f8dceb6 (diff)
downloadpoezio-3c46d49704de86635508439f524c684903dc81d3.tar.gz
poezio-3c46d49704de86635508439f524c684903dc81d3.tar.bz2
poezio-3c46d49704de86635508439f524c684903dc81d3.tar.xz
poezio-3c46d49704de86635508439f524c684903dc81d3.zip
Minor fixes to the certificate warning prompt (#2949)
- slightly lower the CPU usage (callback instead of active waiting w/ sleep) - make the terminal beep so the user knows something happened - prevent the user “escaping” the prompt by pressing /, s, or S
Diffstat (limited to 'src/tabs')
-rw-r--r--src/tabs/rostertab.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tabs/rostertab.py b/src/tabs/rostertab.py
index e923bef9..349058a3 100644
--- a/src/tabs/rostertab.py
+++ b/src/tabs/rostertab.py
@@ -1012,6 +1012,8 @@ class RosterInfoTab(Tab):
"""
'/' is pressed, we enter "input mode"
"""
+ if isinstance(self.input, windows.YesNoInput):
+ return
curses.curs_set(1)
self.input = windows.CommandInput("", self.reset_help_message, self.execute_slash_command)
self.input.resize(1, self.width, self.height-1, 0)
@@ -1187,6 +1189,8 @@ class RosterInfoTab(Tab):
Start the search. The input should appear with a short instruction
in it.
"""
+ if isinstance(self.input, windows.YesNoInput):
+ return
curses.curs_set(1)
self.input = windows.CommandInput("[Search]", self.on_search_terminate, self.on_search_terminate, self.set_roster_filter)
self.input.resize(1, self.width, self.height-1, 0)
@@ -1197,6 +1201,8 @@ class RosterInfoTab(Tab):
@refresh_wrapper.always
def start_search_slow(self):
+ if isinstance(self.input, windows.YesNoInput):
+ return
curses.curs_set(1)
self.input = windows.CommandInput("[Search]", self.on_search_terminate, self.on_search_terminate, self.set_roster_filter_slow)
self.input.resize(1, self.width, self.height-1, 0)