diff frontends/wix/chat.py @ 66:8147b4f40809

SàT: multi-profile: DBus signals and frontend adaptation (first draft) - Quick App: new single_profile parameter in __init__ (default: yes), used to tell if the application use only one profile at the time or not - Quick App: new __check_profile method, tell if the profile is used by the current frontend - Quick App: new methods plug_profile, unplug_profile and clear_profile, must be called by the frontend to tell which profiles to use - DBus Bridge: new methods getProfileName, getProfilesList and createProfile
author Goffi <goffi@goffi.org>
date Wed, 03 Feb 2010 23:35:57 +1100
parents a5b5fb5fc9fd
children 0e50dd3a234a
line wrap: on
line diff
--- a/frontends/wix/chat.py	Sun Jan 31 15:57:03 2010 +1100
+++ b/frontends/wix/chat.py	Wed Feb 03 23:35:57 2010 +1100
@@ -92,10 +92,10 @@
 
         
 
-    def printMessage(self, from_jid, msg, timestamp=""):   #FIXME: factorize with printDistantMessage
+    def printMessage(self, from_jid, msg, profile, timestamp=""):
         """Print the message with differents colors depending on where it comes from."""
         jid=JID(from_jid)
-        mymess = (jid.short == self.host.whoami.short) #mymess = True if message comes from local user
+        mymess = (jid.short == self.host.profiles[profile]['whoami'].short) #mymess = True if message comes from local user
         _font = wx.Font(self.font["points"], self.font["family"], wx.NORMAL, wx.BOLD)
         self.chatWindow.SetDefaultStyle(wx.TextAttr( "BLACK" if mymess else "BLUE", font=_font))
         self.chatWindow.AppendText("[%s] " % jid)