changeset 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 117d6d26807b
children e077f068ff57
files frontends/src/quick_frontend/quick_app.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Wed Jan 12 18:25:32 2011 +0100
+++ b/frontends/src/quick_frontend/quick_app.py	Thu Jan 13 19:44:58 2011 +0100
@@ -242,13 +242,13 @@
 
             self.profiles[profile]['onlineContact'].add(from_jid)  #FIXME onlineContact is useless with CM, must be removed
             self.CM.add(from_jid)
-            self.CM.update(from_jid, 'name', name)
+            self.CM.update(from_jid, 'name', unicode(name))
             self.CM.update(from_jid, 'show', show)
             self.CM.update(from_jid, 'statuses', statuses)
             self.CM.update(from_jid, 'groups', groups)
             cache = self.bridge.getCardCache(from_jid)
             if cache.has_key('nick'): 
-                self.CM.update(from_jid, 'nick', cache['nick'])
+                self.CM.update(from_jid, 'nick', unicode(cache['nick']))
             if cache.has_key('avatar'): 
                 self.CM.update(from_jid, 'avatar', self.bridge.getAvatarFile(cache['avatar']))
             self.contactList.replace(from_jid, self.CM.getAttr(from_jid, 'groups'))
@@ -410,7 +410,7 @@
         if name == "card_nick":
             target = JID(data['jid'])
             if target in self.contactList:
-                self.CM.update(target, 'nick', data['nick'])
+                self.CM.update(target, 'nick', unicode(data['nick']))
                 self.contactList.replace(target)
         elif name == "card_avatar":
             target = JID(data['jid'])