mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-26 07:08:04 +00:00
Make some notification noise when the application terminates without request
This commit is contained in:
3
main.py
3
main.py
@@ -172,8 +172,11 @@ if __name__ == "__main__":
|
||||
client.print(_("gui", "status", "exiting"))
|
||||
await client.shutdown()
|
||||
if not client.gui.close_requested:
|
||||
# user didn't request the closure
|
||||
client.print(_("status", "terminated"))
|
||||
client.gui.status.update(_("gui", "status", "terminated"))
|
||||
# notify the user about the closure
|
||||
client.gui.grab_attention(sound=True)
|
||||
await client.gui.wait_until_closed()
|
||||
# save the application state
|
||||
# NOTE: we have to do it after wait_until_closed,
|
||||
|
||||
Reference in New Issue
Block a user