Show
Ignore:
Timestamp:
05/04/08 02:24:27 (4 months ago)
Author:
bct
Message:

pm bugfix

Files:
1 modified

Legend:

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

    r9560 r9569  
    15871587                        unread = '[' + unicode(num_unread) + ']' 
    15881588 
    1589                 # Draw tab label using chatstate  
     1589                # Draw tab label using chatstate 
    15901590                theme = gajim.config.get('roster_theme') 
    15911591                color = None 
     
    18471847                self.contact.our_chatstate = None 
    18481848 
     1849                # terminate session 
    18491850                self.session.control = None 
    18501851 
     
    20782079                # Is it a pm ? 
    20792080                room_jid, nick = gajim.get_room_and_nick_from_fjid(jid) 
    2080 # XXX fixme somehow 
    2081 #               control = gajim.interface.msg_win_mgr.get_control(room_jid, self.account) 
    2082 #               if control and control.type_id == message_control.TYPE_GC: 
    2083 #                       control.update_ui() 
    2084 #                       control.parent_win.show_title() 
    2085 #                       typ = 'pm' 
     2081                control = gajim.interface.msg_win_mgr.get_gc_control(room_jid, self.account) 
     2082                if control and control.type_id == message_control.TYPE_GC: 
     2083                        control.update_ui() 
     2084                        control.parent_win.show_title() 
     2085                        typ = 'pm' 
    20862086 
    20872087                self.redraw_after_event_removed(jid) 
     
    20942094                                gajim.interface.roster.really_remove_contact(self.contact, 
    20952095                                        self.account) 
    2096 #                       elif typ == 'pm': 
    2097 #                               control.remove_contact(nick) 
     2096                        elif typ == 'pm': 
     2097                                control.remove_contact(nick) 
    20982098 
    20992099        def show_bigger_avatar(self, small_avatar): 
     
    21412141                if gtk.gtk_version >= (2, 10, 0) and gtk.pygtk_version >= (2, 10, 0): 
    21422142                        window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP) 
    2143                  
     2143 
    21442144                window.realize() 
    21452145                window.window.set_back_pixmap(pixmap, False) # make it transparent 
    21462146                window.window.shape_combine_mask(mask, 0, 0) 
    21472147 
    2148                 # make the bigger avatar window show up centered  
     2148                # make the bigger avatar window show up centered 
    21492149                x0, y0 = small_avatar.window.get_origin() 
    21502150                x0 += small_avatar.allocation.x 
     
    21522152                center_x= x0 + (small_avatar.allocation.width / 2) 
    21532153                center_y = y0 + (small_avatar.allocation.height / 2) 
    2154                 pos_x, pos_y = center_x - (avatar_w / 2), center_y - (avatar_h / 2)  
     2154                pos_x, pos_y = center_x - (avatar_w / 2), center_y - (avatar_h / 2) 
    21552155                window.move(pos_x, pos_y) 
    21562156                # make the cursor invisible so we can see the image