diff frontends/src/quick_frontend/quick_app.py @ 1361:d3e9848b9574 frontends_multi_profiles

quick_frontend, primitivus (chat): pass a sorted list to Chat.setPresents
author souliane <souliane@mailoo.org>
date Wed, 11 Mar 2015 20:06:13 +0100
parents 8ea8fa13c351
children fa77e40eb17b
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Wed Mar 11 12:43:48 2015 +0100
+++ b/frontends/src/quick_frontend/quick_app.py	Wed Mar 11 20:06:13 2015 +0100
@@ -524,8 +524,11 @@
         room_jid = jid.JID(room_jid_s)
         chat_widget = self.widgets.getOrCreateWidget(quick_chat.QuickChat, room_jid, type_=C.CHAT_GROUP, profile=profile)
         chat_widget.setUserNick(user_nick)
-        chat_widget.id = room_jid # FIXME: to be removed
-        chat_widget.setPresents(list(set([user_nick] + room_nicks)))
+        chat_widget.id = room_jid  # FIXME: to be removed
+        room_nicks = [unicode(nick) for nick in room_nicks]  # FIXME: should be done in DBus bridge / is that still needed?!
+        nicks = list(set([user_nick] + room_nicks))
+        nicks.sort()
+        chat_widget.setPresents(nicks)
         self.contact_lists[profile].setSpecial(room_jid, C.CONTACT_SPECIAL_GROUP)
 
     def roomLeftHandler(self, room_jid_s, profile):