1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 07:20:02 +03:00

46 Commits

Author SHA1 Message Date
David Sangrey
6139d66b8e
Merge branch 'develop' into enhancement/2114/pathlib-handover 2024-07-21 23:40:35 -04:00
David Sangrey
067bef628e
[2262] Update Capitalizations and add Translations 2024-06-23 13:14:41 -04:00
David Sangrey
5a9970e6c7
[2262] Remove Debug Code 2024-06-23 13:10:57 -04:00
David Sangrey
3b6259276a
[2262] Move SLEF to Monitor 2024-06-23 13:05:39 -04:00
David Sangrey
0cc35db96b
[2262] SLEF to this var 2024-06-18 22:02:41 -04:00
David Sangrey
fe8818d187
[2114] Apply PathLib Handover 2024-06-10 17:21:06 -04:00
David Sangrey
f6d7100f24
[Fix] Update Translations, Fix Menu Creation, Fix Alt URL 2024-05-21 16:54:49 -04:00
David Sangrey
459881d618
[1173] Fix Circular Import 2024-05-13 19:45:53 -04:00
Phoebe
64cd5b3cc5 [1173] Add alt_URL check 2024-05-14 01:42:26 +02:00
David Sangrey
c8f2b6018c
[1173] Right-Click Provider Options 2024-04-24 20:03:04 -04:00
David Sangrey
080d9f98f2
[1812] Handover Translations 2024-04-22 17:33:28 -04:00
David Sangrey
016fb96e06
[2186] General Cleanup 2024-03-27 22:01:49 -04:00
David Sangrey
08818785d0
[2186] HyperLinkLabel first pass 2024-03-27 20:03:23 -04:00
David Sangrey
05eaf05938
[Minor] Remove Unused Import
For Now
2024-03-27 19:41:01 -04:00
David Sangrey
791a0c80c2
[Minor] Remove Deprecated Files and Functions 2024-03-27 18:36:03 -04:00
Phoebe
e3f3c802be
Merge pull request #2123 from HullSeals/enhancement/2122/list-to-tuple-comparitors
[#2122] Handover a number of Lists to Tuples
2024-01-04 00:03:09 +01:00
David Sangrey
df7d449c9b
[Fix] Correct Type Hint 2024-01-03 18:02:29 -05:00
David Sangrey
b7633fa6e3
Handover a number of Lists to Tuples
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.
2023-12-27 00:29:35 -05:00
David Sangrey
57b00c6105
[Minor] Minor Code Tweaks
Officially Deprecates ttkHyperlinkLabel/openurl() function, a few minor code readability updates, and updates dependencies
2023-12-23 20:12:17 -05:00
David Sangrey
4dd83f5fa4
[2051] And a few more, with timezones 2023-11-17 19:44:36 -05:00
Athanasius
5609b908fb
ttkHyperlinkLabel: Remove un-used typing.Optional import 2022-12-23 14:47:34 +00:00
Athanasius
e45a89d970
EDMarketConnector.py: Minor type fixes & ttkHyperlink.py too 2022-12-23 14:47:28 +00:00
Athanasius
115b5be3bf
ttkHyperlinkLabel: Just use webbrowser.open(url) unconditionally
See the expanded docstring on the `openurl()` function.
2022-12-06 14:50:05 +00:00
Athanasius
ab979ed043
ttkHyperlinkLabel: Use Any where it's appropriate in function signatures 2022-12-05 10:58:16 +00:00
Athanasius
b57a8f99ae
ttkHyperlinkLabel: Now passing flake8 & mypy
* `openurl()` - Don't pass `None` as second parameter to `QueryValueEx()`.
  Passing `''` was tested as still working.
2022-12-03 21:04:50 +00:00
Athanasius
e280d6c283
ttkHyperlinklabel.py: Initial flake8 pass (and some mypy)
This fixes an apparently harmless bug in the `openurl()` function defined
in this module (it's not part of the class).

1. On `win32` lookup the user setting for opening HTTPS URLs.
2. If that doesn't look like IE or Edge...
3. Set `cls` to the value for that.
4. Now look up the 'use this command' for *that* ...
5. And if it doesn't have `iexplore` in it...
6. Use `subprocess.Popen()` to invoke that browser with the given URL.

The problem is that step 6 still tries to use `buf.value`.  But `buf` is
no longer present as it was from before 5989acd0d3263e54429ff99769ff73a20476d863
changed over to `winreg`.  It should be just `value` from the winreg
calls.

That exception is then caught and ignored, and it ends up just running
`webbrowser.open(url)` anyway.

To be honest, this feels like we should just make this an unconditional
call to `webbrowser.open(url)` now, given apparently no-one's complained
about it always actually using that not working for them.  Given Edge is
Chrome-based now, and any supported OS should have Edge, Chrome or Firefox
(OK, maybe Safari and some others) as the HTTPS browser, I don't see this
being an issue.
2022-12-03 18:21:16 +00:00
A_D
bff6175ee7
Update to use sys.platform over platform 2022-01-26 18:51:49 +02:00
Athanasius
631446f619 Translations: Final LANG comments
The script now outputs nothing about Unknown comments
2021-06-07 16:02:39 +01:00
A_D
e293f0f334 Removed star import 2021-04-01 14:45:50 +01:00
A_D
99014dd970 Added a config to use the new file based shipyard
This also reverts commenting out the old solution for long URLs
2020-07-23 14:36:02 +01:00
A_D
b818922193 Fixed issues with super long links for shipyards
This works by creating a temp file at config.app_dir and storing the
link in there, followed by directing the local browser to open the file.

HTML meta tags are then used to direct the browser to refresh to a URL
of our choosing (which is HTML escaped, just in case someone tries
something clever)

This should work everywhere, and on any browser (as the file:// format
is defined at https://tools.ietf.org/html/rfc1738 which was posted in
1994).

The URI used (`file://localhost/path`) ensures that we only ever
ask for a localhost file at our path.

The HTML format should be completely compliant with all major browsers
as well, ensuring that behaviour is consistent (assuming they support
HTML meta tags)
2020-07-23 14:36:02 +01:00
Athanasius
71bb14a737 Document allowed imports for PLUGINS
* List added in 'Available imports' section of PLUGINS.md
* Various *.py files now have comments about things being allowed for
 plugin import.
2020-07-12 19:25:47 +01:00
Jonathan Harris
5989acd0d3 Switch to built-in winreg module on Windows 2019-09-30 03:07:38 +01:00
Athanasius
14d6d353a8 Fixes registry browser lookup, and confirms EDDB system/station lookups work 2019-09-26 11:40:42 +01:00
Athanasius
218c068ee5 Running EDMarketConnector.py 'works'.
First pass utilising 'futurize' to do most of the work.

  There's an issue with ur'\"' in l10n.py which I'm not sure how to
properly fix.

  This now has errors when hitting the 'Update' button.
2019-09-26 11:40:38 +01:00
Jonathan Harris
274867ca67 url parameter no longer mandatory for HyperlinkLabel 2017-07-29 15:36:44 +01:00
Jonathan Harris
b794e19d75 Automatically highlight widgets that set a custom cursor 2017-07-29 14:41:59 +01:00
Jonathan Harris
d5e8ee3710 Fix for configuring widget-specific state 2017-05-03 13:09:17 +01:00
Jonathan Harris
cf98234f9a Maintain custom colours when changing state 2017-04-12 01:44:08 +01:00
Jonathan Harris
d1cdc89ecd Work around Windows limit on ShellExecute arg len 2016-11-20 01:00:17 +00:00
Jonathan Harris
33f322e1ae Allow changing of url after creation 2016-11-17 17:29:15 -08:00
Jonathan Harris
740627f043 Fix underline font init syntax 2016-07-26 23:31:48 +01:00
Jonathan Harris
e7a727acde Fix main window system & station alignment on OSX.
Broken by 84a66c5.
2016-01-03 22:59:43 +00:00
Jonathan Harris
84a66c5285 Split settings into tabbed notebook.
Fixes #53.
2016-01-02 01:59:16 +00:00
Jonathan Harris
a4e38f7c63 Remove label underline before opening URL in browser window. 2015-11-08 15:19:23 +00:00
Jonathan Harris
a74a928764 Split out ttk HyperlinkLabel widget into a separate file and generalise. 2015-10-13 23:10:21 +01:00