Changeset 8903
- Timestamp:
- 10/13/07 16:37:22 (14 months ago)
- Location:
- trunk/src
- Files:
-
- 3 modified
-
gajim.py (modified) (1 diff)
-
groupchat_control.py (modified) (2 diffs)
-
message_window.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gajim.py
r8873 r8903 1129 1129 # print status in chat window and update status/GPG image 1130 1130 if ctrl: 1131 contact = ctrl.contact 1132 contact.show = show 1133 contact.status = status 1134 uf_show = helpers.get_uf_show(show) 1135 if status: 1136 ctrl.print_conversation(_('%s is now %s (%s)') % (nick, uf_show, 1137 status), 'status') 1131 statusCode = array[9] 1132 if '303' in statusCode: 1133 new_nick = array[10] 1134 ctrl.print_conversation(_('%s is now known as %s') % (nick, 1135 new_nick), 'status') 1136 gc_c = gajim.contacts.get_gc_contact(account, room_jid, new_nick) 1137 c = gajim.contacts.contact_from_gc_contact(gc_c) 1138 ctrl.gc_contact = gc_c 1139 ctrl.contact = c 1140 ctrl.draw_banner() 1141 old_jid = room_jid + '/' + nick 1142 new_jid = room_jid + '/' + new_nick 1143 self.msg_win_mgr.change_key(old_jid, new_jid, account) 1138 1144 else: 1139 ctrl.print_conversation(_('%s is now %s') % (nick, uf_show), 1140 'status') 1141 ctrl.parent_win.redraw_tab(ctrl) 1142 ctrl.update_ui() 1145 contact = ctrl.contact 1146 contact.show = show 1147 contact.status = status 1148 uf_show = helpers.get_uf_show(show) 1149 if status: 1150 ctrl.print_conversation(_('%s is now %s (%s)') % (nick, uf_show, 1151 status), 'status') 1152 else: 1153 ctrl.print_conversation(_('%s is now %s') % (nick, uf_show), 1154 'status') 1155 ctrl.parent_win.redraw_tab(ctrl) 1156 ctrl.update_ui() 1143 1157 if self.remote_ctrl: 1144 1158 self.remote_ctrl.raise_signal('GCPresence', (account, array)) -
trunk/src/groupchat_control.py
r8897 r8903 252 252 253 253 self.history_menuitem = xm.get_widget('history_menuitem') 254 id = self.history_menuitem.connect('activate', self._on_history_menuitem_activate) 254 id = self.history_menuitem.connect('activate', 255 self._on_history_menuitem_activate) 255 256 self.handlers[id] = self.history_menuitem 256 257 … … 987 988 # keep nickname color 988 989 if nick in self.gc_custom_colors: 989 self.gc_custom_colors[new_nick] = self.gc_custom_colors[nick] 990 self.gc_custom_colors[new_nick] = \ 991 self.gc_custom_colors[nick] 990 992 # rename vcard / avatar 991 993 puny_jid = helpers.sanitize_filename(self.room_jid) -
trunk/src/message_window.py
r8900 r8903 511 511 nth_child = notebook.get_nth_page(page_num) 512 512 return self._widget_to_control(nth_child) 513 514 def change_key(self, old_jid, new_jid, acct): 515 '''Change the key of a control''' 516 try: 517 # Check if control exists 518 ctrl = self._controls[acct][old_jid] 519 except: 520 return 521 self._controls[acct][new_jid] = self._controls[acct][old_jid] 522 del self._controls[acct][old_jid] 513 523 514 524 def controls(self): … … 802 812 return win 803 813 814 def change_key(self, old_jid, new_jid, acct): 815 win = self.get_window(old_jid, acct) 816 if self.mode == self.ONE_MSG_WINDOW_NEVER: 817 old_key = acct + old_jid 818 if old_jid not in self._windows: 819 return 820 new_key = acct + new_jid 821 self._windows[new_key] = self._windows[old_key] 822 del self._windows[old_key] 823 win.change_key(old_jid, new_jid, acct) 824 804 825 def _on_window_delete(self, win, event): 805 826 self.save_state(self._gtk_win_to_msg_win(win))
