Changeset 9955
- Timestamp:
- 07/19/08 00:42:28 (5 months ago)
- Files:
-
- 1 modified
-
trunk/src/gajim.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gajim.py
r9945 r9955 629 629 ji = jid 630 630 631 highest = gajim.contacts.get_contact_with_highest_priority(account, jid) 632 was_highest = (highest and highest.resource == resource) 633 631 634 # Update contact 632 635 jid_list = gajim.contacts.get_jid_list(account) … … 640 643 contact1 = c 641 644 break 642 643 highest = gajim.contacts.get_highest_prio_contact_from_contacts(lcontact)644 if not highest or \645 (highest.priority < priority and highest.resource != resource) or \646 (highest.resource == resource and highest.priority > priority):647 # either this contact is the new highest priority contact or it was the648 # highest and dropped in priority (so may no longer be the highest)649 650 # disconnect sessions from this contact's chat controls so we651 # don't have to open a new tab if a new session comes in652 653 ctrl = self.msg_win_mgr.get_control(jid, account)654 if ctrl:655 ctrl.set_session(None)656 645 657 646 if contact1: … … 690 679 lcontact.append(contact1) 691 680 contact1.resource = resource 692 681 693 682 self.roster.add_contact(contact1.jid, account) 694 683 … … 781 770 self.handle_event_gc_notify(account, (jid, array[1], status_message, 782 771 array[3], None, None, None, None, None, [], None, None)) 772 773 highest = gajim.contacts.get_contact_with_highest_priority(account, jid) 774 is_highest = (highest and highest.resource == resource) 775 776 if was_highest and not is_highest: 777 ctrl = self.msg_win_mgr.get_control(jid, account) 778 if ctrl: 779 ctrl.set_session(None) 783 780 784 781 def handle_event_msgerror(self, account, array):
