mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 01:22:19 +03:00
Merge branch 'develop' into beta
This commit is contained in:
commit
03556b08cc
14
ChangeLog.md
14
ChangeLog.md
@ -6,8 +6,20 @@ This is the master changelog for Elite Dangerous Market Connector. Entries are
|
||||
in the source (not distributed with the Windows installer) for the
|
||||
currently used version.
|
||||
---
|
||||
Release 5.11.0-rc1
|
||||
Pre-Release 5.11.0-rc2
|
||||
===
|
||||
This is a release candidate for 5.11.0.
|
||||
|
||||
This release is identical to 5.11.0-rc1, with a few additions:
|
||||
|
||||
**Changes and Enhancements**
|
||||
* Adds Additional Error Processing to the System Profiler when launched from EDMC
|
||||
* Adds the ability to resize the Settings window to larger than the initial default size
|
||||
* Tweaked a few list length checks that could just be boolean to be bool
|
||||
|
||||
Pre-Release 5.11.0-rc1
|
||||
===
|
||||
This is a release candidate for 5.11.0.
|
||||
|
||||
This release includes a number of new features and improvements, including a new Beta Update Track for testing future updates, enhanced context menus for text entry fields and UI elements, a revamp to the existing translation system and logging capabilities, and more. This release includes the Python Image Library (PIL) into our core bundle, adds a number of stability and configuration checks to the tool, and adds new schemas and configuration values to senders.
|
||||
|
||||
|
@ -620,7 +620,7 @@ class AppWindow:
|
||||
self.help_menu.add_command(command=lambda: not self.HelpAbout.showing and self.HelpAbout(self.w))
|
||||
logfile_loc = pathlib.Path(tempfile.gettempdir()) / appname
|
||||
self.help_menu.add_command(command=lambda: prefs.open_folder(logfile_loc)) # Open Log Folder
|
||||
self.help_menu.add_command(command=prefs.help_open_system_profiler) # Open Log Folde
|
||||
self.help_menu.add_command(command=lambda: prefs.help_open_system_profiler(self)) # Open Log Folde
|
||||
|
||||
self.menubar.add_cascade(menu=self.help_menu)
|
||||
if sys.platform == 'win32':
|
||||
|
@ -489,6 +489,9 @@
|
||||
/* prefs.py: Lable on list of user-disabled plugins; In files: prefs.py:977; */
|
||||
"Disabled Plugins" = "Disabled Plugins";
|
||||
|
||||
/* prefs.py: Catch & Record Profiler Errors; */
|
||||
"Error in System Profiler" = "Error in System Profiler";
|
||||
|
||||
/* stats.py: Cmdr stats; In files: stats.py:58; */
|
||||
"Balance" = "Balance";
|
||||
|
||||
|
@ -54,7 +54,7 @@ appcmdname = 'EDMC'
|
||||
# <https://semver.org/#semantic-versioning-specification-semver>
|
||||
# Major.Minor.Patch(-prerelease)(+buildmetadata)
|
||||
# NB: Do *not* import this, use the functions appversion() and appversion_nobuild()
|
||||
_static_appversion = '5.11.0-rc1'
|
||||
_static_appversion = '5.11.0-rc2'
|
||||
_cached_version: semantic_version.Version | None = None
|
||||
copyright = '© 2015-2019 Jonathan Harris, 2020-2024 EDCD'
|
||||
|
||||
|
60
prefs.py
60
prefs.py
@ -57,14 +57,18 @@ def open_folder(file: pathlib.Path) -> None:
|
||||
system(f'xdg-open "{file}"')
|
||||
|
||||
|
||||
def help_open_system_profiler() -> None:
|
||||
def help_open_system_profiler(parent) -> None:
|
||||
"""Open the EDMC System Profiler."""
|
||||
profiler_path = pathlib.Path(config.respath_path)
|
||||
if getattr(sys, 'frozen', False):
|
||||
profiler_path /= 'EDMCSystemProfiler.exe'
|
||||
subprocess.run(profiler_path)
|
||||
else:
|
||||
subprocess.run(['python', "EDMCSystemProfiler.py"], shell=True)
|
||||
try:
|
||||
if getattr(sys, 'frozen', False):
|
||||
profiler_path /= 'EDMCSystemProfiler.exe'
|
||||
subprocess.run(profiler_path, check=True)
|
||||
else:
|
||||
subprocess.run(['python', "EDMCSystemProfiler.py"], shell=True, check=True)
|
||||
except Exception as err:
|
||||
parent.status["text"] = tr.tl("Error in System Profiler") # LANG: Catch & Record Profiler Errors
|
||||
logger.exception(err)
|
||||
|
||||
|
||||
class PrefsVersion:
|
||||
@ -232,7 +236,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
"""The EDMC preferences dialog."""
|
||||
|
||||
def __init__(self, parent: tk.Tk, callback: Optional[Callable]):
|
||||
tk.Toplevel.__init__(self, parent)
|
||||
super().__init__(parent)
|
||||
|
||||
self.parent = parent
|
||||
self.callback = callback
|
||||
@ -242,25 +246,30 @@ class PreferencesDialog(tk.Toplevel):
|
||||
if parent.winfo_viewable():
|
||||
self.transient(parent)
|
||||
|
||||
# position over parent
|
||||
# http://core.tcl.tk/tk/tktview/c84f660833546b1b84e7
|
||||
# TODO this is fixed supposedly.
|
||||
# Position over parent
|
||||
self.geometry(f'+{parent.winfo_rootx()}+{parent.winfo_rooty()}')
|
||||
|
||||
# remove decoration
|
||||
# Remove decoration
|
||||
if sys.platform == 'win32':
|
||||
self.attributes('-toolwindow', tk.TRUE)
|
||||
|
||||
self.resizable(tk.FALSE, tk.FALSE)
|
||||
# Allow the window to be resizable
|
||||
self.resizable(tk.TRUE, tk.TRUE)
|
||||
|
||||
self.cmdr: str | bool | None = False # Note if Cmdr changes in the Journal
|
||||
self.is_beta: bool = False # Note if Beta status changes in the Journal
|
||||
self.cmdrchanged_alarm: Optional[str] = None # This stores an ID that can be used to cancel a scheduled call
|
||||
|
||||
# Set up the main frame
|
||||
frame = ttk.Frame(self)
|
||||
frame.grid(sticky=tk.NSEW)
|
||||
self.columnconfigure(0, weight=1)
|
||||
self.rowconfigure(0, weight=1)
|
||||
frame.columnconfigure(0, weight=1)
|
||||
frame.rowconfigure(0, weight=1)
|
||||
frame.rowconfigure(1, weight=0)
|
||||
|
||||
notebook: ttk.Notebook = nb.Notebook(frame)
|
||||
notebook: nb.Notebook = nb.Notebook(frame)
|
||||
notebook.bind('<<NotebookTabChanged>>', self.tabchanged) # Recompute on tab change
|
||||
|
||||
self.PADX = 10
|
||||
@ -268,16 +277,17 @@ class PreferencesDialog(tk.Toplevel):
|
||||
self.LISTX = 25 # indent listed items
|
||||
self.PADY = 1 # close spacing
|
||||
self.BOXY = 2 # box spacing
|
||||
self.SEPY = 10 # seperator line spacing
|
||||
self.SEPY = 10 # separator line spacing
|
||||
|
||||
# Set up different tabs
|
||||
self.__setup_output_tab(notebook)
|
||||
self.__setup_plugin_tabs(notebook)
|
||||
self.__setup_config_tab(notebook)
|
||||
self.__setup_privacy_tab(notebook)
|
||||
self.__setup_appearance_tab(notebook)
|
||||
self.__setup_output_tab(notebook)
|
||||
self.__setup_privacy_tab(notebook)
|
||||
self.__setup_plugin_tab(notebook)
|
||||
self.__setup_plugin_tabs(notebook)
|
||||
|
||||
# Set up the button frame
|
||||
buttonframe = ttk.Frame(frame)
|
||||
buttonframe.grid(padx=self.PADX, pady=self.PADX, sticky=tk.NSEW)
|
||||
buttonframe.columnconfigure(0, weight=1)
|
||||
@ -298,7 +308,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
|
||||
# wait for window to appear on screen before calling grab_set
|
||||
self.parent.update_idletasks()
|
||||
self.parent.wm_attributes('-topmost', 0) # needed for dialog to appear ontop of parent on Linux
|
||||
self.parent.wm_attributes('-topmost', 0) # needed for dialog to appear on top of parent on Linux
|
||||
self.wait_visibility()
|
||||
self.grab_set()
|
||||
|
||||
@ -316,6 +326,12 @@ class PreferencesDialog(tk.Toplevel):
|
||||
# Set Log Directory
|
||||
self.logfile_loc = pathlib.Path(tempfile.gettempdir()) / appname
|
||||
|
||||
# Set minimum size to prevent content cut-off
|
||||
self.update_idletasks() # Update "requested size" from geometry manager
|
||||
min_width = self.winfo_reqwidth()
|
||||
min_height = self.winfo_reqheight()
|
||||
self.wm_minsize(min_width, min_height)
|
||||
|
||||
def __setup_output_tab(self, root_notebook: ttk.Notebook) -> None:
|
||||
output_frame = nb.Frame(root_notebook)
|
||||
output_frame.columnconfigure(0, weight=1)
|
||||
@ -927,7 +943,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
).grid(column=1, padx=self.PADX, pady=self.PADY, sticky=tk.N, row=cur_row)
|
||||
|
||||
enabled_plugins = list(filter(lambda x: x.folder and x.module, plug.PLUGINS))
|
||||
if len(enabled_plugins):
|
||||
if enabled_plugins:
|
||||
ttk.Separator(plugins_frame, orient=tk.HORIZONTAL).grid(
|
||||
columnspan=3, padx=self.PADX, pady=self.SEPY, sticky=tk.EW, row=row.get()
|
||||
)
|
||||
@ -949,7 +965,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
############################################################
|
||||
# Show which plugins don't have Python 3.x support
|
||||
############################################################
|
||||
if len(plug.PLUGINS_not_py3):
|
||||
if plug.PLUGINS_not_py3:
|
||||
ttk.Separator(plugins_frame, orient=tk.HORIZONTAL).grid(
|
||||
columnspan=3, padx=self.PADX, pady=self.SEPY, sticky=tk.EW, row=row.get()
|
||||
)
|
||||
@ -975,7 +991,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
# Show disabled plugins
|
||||
############################################################
|
||||
disabled_plugins = list(filter(lambda x: x.folder and not x.module, plug.PLUGINS))
|
||||
if len(disabled_plugins):
|
||||
if disabled_plugins:
|
||||
ttk.Separator(plugins_frame, orient=tk.HORIZONTAL).grid(
|
||||
columnspan=3, padx=self.PADX, pady=self.SEPY, sticky=tk.EW, row=row.get()
|
||||
)
|
||||
@ -992,7 +1008,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
############################################################
|
||||
# Show plugins that failed to load
|
||||
############################################################
|
||||
if len(plug.PLUGINS_broken):
|
||||
if plug.PLUGINS_broken:
|
||||
ttk.Separator(plugins_frame, orient=tk.HORIZONTAL).grid(
|
||||
columnspan=3, padx=self.PADX, pady=self.SEPY, sticky=tk.EW, row=row.get()
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user