Changeset 6354

Show
Ignore:
Timestamp:
05/24/06 20:17:51 (2 years ago)
Author:
dkirov
Message:

prevent loop when adding metacontact to roster
(fixes #1953 and maybe #1991)

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.10/src/roster_window.py

    r6261 r6354  
    242242                family = gajim.contacts.get_metacontacts_family(account, jid) 
    243243 
    244                 shown_family = [] # family members that are in roster. 
     244                # family members that are in roster and belong to the same account. 
     245                shown_family = []  
    245246                if family: 
    246247                        for data in family: 
     248                                _account = data['account'] 
     249                                if _account != account: 
     250                                        continue 
    247251                                _jid = data['jid'] 
    248                                 _account = data['account'] 
     252                                 
    249253                                if self.get_contact_iter(_jid, _account): 
    250254                                        shown_family.append(data) 
  • trunk/src/roster_window.py

    r6347 r6354  
    240240                family = gajim.contacts.get_metacontacts_family(account, jid) 
    241241 
    242                 shown_family = [] # family members that are in roster. 
     242                # family members that are in roster and belong to the same account. 
     243                shown_family = []  
    243244                if family: 
    244245                        for data in family: 
     246                                _account = data['account'] 
     247                                #XXX When we support metacontacts from different servers, make  
     248                                # sure that loop from #1953 is fixed and remove next 2 lines! 
     249                                if _account != account: 
     250                                        continue 
    245251                                _jid = data['jid'] 
    246                                 _account = data['account'] 
     252                                 
    247253                                if self.get_contact_iter(_jid, _account): 
    248254                                        shown_family.append(data) 
     
    22512257         
    22522258        def on_new_chat_menuitem_activate(self, widget, account): 
    2253                 dialogs.NewChatDialog(account)   
     2259                dialogs.NewChatDialog(account) 
    22542260 
    22552261        def on_contents_menuitem_activate(self, widget):