Changeset 9846 for trunk/src/common/helpers.py
- Timestamp:
- 06/27/08 01:36:58 (5 months ago)
- Files:
-
- 1 modified
-
trunk/src/common/helpers.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/helpers.py
r9815 r9846 959 959 highest_contact = gajim.contacts.get_contact_with_highest_priority( 960 960 account, contact.jid) 961 961 962 # Look for a chat control that has the given resource, or default to 962 963 # one without resource 963 ctrl s = gajim.interface.msg_win_mgr.get_chat_controls(full_jid_with_resource,964 ctrl = gajim.interface.msg_win_mgr.get_control(full_jid_with_resource, 964 965 account) 965 if ctrls: 966 return ctrls[0] 967 elif not highest_contact or not highest_contact.resource: 968 # unknow contact or offline message 969 pass # fall through, handle this at the end 970 elif highest_contact and contact.resource != \ 971 highest_contact.resource: 966 967 if ctrl: 968 return ctrl 969 elif highest_contact and highest_contact.resource and \ 970 contact.resource != highest_contact.resource: 972 971 return None 973 974 ctrls = gajim.interface.msg_win_mgr.get_chat_controls(contact.jid, account) 975 if ctrls: 976 return ctrls[0] 977 else: 978 return None 972 else: 973 # unknown contact or offline message 974 return gajim.interface.msg_win_mgr.get_control(contact.jid, account) 979 975 980 976 def reduce_chars_newlines(text, max_chars = 0, max_lines = 0):
