Skip to content

Commit

Permalink
Merge branch 'develop' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixxan committed May 28, 2024
2 parents 1ecc460 + bc2adfa commit 03556b0
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 25 deletions.
14 changes: 13 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion EDMarketConnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def open_window(systray: 'SysTrayIcon') -> None:
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':
Expand Down
3 changes: 3 additions & 0 deletions L10n/en.template
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# <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'

Expand Down
60 changes: 38 additions & 22 deletions prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -242,42 +246,48 @@ def __init__(self, parent: tk.Tk, callback: Optional[Callable]):
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
self.BUTTONX = 12 # indent Checkbuttons and Radiobuttons
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)
Expand All @@ -298,7 +308,7 @@ def __init__(self, parent: tk.Tk, callback: Optional[Callable]):

# 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()

Expand All @@ -316,6 +326,12 @@ def __init__(self, parent: tk.Tk, callback: Optional[Callable]):
# 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)
Expand Down Expand Up @@ -927,7 +943,7 @@ def __setup_plugin_tab(self, notebook: ttk.Notebook) -> None: # noqa: CCR001
).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()
)
Expand All @@ -949,7 +965,7 @@ def __setup_plugin_tab(self, notebook: ttk.Notebook) -> None: # noqa: CCR001
############################################################
# 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()
)
Expand All @@ -975,7 +991,7 @@ def __setup_plugin_tab(self, notebook: ttk.Notebook) -> None: # noqa: CCR001
# 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()
)
Expand All @@ -992,7 +1008,7 @@ def __setup_plugin_tab(self, notebook: ttk.Notebook) -> None: # noqa: CCR001
############################################################
# 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()
)
Expand Down

0 comments on commit 03556b0

Please sign in to comment.