Show
Ignore:
Timestamp:
02/15/07 19:05:38 (22 months ago)
Author:
asterix
Message:

mrege diff from trunk

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11/src/chat_control.py

    r7966 r7984  
    118118                pass # Derived should implement this rather than connecting to the event itself. 
    119119 
    120         def __init__(self, type_id, parent_win, widget_name, display_names, contact, 
    121         acct, resource = None): 
     120        def __init__(self, type_id, parent_win, widget_name, contact, acct,  
     121        resource = None): 
    122122                MessageControl.__init__(self, type_id, parent_win, widget_name, 
    123                         display_names,  contact, acct, resource = resource); 
     123                        contact, acct, resource = resource); 
    124124                # when/if we do XHTML we will put formatting buttons back 
    125125                widget = self.xml.get_widget('emoticons_button') 
     
    171171                self.sent_history = [] 
    172172                self.sent_history_pos = 0 
    173                 self.typing_new = False 
    174                 self.orig_msg = '' 
     173                self.orig_msg = None 
    175174 
    176175                # Emoticons menu 
     
    542541                        self.sent_history.append(message) 
    543542                        self.sent_history_pos = size + 1 
    544  
    545                 self.typing_new = True 
    546                 self.orig_msg = '' 
     543                self.orig_msg = None 
    547544 
    548545        def print_conversation_line(self, text, kind, name, tim, 
     
    787784        def sent_messages_scroll(self, direction, conv_buf): 
    788785                size = len(self.sent_history)  
    789                 if self.typing_new: 
    790                         #user was typing something and then went into history, so save 
    791                         #whatever is already typed 
     786                if self.orig_msg is None: 
     787                        # user was typing something and then went into history, so save 
     788                        # whatever is already typed 
    792789                        start_iter = conv_buf.get_start_iter() 
    793790                        end_iter = conv_buf.get_end_iter() 
    794791                        self.orig_msg = conv_buf.get_text(start_iter, end_iter, 0).decode( 
    795792                                'utf-8') 
    796                         self.typing_new = False 
    797793                if direction == 'up': 
    798794                        if self.sent_history_pos == 0: 
     
    803799                        if self.sent_history_pos >= size - 1: 
    804800                                conv_buf.set_text(self.orig_msg); 
    805                                 self.typing_new = True 
     801                                self.orig_msg = None 
    806802                                self.sent_history_pos = size 
    807803                                return 
     
    854850        def __init__(self, parent_win, contact, acct, resource = None): 
    855851                ChatControlBase.__init__(self, self.TYPE_ID, parent_win, 
    856                         'chat_child_vbox', (_('Chat'), _('Chats')), contact, acct, resource) 
     852                        'chat_child_vbox', contact, acct, resource) 
    857853                         
    858854                # for muc use: