Changeset 9046
- Timestamp:
- 11/24/07 10:49:52 (13 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11.3-bugfixes/src/common/contacts.py
r9027 r9046 398 398 show_list = ['not in roster', 'error', 'offline', 'invisible', 'dnd', 399 399 'xa', 'away', 'chat', 'online', 'requested', 'message'] 400 show1 = show_list.index(contact1.show) 401 show2 = show_list.index(contact2.show) 400 # contact can be null when we fill the roster on connection 401 if not contact1: 402 show1 = 0 403 priority1 = 0 404 else: 405 show1 = show_list.index(contact1.show) 406 priority1 = contact1.priority 407 if not contact1: 408 show2 = 0 409 priority2 = 0 410 else: 411 show2 = show_list.index(contact2.show) 412 priority2 = contact2.priority 402 413 # If only one is offline, it's always second 403 414 if show1 > 2 and show2 < 3: … … 416 427 if transport1 and not transport2: 417 428 return -1 418 if contact1.priority > contact2.priority:429 if priority1 > priority2: 419 430 return 1 420 if contact2.priority > contact1.priority:431 if priority2 > priority1: 421 432 return -1 422 433 if show1 > show2:
