Mercurial > libervia-backend
comparison frontends/src/primitivus/primitivus @ 503:10119c2a9d33
Primitivus: new entities are added to contact list if they send messages + QuickFrontend: names fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 26 Sep 2012 00:38:41 +0200 |
parents | e9634d2e7b38 |
children | f98bef71a918 |
comparison
equal
deleted
inserted
replaced
502:debcf5dd404a | 503:10119c2a9d33 |
---|---|
306 editBar.set_edit_text('') | 306 editBar.set_edit_text('') |
307 | 307 |
308 def newMessage(self, from_jid, msg, type, to_jid, profile): | 308 def newMessage(self, from_jid, msg, type, to_jid, profile): |
309 if not self.check_profile(profile): | 309 if not self.check_profile(profile): |
310 return | 310 return |
311 sender = JID(from_jid) | |
312 if not sender in self.contact_list and sender.short != self.profiles[profile]['whoami'].short: | |
313 #XXX: needed to show entities which haven't sent any | |
314 # presence information and which are not in roster | |
315 #TODO: put these entities in a "not in roster" list | |
316 self.contact_list.replace(sender) | |
311 QuickApp.newMessage(self, from_jid, msg, type, to_jid, profile) | 317 QuickApp.newMessage(self, from_jid, msg, type, to_jid, profile) |
312 sender = JID(from_jid) | |
313 if JID(self.contact_list.selected).short != sender.short: | 318 if JID(self.contact_list.selected).short != sender.short: |
314 self.contact_list.putAlert(sender) | 319 self.contact_list.putAlert(sender) |
315 | 320 |
316 def _dialogOkCb(self, widget, data): | 321 def _dialogOkCb(self, widget, data): |
317 self.removePopUp() | 322 self.removePopUp() |