comparison frontends/quick_frontend/quick_app.py @ 124:961e0898271f

primitivus chat window - management of one 2 one / group chat - timestamp displayed - added shortcuts for showing/hiding panels - color used - fixed vcard bug (contact displayed even if not from current profile if vcard changed/not in cache) - added VerticalSeparator widget - *List widgets can now use an other widget than SelectableText - new UnselectableText widget
author Goffi <goffi@goffi.org>
date Thu, 08 Jul 2010 19:47:54 +0800
parents ded2431cea5a
children 8d611eb9ae48
comparison
equal deleted inserted replaced
123:34766e0cf970 124:961e0898271f
247 debug (_("Room [%(room_name)s] joined by %(profile)s, users presents:%(users)s") % {'room_name':room_id+'@'+room_service, 'profile': profile, 'users':room_nicks}) 247 debug (_("Room [%(room_name)s] joined by %(profile)s, users presents:%(users)s") % {'room_name':room_id+'@'+room_service, 'profile': profile, 'users':room_nicks})
248 room_jid=room_id+'@'+room_service 248 room_jid=room_id+'@'+room_service
249 self.chat_wins[room_jid].setUserNick(user_nick) 249 self.chat_wins[room_jid].setUserNick(user_nick)
250 self.chat_wins[room_jid].setType("group") 250 self.chat_wins[room_jid].setType("group")
251 self.chat_wins[room_jid].id = room_jid 251 self.chat_wins[room_jid].id = room_jid
252 self.chat_wins[room_jid].setPresents([user_nick]+room_nicks) 252 self.chat_wins[room_jid].setPresents(list(set([user_nick]+room_nicks)))
253 253
254 254
255 def roomUserJoined(self, room_id, room_service, user_nick, user_data, profile): 255 def roomUserJoined(self, room_id, room_service, user_nick, user_data, profile):
256 """Called when an user joined a MUC room""" 256 """Called when an user joined a MUC room"""
257 if not self.__check_profile(profile): 257 if not self.__check_profile(profile):
385 pass 385 pass
386 386
387 def updatedValue(self, name, data): 387 def updatedValue(self, name, data):
388 if name == "card_nick": 388 if name == "card_nick":
389 target = JID(data['jid']) 389 target = JID(data['jid'])
390 self.CM.update(target, 'nick', data['nick']) 390 if target in self.contactList:
391 self.contactList.replace(target) 391 self.CM.update(target, 'nick', data['nick'])
392 self.contactList.replace(target)
392 elif name == "card_avatar": 393 elif name == "card_avatar":
393 target = JID(data['jid']) 394 target = JID(data['jid'])
394 filename = self.bridge.getAvatarFile(data['avatar']) 395 if target in self.contactList:
395 self.CM.update(target, 'avatar', filename) 396 filename = self.bridge.getAvatarFile(data['avatar'])
396 self.contactList.replace(target) 397 self.CM.update(target, 'avatar', filename)
398 self.contactList.replace(target)
397 399
398 def askConfirmation(self, type, id, data): 400 def askConfirmation(self, type, id, data):
399 raise NotImplementedError 401 raise NotImplementedError
400 402
401 def actionResult(self, type, id, data): 403 def actionResult(self, type, id, data):