Show
Ignore:
Timestamp:
05/03/08 02:10:17 (7 months ago)
Author:
bct
Message:

pm fixes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/session_centric/src/groupchat_control.py

    r9556 r9560  
    122122        def __init__(self, parent_win, gc_contact, contact, account, session): 
    123123                room_jid = contact.jid.split('/')[0] 
    124                 room_ctrl = gajim.interface.msg_win_mgr.get_control(room_jid, account) 
     124                room_ctrl = gajim.interface.msg_win_mgr.get_gc_control(room_jid, account) 
    125125                if gajim.interface.minimized_controls[account].has_key(room_jid): 
    126126                        room_ctrl = gajim.interface.minimized_controls[account][room_jid] 
     
    449449                if color_name: 
    450450                        color = gtk.gdk.colormap_get_system().alloc_color(color_name) 
    451                          
     451 
    452452                label_str = self.name 
    453                  
     453 
    454454                # count waiting highlighted messages 
    455455                unread = '' 
     
    605605 
    606606                # We print if window is opened 
    607                 pm_control = gajim.interface.msg_win_mgr.get_control(fjid, self.account) 
     607                pm_control = gajim.interface.msg_win_mgr.get_control(fjid, self.account, session) 
     608 
    608609                if pm_control: 
    609610                        pm_control.print_conversation(msg, tim = tim, xhtml = xhtml) 
     611 
    610612                        return 
    611613 
     
    884886        def on_send_pm(self, widget = None, model = None, iter = None, nick = None, 
    885887        msg = None): 
    886                 '''opens a chat window and msg is not None sends private message to a 
     888                '''opens a chat window and if msg is not None sends private message to a 
    887889                contact in a room''' 
    888890                if nick is None: 
     
    16041606                        # Update pm chat window 
    16051607                        fjid = self.room_jid + '/' + nick 
    1606                         ctrl = gajim.interface.msg_win_mgr.get_control(fjid, self.account) 
     1608                        ctrl = gajim.interface.msg_win_mgr.get_gc_control(fjid, self.account) 
    16071609                        if ctrl: 
    16081610                                contact = gajim.contacts.get_gc_contact(self.account, self.room_jid, nick) 
     
    20342036                        gajim.interface.roster.new_private_chat(gc_c, self.account) 
    20352037                        win = gajim.interface.msg_win_mgr.get_window(nick_jid, self.account) 
    2036                 win.set_active_tab(nick_jid, self.account) 
     2038 
     2039                ctrl = win.get_controls(nick_jid, self.account)[0] 
     2040 
     2041                win.set_active_tab(ctrl) 
    20372042                win.window.present() 
    20382043