Commit Graph
279 Commits
Author SHA1 Message Date
Athanasius cd24db88a9 UI Scaling: Size the Scale bar as per our startup value
If we use the last configured value then the width of the Scale bar
changes as per the user's last setting, even though they might not have
yet restarted for all the rest of the UI to resize.
2020-09-11 11:14:19 +01:00
Athanasius 0a5bbad55b UI Scaling: Change our %age scaling to be relative to base tk-scaling
So if at startup tk-scaling is 1.33 then a user configured 200(%) will
set it to 2.66 for this run.

* Low end of scale bar set to 10, not 0, because now 0 makes absolutely
  no sense.
* In theory the width of the scale bar, in pixels, is now also correctly
  scaled.
2020-09-11 09:26:01 +01:00
Athanasius f2ab8f0fd1 UI Scaling: Switch to using integers to avoid tk bug
Using a Tk.DoubleVar() with a locale where a comma is used as the
decimals separator leads to internal tk code recording values with the
comma but then other tk code not accepting that back, so it always
thinks the value is zero and the scale slider can't be moved.

Ref: https://stackoverflow.com/questions/45289237/tkinter-scale-slider-with-float-values-doesnt-work-with-locale-of-language-that

* Change to storing as a REG_DWORD under 'ui_scale' not 'ui_scaling'.
* Change all the code, except the call to *set* the tk scaling to use an
  integer, with 100 = 100%, i.e. equivalent to the old 1.0.
* Update strings slightly, so translations will need updating too.

NB: The theme.default_ui_scale value for plugin authors to query is
still the float that tk returns.
2020-09-10 16:54:14 +01:00
Athanasius 174e169469 UI Scaling: Add text stating changes require a restart.
Also updates the translation text.
2020-09-10 16:35:59 +01:00
Athanasius 6484540263 UI Scaling: Add new strings to translation template 2020-09-09 13:35:05 +01:00
Athanasius 94607bf55f UI Scaling: Use a tk.Scale instead, allowing for finer grained setting.
* NB: Windows Registry has no type for 'Float', so we use a string.
* We now store '0.0' to mean 'default'.
2020-09-09 13:31:36 +01:00
Athanasius 957d11c84b prefs.py: Minor comment format change 2020-09-08 13:16:07 +01:00
Athanasius 1850354b8d UI Scaling: Implement a 'default' option
* If no ui_scaling yet set, set it to 'default'.
* 'default' added to dropdown choices.

Note that you still need an application restart for this to take effect.
2020-09-08 12:27:57 +01:00
Athanasius ea53a60596 UI Scaling: Option added to Appearance tab of Settings 2020-09-08 12:18:48 +01:00
Athanasius 09add21a1a Logging: DEBUG always to rotated files, configured level to stdout/err
* EDMCLogging.Logger.get_streamhandler() method to get the
  logger_channel so prefs.py can call setLevel() on it.
* The top-level Logger level is always DEBUG.
* The RotatingFileHandler level is always DEBUG.
* The StreamHandler level is as configured by the user.
* EDMCLogging now creates a singleton of EDMCLogging.Logger and its
  associated Logger.
* plug.py tweaked to only import EDMCLogging where it's needed for
  getting/creating plugin loggers, else `import logging`.
2020-09-08 10:03:16 +01:00
Athanasius bebe162071 logging: Now setting loglevel from Settings, and loading at start 2020-09-06 18:29:26 +01:00
Athanasius fa7b6b4daf logging: 'loglevel' preference now saved. 2020-09-06 18:22:10 +01:00
Athanasius 0deeeb5799 logging: Added Settings>Configuration 'Loglevel' option.
Not yet functional, but dropdown is there and properly populated.
2020-09-06 18:19:55 +01:00
Athanasius b61645ab06 shipyard: Add UI to toggle option for alternate URL opening
* Added checkbox next to shipyard choice dropdown.
* Also a TODO for using an incrementing 'row' variable throughout.
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
Athanasius ae62bec63d Remove extraneous 'e '
*shakes fist at PyCharm*
2020-07-12 16:07:19 +01:00
Athanasius 690b8b0da3 Use 'main' branch for 'migrate plugins' URL 2020-07-12 15:59:40 +01:00
Athanasius 89f113e190 Use Preferences Save Serial Number instead of flag
* new class `PrefsVersion` in prefs.py.  A singleton `prefsSaved` (note
   case) is created.
 * When new preferences are added and require defaults on first run the
   code should use:

     `if prefsVersion.shouldSetDefaults(<prior release version>, [<optional old test>]):`

   to check if defaults should be set in preferences.  So if prior release
   was '3.4.6.0' and you've added a new preference with defaults you should
   call this with '3.4.6.0' as the first argument.
   The <optional old test> is really only for historical purposes, as a
   fallback in case no 'PrefsVersion' has yet been set in the user's
   Registry/settings file.
 * Any code that adds such a new preference **MUST** make changes to the
   `versions` dictionary in the PrefsVersion class.
     1. Add the predicted next version to the dictionary, with number one
        higher than 'current'
     2. Set 'current' equal to that new value.
   Obviously if other post-last-release code has already done this then you
   don't need to.

   Failure to update the versions dictionary in this manner will lead to an
   Exception being raised, and the code the preferences are for failing
   (i.e. EDDN means no EDDN tab on Settings).

Closes #407
2020-07-01 15:33:42 +01:00
Athanasius ecdd65e0ac prefs.py change for that output settings fix
Addresses #407
2020-06-30 15:22:50 +01:00
Athanasius a40b0e33ca Detect plugins without Python 3.x support and warn user.
To allow users to sort out their plugins before EDMC itself moves to
Python 3.x warn them if any of their enabled, non-stock, plugins do not
have a plugin_start3() method.

  * If any are found without support there's a popup triggered at the
    end of AppWindow initialisation.
  * Then the user can check Settings > Plugins to see a list of the
    plugins without Python 3.x support.
2020-06-21 16:57:37 +01:00
Athanasius 259bb3bbd6 Merge branch 'release-final-python27' into python3 2020-06-21 16:43:02 +01:00
Jonathan Harris 3c46e8d5fa All executable files invoked with #!/usr/bin/env python3 2020-06-21 16:28:30 +01:00
Athanasius a8c0ec3ab9 Updates prefs.py for "import tkinter.filedialog" 2020-06-21 16:23:01 +01:00
Athanasius e7545e174f Use .items() instead of .iteritems() 2020-06-21 16:23:00 +01:00
Athanasius d0ae621387 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.
2020-06-21 16:23:00 +01:00
Athanasius 4d5fa590af New option to NOT check for app updates automatically if in-game.
* Stores disable_autoappupdatecheckingame in settings.
  * If 'disable' is active then once you're in-game WinSparkle auto
    check for updates is disabled.
  * Whatever the state of the option WinSparkle auto updates are
    (re-)enabled when you exit the game to Main Menu or fully.
  * Using 'Help' > 'Check for updates' manually will still always work.

It has been difficult to test the code fully because it isn't easy to
get WinSparkle's registry data about last update check time set just right
to not check immediately, but to do so some reasonable time after you're
in-game and have confirmed the new option setting isn't easy.
  Worst case people won't learn about an update until the next time they
run EDMC.
2020-06-20 20:46:05 +01:00
Athanasius 670842e8f6 Adds link to plugin migration guide to Settings > Plugins 2020-06-19 19:43:12 +01:00
Athanasius d3abb6fa1f Detect plugins without Python 3.x support and warn user.
To allow users to sort out their plugins before EDMC itself moves to
Python 3.x warn them if any of their enabled, non-stock, plugins do not
have a plugin_start3() method.

  * If any are found without support there's a popup triggered at the
    end of AppWindow initialisation.
  * Then the user can check Settings > Plugins to see a list of the
    plugins without Python 3.x support.
2020-06-18 19:40:46 +01:00
Jonathan Harris a6ce9edc1d Fix running under Wine 2019-06-19 12:09:26 +01:00
Jonathan Harris 2dd6c4d008 Support not always on top with dark theme on Linux
Fixes #421
2019-05-28 00:06:33 +01:00
Jonathan Harris aac2f838f3 Fix for preferences windows on macOS Mojave 2019-01-10 00:04:14 +00:00
Jonathan Harris 7cca099699 Remove redundant code 2019-01-05 17:35:16 +00:00
Jonathan Harris f17f5d3f25 PKCE OAuth2 access to cAPI 2018-12-28 03:32:26 +00:00
Jonathan Harris cc4390de49 Switch EDDN integration to a plugin 2018-11-18 01:52:05 +00:00
Jonathan Harris 96ffc82ca7 Support accessing Journal on macOS remotely over SMB 2018-10-30 19:33:40 +00:00
Jonathan Harris b9d77baed9 Ship loadout no longer derived from cAPI 2018-07-03 19:23:39 +01:00
Jonathan Harris a442d2cd14 Extend localisation support to plugins 2018-05-12 20:50:45 +01:00
Jonathan Harris 3a3827f168 Make system and station links unclickable if URL not available 2018-04-04 19:34:35 +01:00
Jonathan Harris 0eaa61bdd9 Make system and station info websites configurable 2018-04-03 01:03:07 +01:00
Jonathan Harris e3323f8f6f Drop support for interaction log 2017-11-24 08:59:50 +00:00
Jonathan Harris 2038d2b2cc Fix typo 2017-08-15 09:12:59 +01:00
Jonathan Harris 2c47f96312 Widen folder location fields 2017-07-29 16:22:05 +01:00
Jonathan Harris 758997002c Take into account non-client area when positioning popup window 2017-07-29 16:17:50 +01:00
Jonathan Harris e810b87dd4 Switch EDSM integration to a plugin 2017-07-29 15:36:44 +01:00
Jonathan Harris 93ff800f90 Update references to EDDN wiki 2017-07-29 15:36:43 +01:00
Jonathan Harris 60ad3b4c09 Inform plugins of Cmdr and Beta status
Notify plugins when Cmdr or Beta status changes while the preferences dialog
is open.

Display a note on the Credentials tab when Cmdr is not set. Addresses #224
2017-07-29 15:36:43 +01:00
Jonathan Harris 084128e797 Add support for internal plugins
Settings tab shows current plugins.
2017-07-29 14:41:59 +01:00
Jonathan Harris 1e51d2f29b Add interaction() plugin callback
Fixes #220
2017-06-18 02:32:25 +01:00
Jonathan Harris efc1cb33b6 Use new Beta universe Companion API server. 2017-06-16 18:22:00 +01:00
Jonathan Harris 244cd6b05b Make plugins Open button work on macOS 2017-04-25 12:51:04 +01:00