* After any Journal event we might as well set it.
* Attempt to update on a `SwitchSuitLoadout` event, assuming the new
slot is one we heard about in the last CAPI data.
* There was a 'hidden' padx/pady thing going on, not applying because we
were hidden/not gridded, so apply in toggle/show.
* Make that padx=5 all over use a common constant.
* Set Suit text if most recent CAPI data contains the relevant data. If
it's not present then hide the Suit row.
* There's a 'visible' argument to force it, default None to ignore.
That flag is checked first in the function, and then it sets the
'current' state to the opposite so the following conditional will do
the right thing.
* Toggling is triggered in AppWindow.getandsend().
* Don't grid to start with, but store the row it would be on.
* `toggle_suit_row()` to toggle it on/off. NB: Might implement a "force
to" `visible` argument, but going to test without for now.
This is currently the case on Odyssey Alpha Phase 1 when logging in
on-foot. There's no Journal 'Loadout' event, but the CAPI update does
let us know we have a Sidewinder active. But `monitor.state['Modules']`
is None.
AppWindow.getandsend() is set on a timer for all of StartUp, Location
and Docked. This means it can trigger up to three times for a login
when docked.
Subsequent calls would hit the cooldown timer and blank the status text
blindly, hiding the 'Last Updated at' text.
To be honest I'm not sure it even needs blanking *then*.
This will trigger the "Where are you?!" message, which now can happen.
I need to double-check this against live behaviour, and might move this
to a different check, as I think on live it's valid to query in-space.
Also refactors data.py to edmc_data.py as I'm having weird issues with
PyCharm debugger not starting, and this seems to be to do with module
name clashes.
* We now use event_queue.empty() to see if it is indeed empty.
* Changed AppWindow.journal_event() to also use .empty() rather than
`while True`. Keeping the `'if not entry'` check just in case.
This prevents it from calling monitor.get_entry() when the prior run
through the loop has just emptied the queue. Thus we'll only log when
it genuinely IS unexpectedly empty.
* During *game* Shutdown we can send the synthetic 'Shutdown' event
through, and then find and append the actual game 'Shutdown' event
(i.e. this wasn't a crash, which is what the synthetic event is meant
to react to). But AppWindow.journal_event() loop picks up both events
in one call, so the second <<JournalEvent>> sends it working on an
empty queue.
Thus we log in monitor.get_entry() only if the queue is empty *and*
the game is still running.
* NB: Also adds 'Component' to the OTHER place montitor.state is
initialised.