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
This commit is contained in:
parent
54730cb077
commit
ca242c7aee
1 changed files with 169 additions and 104 deletions
|
|
@ -92,10 +92,10 @@ class Chat(wx.Frame, QuickChat):
|
|||
|
||||
|
||||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue