* 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.
* monitor.on_foot is now monitor.state['on_foot'] as plugins need to
access it.
* EDDB:journal_entry() now stores that in this.on_foot to check later.
* this.on_foot checked in cmdr_data() to actually set station name from
that data if needs be. This avoids setting it to STATION_UNDOCKED if
data['commander']['docked'] is False, when we're on_foot.
Well, it doesn't now raise ServerLagging for a last Journal with a
LoadGame on-foot and in-station.
It does then cause "You're not docked at a station!" to show up.
This way we can tell the difference between:
1. This process obtained the lock.
2. Another process has the lock.
3. We couldn't get the lock due to not being able to open the lock file
read-write.
Case 3 is currently also returned if the configured journal directory
doesn't exist. This will be the case on any MacOS system that never had
the game running. Likely given the OS hasn't been supported for the
game in years now.
# Conflicts:
# EDMarketConnector.py
* Implement JournalLock.release_lock().
* Renamed other methods to remove journaldir_ prefix.
* Slightly tweak the code flow for obtaining the lock.
* Implement JournalLock.update_lock(), called from AppWindow.postprefs().
# Conflicts:
# EDMarketConnector.py