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

612 Commits

Author SHA1 Message Date
Athanasius
631446f619 Translations: Final LANG comments
The script now outputs nothing about Unknown comments
2021-06-07 16:02:39 +01:00
Athanasius
2351ee0f02 EDMarketConnector: LANG comment pass 2021-06-07 15:32:52 +01:00
Athanasius
87ff0b08a1 Translations: Full phrase "Error: Check E:D journal file location" 2021-06-07 14:17:28 +01:00
A_D
2fb47377a3
Added comments 2021-06-07 12:43:22 +02:00
A_D
5bdbf334ae
Remove hack 2021-06-07 12:42:07 +02:00
Athanasius
5acb5e6140 EDMarketConnector: import update needed for type checking 2021-06-05 09:20:17 +01:00
Athanasius
73ead7c4ef Translations: Add generic 'Check', as in 'Check E:D journal file location' 2021-06-05 09:19:47 +01:00
A_D
fe90f1f0b3
Cleaned up imports, removed incase imports
closes EDCD/EDMarketConnector#569
2021-05-28 14:46:51 +02:00
Athanasius
c48fe4cdfb Suits: Set edmcName in CurrentSuit from CAPI, and ensure displayed 2021-05-27 17:28:52 +01:00
Athanasius
dba3fba8e3 Suits: Fully implement mapping to sane (English only for now) names 2021-05-25 15:24:21 +01:00
Athanasius
0219098d05 UI Suit: Keep line hidden if Odyssey not detected
Else we'll show the line with '<Unknown>' always in Horizons
2021-05-21 11:42:03 +01:00
Athanasius
8b3094dd6b SuitLoadout: Now showing Suit UI if set 2021-05-20 11:09:32 +01:00
Athanasius
55fa06dd73 systray: Remove another bit of code.
If a user had enabled the 'Minimize to systray' option then this would
cause the window to disappear on minimise, with no way to get it back.
2021-05-05 21:21:20 +01:00
Athanasius
10d6c432a4 Append " (beta)" to Cmdr name when appropriate
Closes #1021
2021-05-02 10:31:57 +01:00
Athanasius
316201eb77 systray: Disable whilst we figure out py2exe packaging issue 2021-05-01 19:32:53 +01:00
Athanasius
c867d4c282 CAPI: Don't auto-update on Taxi Docked, but do on Disembark in-station
Closes #1016
2021-05-01 10:14:35 +01:00
Sayak Mukhopadhyay
a52472d6e0 Fix for tray icon not stopping on app stop when minimize to tray option is disabled 2021-04-26 19:18:47 +05:30
Sayak Mukhopadhyay
fc83dcf090 Added annotations for systray 2021-04-26 16:05:40 +05:30
Sayak Mukhopadhyay
b377199119 Changed logic to handle minimize too system tray 2021-04-26 15:36:43 +05:30
Sayak Mukhopadhyay
2dddf02f9b Comments to describe the hack 2021-04-26 14:40:11 +05:30
Sayak Mukhopadhyay
fa58d2f0c2 Added windows OS checks 2021-04-26 14:23:08 +05:30
Sayak Mukhopadhyay
6c0437642e Formatting fixes 2021-04-26 14:03:22 +05:30
Sayak Mukhopadhyay
ecf16762d0 Fixed linting issues with EDMarketConnector.py 2021-04-26 13:37:27 +05:30
Sayak Mukhopadhyay
df31aed6c5 Added appearance config option and implementation for minimize to tray on close functionality 2021-04-26 01:22:01 +05:30
A_D
6f86e173cd
indexed sparse list rather than guessing 2021-04-16 17:41:31 +02:00
A_D
98c946fa31
CAPI loadouts changed from dict to list 2021-04-16 17:11:05 +02:00
Athanasius
53f8209820 Move AppWindow.dump_capi_data() to be in companion.Session instead
It's writing CAPI data to a file, so it should be in companion.py.

Also:

* Use companion.CAPIData as type, not a Mapping.
2021-04-15 16:56:03 +01:00
Athanasius
bb90d0fb59 Suits: If user switches to an unknown loadout, say so 2021-04-13 16:56:48 +01:00
Athanasius
c28dd8c55d Suits: Set/update suit text as necessary.
* 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.
2021-04-13 16:48:16 +01:00
Athanasius
29c059c275 Suit: Label and text now properly aligned, and toggling
* 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.
2021-04-13 15:26:41 +01:00
Athanasius
9ca55e7af7 Suit: Implement auto-toggle of Suit line based on CAPI data
* 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().
2021-04-13 14:15:45 +01:00
Athanasius
3baf92706d Suits: Initially don't show 'Suit' row of UI
* 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.
2021-04-13 13:59:41 +01:00
Athanasius
0382e4b451 Suits: Add basic UI for suit label and name
Currently this will always be there, next commit(s) will sort out it
being dynamic.
2021-04-13 12:48:13 +01:00
Athanasius
4b456b402b EDMarketConnector: Mutually exclude --force-localserver-for-auth --force-edmc-protocol 2021-04-12 16:35:39 +01:00
Athanasius
ae2bbc8929 Set config flag for --force-edmc-protocol so protocol.py can test it 2021-04-12 16:25:53 +01:00
Athanasius
c466d17553 EDMarketConnector: Add CL arg to force use of edmc:// protocol
This will be useful when running from source, i.e. in debugger, and
wanting to work on the protocol code.
2021-04-12 16:20:12 +01:00
Athanasius
74656f45c9 Ensure ship type/name is only clickable when we have the data for it.
This is keyed off monitor.state['Modules'] because that's what
monitor.py EDLogs.ship() uses.
2021-04-12 08:31:48 +01:00
Athanasius
a9c4c191e9 Don't try to generate a shipyard link if we have no known loadout.
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.
2021-04-12 08:31:48 +01:00
Athanasius
27961c1513 AppWindow.getandsend: Only blank status text when we play the bad sound
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*.
2021-04-12 08:31:47 +01:00
Athanasius
88a3f6d73a Remove erroneous on-foot check for 'Where are you?!'
This causes the check to not work as intended on live and is a left-over
from before fixing the code to just use 'err'.
2021-04-12 08:31:47 +01:00
Athanasius
5c99ef1243 Fix CAPI update properly for on-foot/embarking.
* Stop relying on self.status['text'] as indicator, set and use `err`.
2021-04-12 08:31:47 +01:00
Athanasius
72d200f616 Detect when on-foot but no known station.
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.
2021-04-12 08:31:47 +01:00
Athanasius
ad8c63c64c Move util_ships.py ship_map to data.py ship_name_map
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.
2021-04-12 08:31:47 +01:00
Athanasius
0b88117844 chdir() to __file__ when not running frozen 2021-04-12 08:31:46 +01:00
Athanasius
103e856446 EDMarketConnector.py: Move chdir as early as possible
We need the config.py read of .gitversion to be from the right place.
2021-04-12 08:31:46 +01:00
Athanasius
c26d1bce93 Comment out un-necessary logger.trace()
In monitor.py it was all that 'Location' event tracing.
2021-04-12 08:30:51 +01:00
Athanasius
3933dea479 Convert monitor.event_queue to a queue.Queue.
* 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.
2021-04-12 08:30:51 +01:00
Athanasius
672c0d3d49 Don't log when monitor.get_entry() returns None
This is expected due to code using this just to 'tickle' a display
update.
2021-04-12 08:30:51 +01:00
A_D
5010f133a8 Added font override 2021-04-12 08:30:51 +01:00
Athanasius
5edf8d5b59 Change monitor.state['on_foot'] to 'OnFoot' for consistency 2021-04-12 08:30:51 +01:00