Changeset 9847 for trunk/src/gajim.py

Show
Ignore:
Timestamp:
06/27/08 01:37:12 (5 months ago)
Author:
bct
Message:

win.get_controls() isn't needed anymore

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gajim.py

    r9846 r9847  
    10351035 
    10361036                # show avatar in chat 
    1037                 ctrls = [] 
    10381037                if resource and self.msg_win_mgr.has_window(fjid, account): 
    10391038                        win = self.msg_win_mgr.get_window(fjid, account) 
    1040                         ctrls = win.get_controls(fjid, account) 
     1039                        ctrl = win.get_control(fjid, account) 
    10411040                elif self.msg_win_mgr.has_window(jid, account): 
    10421041                        win = self.msg_win_mgr.get_window(jid, account) 
    1043                         ctrls = win.get_controls(jid, account) 
    1044  
    1045                 for ctrl in ctrls: 
    1046                         if ctrl.type_id != message_control.TYPE_GC: 
    1047                                 ctrl.show_avatar() 
     1042                        ctrl = win.get_control(jid, account) 
     1043 
     1044                if ctrl and ctrl.type_id != message_control.TYPE_GC: 
     1045                        ctrl.show_avatar() 
    10481046 
    10491047                # Show avatar in roster or gc_roster 
     
    26062604 
    26072605                        if win: 
    2608                                 ctrls = win.get_controls(fjid, account) 
    2609                                 if ctrls: 
    2610                                         ctrl = ctrls[0] 
     2606                                ctrl = win.get_control(fjid, account) 
    26112607 
    26122608                if not ctrl: 
     
    26212617 
    26222618                if gajim.connections[account].is_zeroconf and \ 
    2623                                 gajim.connections[account].status in ('offline', 'invisible'): 
    2624                         for ctrl in win.get_controls(fjid, account): 
     2619                gajim.connections[account].status in ('offline', 'invisible'): 
     2620                        ctrl = win.get_control(fjid, account) 
     2621                        if ctrl: 
    26252622                                ctrl.got_disconnected() 
    26262623