From 16adecb9bf87f8f789ba6c46acb48dea69f37626 Mon Sep 17 00:00:00 2001 From: SEMU Admin <28569967+semuadmin@users.noreply.github.com> Date: Sun, 18 Jan 2026 08:25:31 +0000 Subject: [PATCH] minor black reformatting streamline set_layout weights add screengeom to config add CTRL-U update binding minor UI tweaks minor UI tweaks --- README.md | 4 +- RELEASE_NOTES.md | 4 + src/pygpsclient/_version.py | 2 +- src/pygpsclient/about_dialog.py | 97 +++++---- src/pygpsclient/app.py | 251 +++++++++++++++--------- src/pygpsclient/configuration.py | 3 +- src/pygpsclient/dynamic_config_frame.py | 2 +- src/pygpsclient/file_handler.py | 2 +- src/pygpsclient/globals.py | 1 + src/pygpsclient/hardware_info_frame.py | 2 +- src/pygpsclient/helpers.py | 48 +++++ src/pygpsclient/levelsview_frame.py | 2 +- src/pygpsclient/nmea_preset_frame.py | 2 +- src/pygpsclient/recorder_dialog.py | 2 +- src/pygpsclient/rover_frame.py | 2 +- src/pygpsclient/settings_dialog.py | 4 +- src/pygpsclient/settings_frame.py | 3 +- src/pygpsclient/signalsview_frame.py | 2 +- src/pygpsclient/skyview_frame.py | 2 +- src/pygpsclient/spartn_gnss_frame.py | 4 +- src/pygpsclient/spectrum_frame.py | 2 +- src/pygpsclient/strings.py | 6 +- src/pygpsclient/ubx_cfgval_frame.py | 4 +- src/pygpsclient/ubx_config_dialog.py | 2 +- src/pygpsclient/ubx_msgrate_frame.py | 2 +- src/pygpsclient/ubx_port_frame.py | 2 +- src/pygpsclient/ubx_preset_frame.py | 2 +- src/pygpsclient/ubx_solrate_frame.py | 2 +- tests/test_static.py | 2 +- 29 files changed, 290 insertions(+), 173 deletions(-) diff --git a/README.md b/README.md index d4dff19..6f6c3a8 100644 --- a/README.md +++ b/README.md @@ -144,13 +144,13 @@ For more comprehensive installation instructions, please refer to [INSTALLATION. #### Saving and loading configuration settings -- Configuration settings for PyGPSClient can be saved and recalled via the Menu..File..Save Configuration and Menu..File..Load Configuration options. By default, PyGPSClient will look for a file named `pygpsclient.json` in the user's home directory. Certain configuration settings require manual editing e.g. custom preset UBX, NMEA and TTY commands and tag colour schemes - see details below. +- Configuration settings for PyGPSClient can be saved and recalled via the Menu..File..Save/Load Configuration options. By default, PyGPSClient will look for a file named `pygpsclient.json` in the user's home directory. Certain configuration settings require manual editing e.g. custom preset UBX, NMEA and TTY commands and tag colour schemes - see details below. - It is recommended to re-save the configuration settings after each PyGPSClient version update, or if you see the warning "Consider re-saving" on startup. - PyGPSClient will prompt you to stop all running input and output streams before loading a new configuration. #### Toplevel ('pop-up') dialog setting -- The behaviour of Toplevel ('pop-up') dialogs will depend on the screen resolution. If the width or height of a Toplevel dialog exceeds the screen resolution, the dialog will be displayed in a scrollable, resizeable window. Otherwise, the dialog is displayed as a fixed, non-resizeable panel. +- The behaviour of Toplevel ('pop-up') dialogs will depend on the screen resolution and 'transient' setting. If the width or height of a Toplevel dialog exceeds the screen resolution, the dialog will be displayed in a scrollable, resizeable window. Otherwise, the dialog is displayed as a fixed, non-resizeable panel. - A boolean configuration setting `transient_dialog_b` governs whether Toplevel dialogs are 'transient' (i.e. always on top of main application dialog) or not. Changing this setting to `0` allows Toplevel dialogs to be minimised independently of the main application window, but be mindful that some dialogs may end up hidden behind others e.g. "Open file/folder" dialogs. **If a file open button appears unresponsive, check that the "Open file/folder" panel isn't already open but obscured**. - If you're accessing the desktop via a VNC session (e.g. to a headless Raspberry Pi) it is recommended to keep the setting at the default `1`, as VNC may not recognise keystrokes on overlaid non-transient windows. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d596d9e..672a030 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,9 @@ # PyGPSClient Release Notes +### RELEASE 1.6.1 + +1. Updates to main application window geometry (size and position) handling. Current window geometry is now saved to json configuration file as `screengeom_s` (e.g. `"1373x798+71+44"`), and will be restored on restart. Default startup geometry is centered at 75% of screen resolution. + ### RELEASE 1.6.0 FIXES: diff --git a/src/pygpsclient/_version.py b/src/pygpsclient/_version.py index 376e36f..ffa05fa 100644 --- a/src/pygpsclient/_version.py +++ b/src/pygpsclient/_version.py @@ -8,4 +8,4 @@ :license: BSD 3-Clause """ -__version__ = "1.6.0" +__version__ = "1.6.1" diff --git a/src/pygpsclient/about_dialog.py b/src/pygpsclient/about_dialog.py index 1c36d47..44d8ec8 100644 --- a/src/pygpsclient/about_dialog.py +++ b/src/pygpsclient/about_dialog.py @@ -11,20 +11,12 @@ """ import logging -from platform import python_version +from platform import machine, python_version from tkinter import Button, Checkbutton, Frame, IntVar, Label, Tcl from webbrowser import open_new_tab from PIL import Image, ImageTk -from pygnssutils import version as PGVERSION -from pynmeagps import version as NMEAVERSION -from pyqgc import version as QGCVERSION -from pyrtcm import version as RTCMVERSION -from pysbf2 import version as SBFVERSION -from pyspartn import version as SPARTNVERSION -from pyubx2 import version as UBXVERSION - -from pygpsclient._version import __version__ as VERSION + from pygpsclient.globals import ( ERRCOL, ICON_APP128, @@ -36,22 +28,22 @@ SPONSOR_URL, TRACEMODE_WRITE, ) -from pygpsclient.helpers import brew_installed, check_latest +from pygpsclient.helpers import LIBVERSIONS, brew_installed, check_for_updates from pygpsclient.sqlite_handler import SQLSTATUS -from pygpsclient.strings import ABOUTTXT, BREWWARN, COPYRIGHT, DLGTABOUT, GITHUB_URL +from pygpsclient.strings import ( + ABOUTTXT, + BREWUPDATE, + BREWWARN, + COPYRIGHT, + DLGTABOUT, + GITHUB_URL, + NA, + UPDATEERR, + UPDATEINPROG, + UPDATERESTART, +) from pygpsclient.toplevel_dialog import ToplevelDialog -LIBVERSIONS = { - "PyGPSClient": VERSION, - "pygnssutils": PGVERSION, - "pyubx2": UBXVERSION, - "pysbf2": SBFVERSION, - "pyqgc": QGCVERSION, - "pynmeagps": NMEAVERSION, - "pyrtcm": RTCMVERSION, - "pyspartn": SPARTNVERSION, -} - class AboutDialog(ToplevelDialog): """ @@ -73,7 +65,6 @@ def __init__(self, app, *args, **kwargs): # pylint: disable=unused-argument self._img_sponsor = ImageTk.PhotoImage(Image.open(ICON_SPONSOR)) self._checkonstartup = IntVar() self._checkonstartup.set(self.__app.configuration.get("checkforupdate_b")) - self._updates = [] super().__init__(app, DLGTABOUT) @@ -102,6 +93,7 @@ def _body(self): self._lbl_python_version = Label( self._frm_body, text=( + f"Arch: {machine()} " f"Python: {python_version()} Tk: {tkv} " f"Spatial: {SQLSTATUS[self.__app.db_enabled]}" ), @@ -118,7 +110,7 @@ def _body(self): ) self._btn_checkupdate = Button( self._frm_body, - text="Check for updates", + text="", width=14, cursor="hand2", ) @@ -175,7 +167,7 @@ def _attach_events(self): Bind events to dialog. """ - self._btn_checkupdate.bind("