Remove trailing whitespaces.

This commit is contained in:
Emmanuel Gil Peyrot 2013-01-18 17:55:34 +01:00
commit 27b3592e16

View file

@ -40,7 +40,7 @@ def C(k):
class Chat(Window, QuickChat):
def __init__(self, to_id, host):
QuickChat.__init__(self, to_id, host)
QuickChat.__init__(self, to_id, host)
self.__parent=host.stdscr
self.to_id=JID(to_id)
self.content=[]
@ -88,7 +88,7 @@ class Chat(Window, QuickChat):
att_header=curses.color_pair(1)
else:
att_header=curses.color_pair(2)
while (msg):
if part==0:
hd=header
@ -105,7 +105,7 @@ class Chat(Window, QuickChat):
next = max + 1 #we skip the LF
else:
next = max
content.insert(part,[att,hd, msg[:max]])
msg=msg[next:] #we erase treated part
part=part+1
@ -116,7 +116,7 @@ class Chat(Window, QuickChat):
if self.__scollIdx>0 and len(content)<self.rHeight+self.__scollIdx:
self.__scollIdx=abs(len(content)-self.rHeight) #all the log fit on the screen, we must stop here
idx=0
for line in content[-self.rHeight-self.__scollIdx : -self.__scollIdx or None]:
self.addYXStr(idx, 0, line[1], line[0])
@ -124,12 +124,12 @@ class Chat(Window, QuickChat):
idx=idx+1
self.noutrefresh()
def scrollIdxUp(self):
"""increment scroll index"""
self.__scollIdx = self.__scollIdx + 1
self.update()
def scrollIdxDown(self):
"""decrement scroll index"""
if self.__scollIdx > 0:
@ -144,7 +144,7 @@ class Chat(Window, QuickChat):
return
self.content.append([timestamp,jid.short,msg])
self.update()
def handleKey(self, k):
if k == C('p'):
self.scrollIdxUp()