Tuples are (slightly) more efficient for comparing if x in y. Not that it'll really matter at this scale, but it's technically better and simple to implement.
Applying to all files except theme.py, because theme.py is scary.
- Fixes#2088 and #2089.
- Adds usage of ``row=`` for ``.grid()`` for all config entries in included plugins.
- Changes all config pages to start at row 0.
- Starts introducing a standard for config panel layouts.
I would have added these during a mypy cleanup, but it turns out they're both
not necessary *and* it actually prevents the EDSM Settings tab from properly
populating.
With the tracking now being in monitor.py this needs to be ASAP after the
local copies of the tracking have been updated.
Below the possible `this.status_body_name` blanking, in case that's hit.
1. EDDB plugin tracked this for keeping the Station link text up to date.
* So moved it to monitor.state['SystemPopulation'].
* PLUGINS.md updated to cite this.
* PLUGINS.md also updated to note state entries that are set to None if
remote multi-crew is detected.
1. EDDB plugin needs to track the system name, but we're moving all of that
into monitor.py.
2. monitor.py was tracking this in monitor.system, but it needs to be in
monitor.state['SystemName'] in order for plugins to access it.
So, move monitor.system to monitor.state['SystemName'] and update all uses.
* Typod '.status' instead of 'state'.
* Bring in some sanity-checks and comments from eddn.py to monitor.py.
* Have a 'pass' elif for 'supercruiseentry' so as to comment why we do NOT
use this to blank out body state.
* Bring in the 'if we exit to main menu, blank body state' from eddn.py.
* Remove checks from eddn.py that are now in monitor.py.
* Have a disctinct 'docked' event check in eddn.py for triggering the
"Now we're docked, so the Delay sending until docked is satisfied"
sending of messages.
* Minor grammar edit only in PLUGINS.md (I was checking if it explicitly
stated what data is expected in the synthetic 'StartUp' event, it doesn't).
* First changes to move some monitor properties into the monitor.state
dictionary. This is for system or body data.
* Re-factored the generation of 'StartUp' event into
`EDLogs.synthesize_startup_event()`. It's done in two places, so was
anti-DRY.
* In general any bulk setting of system & body data is now done in the
same order for comparison clarity.
* A little of the location tracking has been duplicated from plugins/eddn.py.
This is with a view to switching *it* to using the state version.
* eddn: Needs to find status text, although really there should be a helper
function for this.
* Removed commented out references to same in edsm and inara.
As we're experimenting with per-plugin frames up a level `parent.children`
would need to be `parent.parent.children`, but this way it will Just Work
without knowledge of the hierarchy.