summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-11-22 00:29:44 +0100
committermathieui <mathieui@mathieui.net>2012-11-22 00:29:44 +0100
commit4a7e08f1c2ffb3780bd21e9ecbbcbaaf2d32f742 (patch)
tree35c4bd3739c131ff761473d19b1ac120ad431785 /src/windows.py
parentd3e1f8085ee843a0630a6a45fb85314b655eaaac (diff)
downloadpoezio-4a7e08f1c2ffb3780bd21e9ecbbcbaaf2d32f742.tar.gz
poezio-4a7e08f1c2ffb3780bd21e9ecbbcbaaf2d32f742.tar.bz2
poezio-4a7e08f1c2ffb3780bd21e9ecbbcbaaf2d32f742.tar.xz
poezio-4a7e08f1c2ffb3780bd21e9ecbbcbaaf2d32f742.zip
Make the search usable again
- Disable the history when searching - → allow moving the cursor around to select a contact when searching - fix refresh issues
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index 589f808c..751c6c39 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -1433,6 +1433,19 @@ class CommandInput(Input):
self.on_input(self.get_text())
return res
+ def disable_history(self):
+ """
+ Disable the history (up/down) keys
+ """
+ if 'KEY_UP' in self.key_func:
+ del self.key_func['KEY_UP']
+ if 'KEY_DOWN' in self.key_func:
+ del self.key_func['KEY_DOWN']
+
+ @property
+ def history_disabled(self):
+ return ('KEY_UP' not in self.key_func and 'KEY_DOWN' not in self.key_func)
+
def success(self):
"""
call the success callback, passing the text as argument
@@ -1617,7 +1630,7 @@ class RosterWin(Win):
self.draw_roster_information(roster)
y = 1
show_offline = config.get('roster_show_offline', 'false') == 'true'
- sort = config.get('roster_sort', 'jid_show') or 'jid_show'
+ sort = config.get('roster_sort', 'jid:show') or 'jid:show'
group_sort = config.get('roster_group_sort', 'name') or 'name'
for group in roster.get_groups(group_sort):
contacts_filtered = group.get_contacts(roster.contact_filter)
@@ -1658,6 +1671,7 @@ class RosterWin(Win):
self.draw_plus(self.height-1)
self._refresh()
+
def draw_plus(self, y):
"""
Draw the indicator that shows that