diff frontends/quick_frontend/quick_app.py @ 53:6dfe5bb10008

Wix: groups in contact list, first draft
author Goffi <goffi@goffi.org>
date Sun, 10 Jan 2010 16:42:09 +1100
parents 6455fb62ff83
children a5b5fb5fc9fd
line wrap: on
line diff
--- a/frontends/quick_frontend/quick_app.py	Thu Jan 07 01:55:30 2010 +1100
+++ b/frontends/quick_frontend/quick_app.py	Sun Jan 10 16:42:09 2010 +1100
@@ -117,12 +117,11 @@
 
         if show != 'unavailable':
             name=""
-            group=""
+            groups = []
             if self.rosterList.has_key(from_jid.short):
                 if self.rosterList[from_jid.short][0].has_key("name"):
                     name=self.rosterList[from_jid.short][0]["name"]
-                if len(self.rosterList[from_jid.short][1]):
-                    group=self.rosterList[from_jid.short][1][0]
+                groups=self.rosterList[from_jid.short][1]
 
             #FIXME: must be moved in a plugin
             if from_jid.short in self.watched and not from_jid.short in self.onlineContact:
@@ -133,7 +132,7 @@
             self.CM.update(from_jid, 'name', name)
             self.CM.update(from_jid, 'show', show)
             self.CM.update(from_jid, 'statuses', statuses)
-            self.CM.update(from_jid, 'group', group)
+            self.CM.update(from_jid, 'groups', groups)
             cache = self.bridge.getProfileCache(from_jid)
             if cache.has_key('nick'): 
                 self.CM.update(from_jid, 'nick', cache['nick'])
@@ -188,8 +187,6 @@
             pass
 
     def updatedValue(self, name, data):
-        print "toto"
-        print "updatedValue", name, data
         if name == "profile_nick":
             target = JID(data['jid'])
             self.CM.update(target, 'nick', data['nick'])