From a9f233d2cd38f4778a0dec18de42fe9c00f542c0 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 16 Mar 2009 09:37:40 +0000 Subject: [PATCH] show only contact with subscription none of from in the bottom of roster. Fixes #4877, see #4778 --- src/roster_window.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 573dd24e6..23e4c19bf 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1592,15 +1592,10 @@ class RosterWindow: return -1 sub1 = contact1.sub sub2 = contact2.sub - # both goes before - if sub1 == 'both' and sub2 != 'both': + # none and from goes after + if sub1 not in ['none', 'from'] and sub2 in ['none', 'from']: return -1 - if sub1 != 'both' and sub2 == 'both': - return 1 - # none goes after - if sub1 != 'none' and sub2 == 'none': - return -1 - if sub1 == 'none' and sub2 != 'none': + if sub1 in ['none', 'from'] and sub2 not in ['none', 'from']: return 1 if show1 < show2: return -1