diff frontends/sortilege/chat.py @ 67:0e50dd3a234a

message sending bug fixes + sortilege update - sortilege now use default profile. /!\ sortilege is really buggy currently, need some attention
author Goffi <goffi@goffi.org>
date Thu, 04 Feb 2010 01:06:36 +1100
parents a5b5fb5fc9fd
children 8f2ed279784b
line wrap: on
line diff
--- a/frontends/sortilege/chat.py	Wed Feb 03 23:35:57 2010 +1100
+++ b/frontends/sortilege/chat.py	Thu Feb 04 01:06:36 2010 +1100
@@ -48,7 +48,7 @@
         Window.__init__(self, self.__parent, self.__parent.getmaxyx()[0]-2, self.__parent.getmaxyx()[1]-30, 0,30, code=host.code)
 
         #history
-        self.historyPrint(50, True)
+        self.historyPrint(50, True, profile=self.host.profile)
 
         self.hide()
 
@@ -68,7 +68,7 @@
         if self.host.chatParams["timestamp"]:
             header = header + '[%s] ' % strftime("%H:%M", localtime(float(line[0])))
         if self.host.chatParams['short_nick']:
-            header = header + ('> ' if  line[1]==self.host.whoami.short else '** ')
+            header = header + ('> ' if  line[1]==self.host.profiles[self.host.profile]['whoami'] else '** ')
         else:
             header = header + '<%s> ' % line[1]
         return header
@@ -85,7 +85,7 @@
             header=self.__getHeader(self.content[idx])
             msg=self.content[idx][2]
             part=0  #part of the text
-            if JID(self.content[idx][1]).short==self.host.whoami.short:
+            if JID(self.content[idx][1]).short==self.host.profiles[self.host.profile]['whoami'].short:
                 att_header=curses.color_pair(1)
             else:
                 att_header=curses.color_pair(2)
@@ -137,7 +137,7 @@
             self.__scollIdx = self.__scollIdx - 1
         self.update()
 
-    def printMessage(self, jid, msg, timestamp=""):
+    def printMessage(self, jid, msg, profile, timestamp=""):
         if timestamp=="":
             current_time=time()
             timestamp=str(current_time)