Mercurial > libervia-backend
diff frontends/src/primitivus/chat.py @ 501:e9634d2e7b38
core, quick_frontend, primitivus, wix: Contacts List refactoring phase 1:
- QuickContactManagement is not used anymore and will be removed, ContactList + Core are used instead
- disconnected contacts are now displayed in Primitivus (M-d to show/hide them)
- avatars are temporary unavailable in wix
- new bridge method: getContactsFromGroup
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 25 Sep 2012 00:58:34 +0200 |
parents | 2a072735e459 |
children | f98bef71a918 |
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py Wed Sep 05 00:19:32 2012 +0200 +++ b/frontends/src/primitivus/chat.py Tue Sep 25 00:58:34 2012 +0200 @@ -262,11 +262,8 @@ def startGame(self, game_type, referee, players): """Configure the chat window to start a game""" if game_type=="Tarot": - try: - self.tarot_wid = CardGame(self, referee, players, self.nick) - self.__appendGamePanel(self.tarot_wid) - except e: - self.host.debug() + self.tarot_wid = CardGame(self, referee, players, self.nick) + self.__appendGamePanel(self.tarot_wid) def getGame(self, game_type): """Return class managing the game type""" @@ -288,6 +285,11 @@ #MISC EVENTS# def onFileSelected(self, filepath): self.host.removePopUp() - full_jid = self.host.CM.get_full(self.target) + #FIXME: check last_resource: what if self.target.resource exists ? + last_resource = self.host.bridge.getLastResource(unicode(self.target.short), self.host.profile) + if last_resource: + full_jid = JID("%s/%s" % (self.target.short, last_resource)) + else: + full_jid = self.target id = self.host.bridge.sendFile(full_jid, filepath, {}, self.host.profile) self.host.addProgress(id,filepath)