diff --git a/frontends/quick_frontend/quick_app.py b/frontends/quick_frontend/quick_app.py index b3092b09..e7d2c01f 100644 --- a/frontends/quick_frontend/quick_app.py +++ b/frontends/quick_frontend/quick_app.py @@ -91,6 +91,8 @@ class QuickApp(): parser.add_option("-p", "--profile", help=_("Select the profile to use")) (self.options, args) = parser.parse_args() + if self.options.profile: + self.options.profile = self.options.profile.decode('utf-8') return args def plug_profile(self, profile_key='@DEFAULT@'): @@ -141,7 +143,7 @@ class QuickApp(): for sub in waitingSub: self.subscribe(waitingSub[sub], sub, profile) - #Now we open the MUC window when we already are: + #Now we open the MUC window where we already are: for room_args in self.bridge.getRoomJoined(profile): self.roomJoined(*room_args, profile=profile) @@ -164,7 +166,7 @@ class QuickApp(): return debug(_("Connected")) self.setStatusOnline(True) - #self.bridge.joinMUC('conference.necton2.int', 'test', self.profiles[self.profile]['whoami'].node, self.profile) #gof: + self.bridge.joinMUC('conference.necton2.int', 'test', self.profiles[self.profile]['whoami'].node, self.profile) #gof: def disconnected(self, profile): diff --git a/frontends/quick_frontend/quick_chat.py b/frontends/quick_frontend/quick_chat.py index 18828d5b..338af6a6 100644 --- a/frontends/quick_frontend/quick_chat.py +++ b/frontends/quick_frontend/quick_chat.py @@ -48,6 +48,7 @@ class QuickChat(): if self.type != "group": error (_("[INTERNAL] trying to set presents nicks for a non group chat window")) raise Exception("INTERNAL ERROR") #TODO: raise proper Exception here + self.occupants.update(nicks) def replaceUser(self, nick): """Add user if it is not in the group list""" @@ -55,6 +56,7 @@ class QuickChat(): if self.type != "group": error (_("[INTERNAL] trying to replace user for a non group chat window")) raise Exception("INTERNAL ERROR") #TODO: raise proper Exception here + self.occupants.add(nick) def setUserNick(self, nick): """Set the nick of the user, usefull for e.g. change the color of the user""" @@ -66,6 +68,7 @@ class QuickChat(): if self.type != "group": error (_("[INTERNAL] trying to remove user for a non group chat window")) raise Exception("INTERNAL ERROR") #TODO: raise proper Exception here + self.occupants.remove(nick) def setSubject(self, subject): """Set title for a group chat""" diff --git a/frontends/wix/chat.py b/frontends/wix/chat.py index 51bb8799..09a48e7b 100644 --- a/frontends/wix/chat.py +++ b/frontends/wix/chat.py @@ -132,7 +132,6 @@ class Chat(wx.Frame, QuickChat): QuickChat.setPresents(self, nicks) for nick in nicks: self.present_panel.presents.replace(nick) - self.occupants.add(nick) def replaceUser(self, nick): """Add user if it is not in the group list""" @@ -142,13 +141,11 @@ class Chat(wx.Frame, QuickChat): return QuickChat.replaceUser(self, nick) self.present_panel.presents.replace(nick) - self.occupants.add(nick) def removeUser(self, nick): """Remove a user from the group list""" QuickChat.removeUser(self, nick) self.present_panel.presents.remove(nick) - self.occupants.remove(nick) def setSubject(self, subject): """Set title for a group chat"""