Changeset 9894 for trunk/src/roster_window.py
- Timestamp:
- 07/07/08 00:24:58 (5 months ago)
- Files:
-
- 1 modified
-
trunk/src/roster_window.py (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/roster_window.py
r9892 r9894 668 668 669 669 670 def remove_contact(self, jid, account, force = False, backend =False):670 def remove_contact(self, jid, account, force=False, backend=False): 671 671 '''Remove contact from roster. 672 672 … … 693 693 # Contact has pending events 694 694 key = (jid, account) 695 if not key in self.contacts_to_be_removed .keys():695 if not key in self.contacts_to_be_removed: 696 696 self.contacts_to_be_removed[key] = {'backend': backend} 697 697 return False … … 706 706 self._remove_entity(contact, account) 707 707 708 # Draw all groups of the contact709 708 710 709 if backend: 711 710 # Remove contact before redrawing, otherwise the old 712 711 # numbers will still be show 713 gajim.contacts.remove_jid(account, jid) 714 712 gajim.contacts.remove_jid(account, jid, remove_meta=True) 713 family = gajim.contacts.get_metacontacts_family(account, jid) 714 if family: 715 # reshow the rest of the family 716 self._add_metacontact_family(family, account) 717 718 # Draw all groups of the contact 715 719 for group in contact.get_shown_groups(): 716 720 self.draw_group(group, account) … … 746 750 contact = gajim.contacts.get_contact_with_highest_priority(account, jid) 747 751 if contact.is_groupchat(): 748 self.remove_contact(jid, account, force = True, backend =True)752 self.remove_contact(jid, account, force=True, backend=True) 749 753 return True 750 754 else: … … 768 772 '''Remove transport from roster and redraw account and group.''' 769 773 contact = gajim.contacts.get_contact_with_highest_priority(account, jid) 770 self.remove_contact(jid, account, force = True, backend =True)774 self.remove_contact(jid, account, force=True, backend=True) 771 775 return True 772 776 … … 1604 1608 del self.contacts_to_be_removed[key] 1605 1609 # Remove contact will delay removal if there are more events pending 1606 self.remove_contact(jid, account, backend =True)1610 self.remove_contact(jid, account, backend=True) 1607 1611 self.show_title() 1608 1612 … … 1818 1822 show in ('offline', 'error'): 1819 1823 # SelfContact went offline. Remove him when last pending message was read 1820 self.remove_contact(contact.jid, account, backend =True)1824 self.remove_contact(contact.jid, account, backend=True) 1821 1825 1822 1826 # print status in chat window and update status/GPG image … … 2274 2278 # remove it from treeview 2275 2279 gajim.connections[account].unsubscribe(contact.jid) 2276 self.remove_contact(contact.jid, account, backend =True)2280 self.remove_contact(contact.jid, account, backend=True) 2277 2281 return 2278 2282 … … 2282 2286 gajim.connections[account].unsubscribe_agent(full_jid) 2283 2287 # remove transport from treeview 2284 self.remove_contact(contact.jid, account, backend =True)2288 self.remove_contact(contact.jid, account, backend=True) 2285 2289 2286 2290 # Check if there are unread events from some contacts … … 2545 2549 else: 2546 2550 gajim.connections[account].unsubscribe(contact.jid) 2547 self.remove_contact(contact.jid, account, backend =True)2551 self.remove_contact(contact.jid, account, backend=True) 2548 2552 2549 2553 def on_assign_pgp_key(self, widget, contact, account): … … 2919 2923 for (contact, account) in list_: 2920 2924 gajim.connections[account].unsubscribe(contact.jid, remove_auth) 2921 self.remove_contact(contact.jid, account, backend =True)2925 self.remove_contact(contact.jid, account, backend=True) 2922 2926 if not remove_auth and contact.sub == 'both': 2923 2927 contact.name = ''
