Author: asterix Date: 2007-03-09 20:17:19 +0100 (Fri, 09 Mar 2007) New Revision: 8006
Modified: trunk/src/common/contacts.py trunk/src/roster_window.py Log: when we compare 2 offline contacts, the one which has a status messages is shown above the one without. fixes #3010
Modified: trunk/src/common/contacts.py =================================================================== --- trunk/src/common/contacts.py 2007-03-08 09:13:41 UTC (rev 8005) +++ trunk/src/common/contacts.py 2007-03-09 19:17:19 UTC (rev 8006) @@ -405,6 +405,9 @@ score += contact.priority * 10 score += ['not in roster', 'error', 'offline', 'invisible', 'dnd', 'xa', 'away', 'chat', 'online', 'requested', 'message'].index(contact.show) + if contact.show == 'offline' and contact.status: + # Offline contacts with a status message have highest score + score += 1 return score
def get_metacontacts_big_brother(self, family):
Modified: trunk/src/roster_window.py =================================================================== --- trunk/src/roster_window.py 2007-03-08 09:13:41 UTC (rev 8005) +++ trunk/src/roster_window.py 2007-03-09 19:17:19 UTC (rev 8006) @@ -3956,6 +3956,12 @@ return -1 elif show1 > show2: return 1 + if show1 == 6 and show2 == 6: + # If both are offline, and one has a status message, it is above + if contact1.status and not contact2.status: + return -1 + elif contact2.status and not contact1.status: + return 1 # We compare names if name1.lower() < name2.lower(): return -1