1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

EDMarketConnector: Add detailed logging to shutdown sequence

This commit is contained in:
Athanasius 2021-03-22 12:55:07 +00:00
parent 45ab19b6b1
commit d0ee0b1148

View File

@ -1225,46 +1225,39 @@ class AppWindow(object):
config.set('geometry', f'+{x}+{y}')
# Let the user know we're shutting down.
self.status['text'] = _('Shutting down...')
self.status['text'] = 'Shutting down...'
self.w.update_idletasks()
logger.info('Starting shutdown procedures...')
# First so it doesn't interrupt us
logger.info('Closing update checker...')
self.updater.close()
logger.info('Closing protocol handler...')
protocolhandler.close()
# Earlier than anything else so plugin code can't interfere *and* it
# won't still be running in a manner that might rely on something
# we'd otherwise have already stopped.
logger.info('Notifying plugins to stop...')
plug.notify_stop()
# Handling of application hotkeys now so the user can't possible cause
# an issue via triggering one.
logger.info('Unregistering hotkey manager...')
hotkeymgr.unregister()
# Now the main programmatic input methods
logger.info('Closing dashboard...')
dashboard.close()
logger.info('Closing journal monitor...')
monitor.close()
# Frontier auth/CAPI handling
logger.info('Closing protocol handler...')
protocolhandler.close()
logger.info('Notifying plugins to stop...')
plug.notify_stop()
logger.info('Closing update checker...')
self.updater.close()
logger.info('Closing Frontier CAPI sessions...')
companion.session.close()
# Now anything else.
logger.info('Closing config...')
config.close()
logger.info('Destroying app window...')
self.w.destroy()
logger.info('Done.')
def drag_start(self, event) -> None:
"""Initiate dragging the window."""
self.drag_offset = (event.x_root - self.w.winfo_rootx(), event.y_root - self.w.winfo_rooty())