comparison frontends/src/primitivus/chat.py @ 688:f7878ad3c846

tools: renamed tools.jid.JID attribute "short" to "bare"
author souliane <souliane@mailoo.org>
date Tue, 29 Oct 2013 16:26:55 +0100
parents a630b94280d5
children 7b72d5c30ebc
comparison
equal deleted inserted replaced
687:af0d08a84cc6 688:f7878ad3c846
188 nick = clicked_wid.getValue() 188 nick = clicked_wid.getValue()
189 if nick == self.getUserNick(): 189 if nick == self.getUserNick():
190 #We ignore click on our own nick 190 #We ignore click on our own nick
191 return 191 return
192 #we have a click on a nick, we add the private conversation to the contact_list 192 #we have a click on a nick, we add the private conversation to the contact_list
193 full_jid = JID("%s/%s" % (self.target.short, nick)) 193 full_jid = JID("%s/%s" % (self.target.bare, nick))
194 new_jid = escapePrivate(full_jid) 194 new_jid = escapePrivate(full_jid)
195 if new_jid not in self.host.contact_list: 195 if new_jid not in self.host.contact_list:
196 self.host.contact_list.add(new_jid) 196 self.host.contact_list.add(new_jid)
197 197
198 #now we select the new window 198 #now we select the new window
338 338
339 #MISC EVENTS# 339 #MISC EVENTS#
340 def onFileSelected(self, filepath): 340 def onFileSelected(self, filepath):
341 self.host.removePopUp() 341 self.host.removePopUp()
342 #FIXME: check last_resource: what if self.target.resource exists ? 342 #FIXME: check last_resource: what if self.target.resource exists ?
343 last_resource = self.host.bridge.getLastResource(unicode(self.target.short), self.host.profile) 343 last_resource = self.host.bridge.getLastResource(unicode(self.target.bare), self.host.profile)
344 if last_resource: 344 if last_resource:
345 full_jid = JID("%s/%s" % (self.target.short, last_resource)) 345 full_jid = JID("%s/%s" % (self.target.bare, last_resource))
346 else: 346 else:
347 full_jid = self.target 347 full_jid = self.target
348 progress_id = self.host.bridge.sendFile(full_jid, filepath, {}, self.host.profile) 348 progress_id = self.host.bridge.sendFile(full_jid, filepath, {}, self.host.profile)
349 self.host.addProgress(progress_id,filepath) 349 self.host.addProgress(progress_id,filepath)