slinging more untested code
This commit is contained in:
parent
1aef864d87
commit
9e38bbe353
9
bink.py
9
bink.py
@ -126,11 +126,6 @@ class App():
|
|||||||
self.update()
|
self.update()
|
||||||
self.loop.start()
|
self.loop.start()
|
||||||
|
|
||||||
def exit(self, message=""):
|
|
||||||
self.loop.stop()
|
|
||||||
run(["clear"])
|
|
||||||
exit(0)
|
|
||||||
|
|
||||||
class ActionBox(urwid.ListBox):
|
class ActionBox(urwid.ListBox):
|
||||||
def keypress(self, size, key):
|
def keypress(self, size, key):
|
||||||
keyl = key.lower()
|
keyl = key.lower()
|
||||||
@ -139,7 +134,7 @@ class ActionBox(urwid.ListBox):
|
|||||||
elif keyl == "r":
|
elif keyl == "r":
|
||||||
app.update()
|
app.update()
|
||||||
elif keyl in ("q", "x"):
|
elif keyl in ("q", "x"):
|
||||||
app.exit()
|
exit(0)
|
||||||
elif keyl == " ":
|
elif keyl == " ":
|
||||||
super().keypress(size, "page down")
|
super().keypress(size, "page down")
|
||||||
elif keyl in ("j", "n", "ctrl n"):
|
elif keyl in ("j", "n", "ctrl n"):
|
||||||
@ -166,4 +161,4 @@ app = App()
|
|||||||
try:
|
try:
|
||||||
app.loop.run()
|
app.loop.run()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
app.exit()
|
exit(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user