Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_app.py @ 244:3bc4457687a2
quick_frontend: fixed bad string type with DBus by converting them to unicode
bug 1
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 13 Jan 2011 19:44:58 +0100 |
parents | b1794cbb88e5 |
children | af3d4f11fe43 |
comparison
equal
deleted
inserted
replaced
243:117d6d26807b | 244:3bc4457687a2 |
---|---|
240 if from_jid.short in self.profiles[profile]['watched'] and not from_jid.short in self.profiles[profile]['onlineContact']: | 240 if from_jid.short in self.profiles[profile]['watched'] and not from_jid.short in self.profiles[profile]['onlineContact']: |
241 self.showAlert(_("Watched jid [%s] is connected !") % from_jid.short) | 241 self.showAlert(_("Watched jid [%s] is connected !") % from_jid.short) |
242 | 242 |
243 self.profiles[profile]['onlineContact'].add(from_jid) #FIXME onlineContact is useless with CM, must be removed | 243 self.profiles[profile]['onlineContact'].add(from_jid) #FIXME onlineContact is useless with CM, must be removed |
244 self.CM.add(from_jid) | 244 self.CM.add(from_jid) |
245 self.CM.update(from_jid, 'name', name) | 245 self.CM.update(from_jid, 'name', unicode(name)) |
246 self.CM.update(from_jid, 'show', show) | 246 self.CM.update(from_jid, 'show', show) |
247 self.CM.update(from_jid, 'statuses', statuses) | 247 self.CM.update(from_jid, 'statuses', statuses) |
248 self.CM.update(from_jid, 'groups', groups) | 248 self.CM.update(from_jid, 'groups', groups) |
249 cache = self.bridge.getCardCache(from_jid) | 249 cache = self.bridge.getCardCache(from_jid) |
250 if cache.has_key('nick'): | 250 if cache.has_key('nick'): |
251 self.CM.update(from_jid, 'nick', cache['nick']) | 251 self.CM.update(from_jid, 'nick', unicode(cache['nick'])) |
252 if cache.has_key('avatar'): | 252 if cache.has_key('avatar'): |
253 self.CM.update(from_jid, 'avatar', self.bridge.getAvatarFile(cache['avatar'])) | 253 self.CM.update(from_jid, 'avatar', self.bridge.getAvatarFile(cache['avatar'])) |
254 self.contactList.replace(from_jid, self.CM.getAttr(from_jid, 'groups')) | 254 self.contactList.replace(from_jid, self.CM.getAttr(from_jid, 'groups')) |
255 | 255 |
256 if show=="unavailable" and from_jid in self.profiles[profile]['onlineContact']: | 256 if show=="unavailable" and from_jid in self.profiles[profile]['onlineContact']: |
408 | 408 |
409 def updatedValue(self, name, data): | 409 def updatedValue(self, name, data): |
410 if name == "card_nick": | 410 if name == "card_nick": |
411 target = JID(data['jid']) | 411 target = JID(data['jid']) |
412 if target in self.contactList: | 412 if target in self.contactList: |
413 self.CM.update(target, 'nick', data['nick']) | 413 self.CM.update(target, 'nick', unicode(data['nick'])) |
414 self.contactList.replace(target) | 414 self.contactList.replace(target) |
415 elif name == "card_avatar": | 415 elif name == "card_avatar": |
416 target = JID(data['jid']) | 416 target = JID(data['jid']) |
417 if target in self.contactList: | 417 if target in self.contactList: |
418 filename = self.bridge.getAvatarFile(data['avatar']) | 418 filename = self.bridge.getAvatarFile(data['avatar']) |