Changeset 7984 for branches/gajim_0.11/src/chat_control.py
- Timestamp:
- 02/15/07 19:05:38 (22 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11/src/chat_control.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11/src/chat_control.py
r7966 r7984 118 118 pass # Derived should implement this rather than connecting to the event itself. 119 119 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): 122 122 MessageControl.__init__(self, type_id, parent_win, widget_name, 123 display_names,contact, acct, resource = resource);123 contact, acct, resource = resource); 124 124 # when/if we do XHTML we will put formatting buttons back 125 125 widget = self.xml.get_widget('emoticons_button') … … 171 171 self.sent_history = [] 172 172 self.sent_history_pos = 0 173 self.typing_new = False 174 self.orig_msg = '' 173 self.orig_msg = None 175 174 176 175 # Emoticons menu … … 542 541 self.sent_history.append(message) 543 542 self.sent_history_pos = size + 1 544 545 self.typing_new = True 546 self.orig_msg = '' 543 self.orig_msg = None 547 544 548 545 def print_conversation_line(self, text, kind, name, tim, … … 787 784 def sent_messages_scroll(self, direction, conv_buf): 788 785 size = len(self.sent_history) 789 if self. typing_new:790 # user was typing something and then went into history, so save791 # whatever is already typed786 if self.orig_msg is None: 787 # user was typing something and then went into history, so save 788 # whatever is already typed 792 789 start_iter = conv_buf.get_start_iter() 793 790 end_iter = conv_buf.get_end_iter() 794 791 self.orig_msg = conv_buf.get_text(start_iter, end_iter, 0).decode( 795 792 'utf-8') 796 self.typing_new = False797 793 if direction == 'up': 798 794 if self.sent_history_pos == 0: … … 803 799 if self.sent_history_pos >= size - 1: 804 800 conv_buf.set_text(self.orig_msg); 805 self. typing_new = True801 self.orig_msg = None 806 802 self.sent_history_pos = size 807 803 return … … 854 850 def __init__(self, parent_win, contact, acct, resource = None): 855 851 ChatControlBase.__init__(self, self.TYPE_ID, parent_win, 856 'chat_child_vbox', (_('Chat'), _('Chats')),contact, acct, resource)852 'chat_child_vbox', contact, acct, resource) 857 853 858 854 # for muc use:
