summaryrefslogtreecommitdiff
path: root/src/roster.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/roster.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/roster.py')
-rw-r--r--src/roster.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/roster.py b/src/roster.py
index 8ae15490..a3741f82 100644
--- a/src/roster.py
+++ b/src/roster.py
@@ -180,6 +180,7 @@ class Roster(object):
for group in self.groups.values():
if not show_offline and group.get_nb_connected_contacts() == 0:
continue
+ before = length
if not group.name in self.folded_groups:
for contact in group.get_contacts(self.contact_filter):
# We do not count the offline contacts (depending on config)
@@ -190,7 +191,8 @@ class Roster(object):
if not contact.folded:
# One for each resource, if the contact is unfolded
length += len(contact)
- length += 1 # One for the group's line itself
+ if not self.contact_filter or before != length:
+ length += 1 # One for the group's line itself if needed
return length
def __repr__(self):