* If you request docking successfully then show the station namd and
have the link work.
* This is then only undone if you:
1) Dock and undock
2) Supercruise away
3) Jump away
It is *not* undone if you simply cancel the docking request.
Tested only with same provider for system and station for each of the
three, not the other 6 combinations.
* Make all plugins use `requests.utils.requote_uri()`
* Make all plugins use roughly the same logic, without if/else trees
(as the bodies do a `return ...`), ending with `return ''` if input
parameters are None.
This throws away the inara fallback to `this.station or this.system` as
it's unlikely the in-plugin tracking did a better job than the
monitor.py code.
By default the ttkHyperlinkLabels for 'system' and 'station' names have
their 'url' members set to the functions in EDMarketConnector.App.
The EDDB one used to override the function as it had to do that special
name -> EDDB ID lookup from systems.p. When I changed the code to not
need that any more I didn't fully understand what these overrides were.
After updating the EDDB code I then made sure the same logic was also in
the other plugins which meant they *also* set static strings, overriding
the call to the EDMarketConnector.App functions (which chain through to
the current plugin providers).
Unfortunately I didn't quite update the EDSM code enough causing
journal_entry() code to *not* set a new system 'url' despite changing
the 'text'. This meant that only CAPI updates (so docking and login)
caused the URL to change, despite updating the 'text' to the correct
system name.
Rather than have everything setting static strings just do away with the
overrides as they're not needed!
This replaces the list+queue system that the inara plugin originally
used with a deque based one.
The main differences here are that the list the worker thread uses to
send to inara and the list that events are added to is the same, with
the worker thread making a duplicate and clearing the original each time
it sends events (losing events if it fails to upload three times).
The format of the data has changed as well, from simple tuples to
NamedTuple classes that provide some extra type safety and sanity when
accessing fields.
The event queue itself is actually multiple queues, one per
API/FID/CMDR_name triplicate, thus allowing multiple commander switches
while we're running without causing any weird issues
Generally for the logic cleanups it was replacing giant list
comprehensions with slightly smaller filter calls. filter() is just
plain cleaner when all you're doing in a list comp is
[x for x in y if somecondition].
timeout_session provides two things, TimeoutAdapter, a HTTP adapter
subclass that automatically adds timeouts to all requests, and
new_session, which automatically creates a request.Session with the
adapter in the correct place.