flashing stops if clicked
This commit is contained in:
parent
4d806fd859
commit
103177d79f
@ -90,7 +90,10 @@ class Application(wmoo.Application):
|
|||||||
ic("")
|
ic("")
|
||||||
ic(f"sender: {sender}")
|
ic(f"sender: {sender}")
|
||||||
ic(f"message: {message}")
|
ic(f"message: {message}")
|
||||||
self._flasher = 7
|
if self.backlit:
|
||||||
|
self._flasher = 8
|
||||||
|
else:
|
||||||
|
self._flasher = 7
|
||||||
|
|
||||||
def handle_sent_im_msg(self, account, recepient, message):
|
def handle_sent_im_msg(self, account, recepient, message):
|
||||||
"""
|
"""
|
||||||
@ -154,6 +157,11 @@ class Application(wmoo.Application):
|
|||||||
self.draw_background()
|
self.draw_background()
|
||||||
self.draw_all_text()
|
self.draw_all_text()
|
||||||
|
|
||||||
|
def backlight_off(self, event):
|
||||||
|
self._flasher = 0
|
||||||
|
if self.backlit:
|
||||||
|
self.toggle_backlight(True)
|
||||||
|
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
wmoo.Application.update(self)
|
wmoo.Application.update(self)
|
||||||
@ -192,7 +200,7 @@ def main():
|
|||||||
# 6x7 grey1=1 grey2=10 green1=18 green2=27
|
# 6x7 grey1=1 grey2=10 green1=18 green2=27
|
||||||
app.draw_background()
|
app.draw_background()
|
||||||
app.draw_all_text()
|
app.draw_all_text()
|
||||||
app.addCallback(app.toggle_backlight, 'buttonrelease', area=(2,2,62,62))
|
app.addCallback(app.backlight_off, 'buttonrelease', area=(2,2,62,62))
|
||||||
|
|
||||||
# Start the GLib main loop in a separate thread
|
# Start the GLib main loop in a separate thread
|
||||||
glib_thread = threading.Thread(target=run_glib_mainloop, daemon=True)
|
glib_thread = threading.Thread(target=run_glib_mainloop, daemon=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user