comparison frontends/sortilege_old/window.py @ 587:952322b1d490

Remove trailing whitespaces.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 18 Jan 2013 17:55:34 +0100
parents 2a072735e459
children beaf6bec2fcd
comparison
equal deleted inserted replaced
586:6a718ede8be1 587:952322b1d490
31 self.__title=title 31 self.__title=title
32 self.__active=False 32 self.__active=False
33 self.__parent=parent 33 self.__parent=parent
34 self.__code=code 34 self.__code=code
35 self.__hide=False 35 self.__hide=False
36 36
37 self.resize(height, width, y, x) 37 self.resize(height, width, y, x)
38 self.oriCoords=self.__coords #FIXME: tres moche, a faire en mieux 38 self.oriCoords=self.__coords #FIXME: tres moche, a faire en mieux
39 39
40 def hide(self, hide=True): 40 def hide(self, hide=True):
41 self.__hide=hide 41 self.__hide=hide
86 self.__coords=[height, width, y, x] 86 self.__coords=[height, width, y, x]
87 87
88 # we check that coordinates are under limits 88 # we check that coordinates are under limits
89 self.__coordAdjust(self.__coords) 89 self.__coordAdjust(self.__coords)
90 height,width,y,x=self.__coords 90 height,width,y,x=self.__coords
91 91
92 self.window = self.__parent.subwin(height, width, y, x) 92 self.window = self.__parent.subwin(height, width, y, x)
93 self.defInsideCoord() 93 self.defInsideCoord()
94 94
95 def __coordAdjust(self, coords): 95 def __coordAdjust(self, coords):
96 """Check that coordinates are under limits, adjust them else otherwise""" 96 """Check that coordinates are under limits, adjust them else otherwise"""
122 x=x+1 122 x=x+1
123 y=y+1 123 y=y+1
124 n = self.rWidth-x if not limit else limit 124 n = self.rWidth-x if not limit else limit
125 encoded = text.encode(self.__code) 125 encoded = text.encode(self.__code)
126 adjust = len(encoded) - len(text) # hack because addnstr doesn't manage unicode 126 adjust = len(encoded) - len(text) # hack because addnstr doesn't manage unicode
127 try: 127 try:
128 self.window.addnstr(y, x, encoded, n + adjust, attr) 128 self.window.addnstr(y, x, encoded, n + adjust, attr)
129 except: 129 except:
130 #We have to catch error to write on last line last col FIXME: is there a better way ? 130 #We have to catch error to write on last line last col FIXME: is there a better way ?
131 pass 131 pass
132 132
133 def move(self, y, x): 133 def move(self, y, x):
134 self.window.move(y,x) 134 self.window.move(y,x)
135 135
136 def noutrefresh(self): 136 def noutrefresh(self):
137 self.window.noutrefresh() 137 self.window.noutrefresh()
138 138
139 def update(self): 139 def update(self):
140 """redraw all the window""" 140 """redraw all the window"""