i really should be testing this on my local machine :)
This commit is contained in:
parent
9e38bbe353
commit
5891a637b9
8
bink.py
8
bink.py
@ -126,6 +126,10 @@ class App():
|
|||||||
self.update()
|
self.update()
|
||||||
self.loop.start()
|
self.loop.start()
|
||||||
|
|
||||||
|
def terminate():
|
||||||
|
raise urwid.ExitMainLoop
|
||||||
|
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()
|
||||||
@ -134,7 +138,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"):
|
||||||
exit(0)
|
app.exit()
|
||||||
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"):
|
||||||
@ -161,4 +165,4 @@ app = App()
|
|||||||
try:
|
try:
|
||||||
app.loop.run()
|
app.loop.run()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
exit(0)
|
app.exit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user