Merge branch 'master' of manuelcortez.net:pi/guicurses
This commit is contained in:
commit
2d65ed6127
@ -41,7 +41,7 @@ enter selects default button or displays error if not one
|
||||
self.draw()
|
||||
|
||||
def initialDraw(self):
|
||||
for i in xrange(0, len(self._controls)):
|
||||
for i in range(0, len(self._controls)):
|
||||
co = self._controls[i]
|
||||
c = co[0](screen=self.screen, base=self.base, y=i, can_go_back=self.can_go_back, **co[1])
|
||||
self.controls.append(c)
|
||||
@ -275,7 +275,7 @@ The following synonyms are supported where possible:
|
||||
y, x = self.win.getyx()
|
||||
l = len(self.text)
|
||||
if l < self.maxy:
|
||||
for i in xrange(l):
|
||||
for i in range(l):
|
||||
self.win.move(i, 0)
|
||||
self.win.clrtoeol()
|
||||
self.win.addstr(i, 0, ''.join(self.text[i]))
|
||||
|
@ -1,7 +1,7 @@
|
||||
import sys
|
||||
import time
|
||||
import curses
|
||||
import widgets
|
||||
from . import widgets
|
||||
|
||||
class Window(object):
|
||||
|
||||
@ -11,8 +11,8 @@ class Window(object):
|
||||
self.screen.keypad(0)
|
||||
self.screen.nodelay(0)
|
||||
curses.nocbreak()
|
||||
except Exception,e:
|
||||
print "error"
|
||||
except Exception as e:
|
||||
print("error")
|
||||
sys.exit()
|
||||
|
||||
quit=exit
|
||||
@ -111,4 +111,4 @@ class Window(object):
|
||||
controls.append((widgets.Button, dict(prompt=i[1], action=i[0])))
|
||||
if is_submenu:
|
||||
controls.append((widgets.Button, "Back"))
|
||||
return controls
|
||||
return controls
|
||||
|
Loading…
Reference in New Issue
Block a user