comparison frontends/src/wix/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
comparison
equal deleted inserted replaced
500:00d3679976ab 501:e9634d2e7b38
256 def onSendFile(self, e): 256 def onSendFile(self, e):
257 debug(_("Send File")) 257 debug(_("Send File"))
258 filename = wx.FileSelector(_("Choose a file to send"), flags = wx.FD_FILE_MUST_EXIST) 258 filename = wx.FileSelector(_("Choose a file to send"), flags = wx.FD_FILE_MUST_EXIST)
259 if filename: 259 if filename:
260 debug(_("filename: %s"),filename) 260 debug(_("filename: %s"),filename)
261 full_jid = self.host.CM.get_full(self.target) 261 #FIXME: check last_resource: what if self.target.resource exists ?
262 last_resource = self.host.bridge.getLastResource(unicode(self.target.short), self.host.profile)
263 if last_resource:
264 full_jid = JID("%s/%s" % (self.target.short, last_resource))
265 else:
266 full_jid = self.target
262 id = self.host.bridge.sendFile(full_jid, filename, {}, self.host.profile) 267 id = self.host.bridge.sendFile(full_jid, filename, {}, self.host.profile)
263 self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename)) 268 self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename))
264 269
265 def onStartTarot(self, e): 270 def onStartTarot(self, e):
266 debug (_("Starting Tarot game")) 271 debug (_("Starting Tarot game"))