diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e5c7c5..a2ae4fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- [24-10-27-2] Allow BandMap, CheckWindow and LogWindow to undock from main window while using Wayland if PyQt6 version is at least 6.7.1 - [24-10-27-1] Fixed setting radios ssb mode when crossing 10M boundary. - [24-10-27] Fix bug where a contacts info could be carried over to new contact if no new value was written. - [24-10-26] Clear inputs when seeking to a call from the bandmap via the arrow up and down. Fixed bandmap crash from bad telnet data. Drop beacons from bandmap. diff --git a/README.md b/README.md index 6698f09..ead32d6 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's. ## Recent Changes (Polishing the Turd) +- [24-10-27-2] Allow BandMap, CheckWindow and LogWindow to undock from main window while using Wayland if PyQt6 version is at least 6.7.1 - [24-10-27-1] Fixed setting radios ssb mode when crossing 10M boundary. - [24-10-27] Fix bug where a contacts info could be carried over to new contact if no new value was written. - [24-10-26] Clear inputs when seeking to a call from the bandmap via the arrow up and down. Fixed bandmap crash from bad telnet data. Drop beacons from bandmap. diff --git a/not1mm/__main__.py b/not1mm/__main__.py index 79ba56c..cc974a4 100644 --- a/not1mm/__main__.py +++ b/not1mm/__main__.py @@ -37,6 +37,7 @@ from PyQt6.QtCore import QDir, Qt, QThread, QSettings, QCoreApplication from PyQt6.QtGui import QFontDatabase, QColorConstants, QPalette, QColor, QPixmap from PyQt6.QtWidgets import QFileDialog, QSplashScreen, QApplication +from PyQt6.QtCore import QT_VERSION_STR, PYQT_VERSION_STR from not1mm.lib.about import About from not1mm.lib.cwinterface import CW @@ -589,7 +590,21 @@ def __init__(self, splash): self.voice_process.current_op = self.current_op self.make_op_dir() - # Featureset for wayland + logger.debug(f"{QT_VERSION_STR=} {PYQT_VERSION_STR=}") + x = PYQT_VERSION_STR.split(".") + old_Qt = True + # test if pyqt version is at least 6.7.1 + if len(x) == 1: + if int(x[0]) > 6: + old_Qt = False + elif len(x) == 2: + if int(x[0]) >= 6 and int(x[1]) > 7: + old_Qt = False + elif len(x) == 3: + if int(x[0]) >= 6 and int(x[1]) >= 7 and int(x[2]) >= 1: + old_Qt = False + + # Featureset for wayland if pyqt is older that 6.7.1 dockfeatures = ( QtWidgets.QDockWidget.DockWidgetFeature.DockWidgetClosable | QtWidgets.QDockWidget.DockWidgetFeature.DockWidgetMovable @@ -598,7 +613,7 @@ def __init__(self, splash): self.show_splash_msg("Setting up BandMapWindow.") self.bandmap_window = BandMapWindow() self.bandmap_window.setObjectName("bandmap-window") - if os.environ.get("WAYLAND_DISPLAY"): + if os.environ.get("WAYLAND_DISPLAY") and old_Qt is True: self.bandmap_window.setFeatures(dockfeatures) self.addDockWidget(Qt.DockWidgetArea.LeftDockWidgetArea, self.bandmap_window) self.bandmap_window.hide() @@ -609,7 +624,7 @@ def __init__(self, splash): self.show_splash_msg("Setting up CheckWindow.") self.check_window = CheckWindow() self.check_window.setObjectName("check-window") - if os.environ.get("WAYLAND_DISPLAY"): + if os.environ.get("WAYLAND_DISPLAY") and old_Qt is True: self.check_window.setFeatures(dockfeatures) self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.check_window) self.check_window.hide() @@ -618,7 +633,7 @@ def __init__(self, splash): self.show_splash_msg("Setting up VFOWindow.") self.vfo_window = VfoWindow() self.vfo_window.setObjectName("vfo-window") - if os.environ.get("WAYLAND_DISPLAY"): + if os.environ.get("WAYLAND_DISPLAY") and old_Qt is True: self.vfo_window.setFeatures(dockfeatures) self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.vfo_window) self.vfo_window.hide() @@ -626,7 +641,7 @@ def __init__(self, splash): self.show_splash_msg("Setting up LogWindow.") self.log_window = LogWindow() self.log_window.setObjectName("log-window") - if os.environ.get("WAYLAND_DISPLAY"): + if os.environ.get("WAYLAND_DISPLAY") and old_Qt is True: self.log_window.setFeatures(dockfeatures) self.addDockWidget(Qt.DockWidgetArea.TopDockWidgetArea, self.log_window) self.log_window.hide() diff --git a/not1mm/lib/version.py b/not1mm/lib/version.py index 9ed8c6a..752176a 100644 --- a/not1mm/lib/version.py +++ b/not1mm/lib/version.py @@ -1,3 +1,3 @@ """It's the version""" -__version__ = "24.10.27.1" +__version__ = "24.10.27.2" diff --git a/pyproject.toml b/pyproject.toml index a11ff6f..e30a802 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "not1mm" -version = "24.10.27.1" +version = "24.10.27.2" description = "NOT1MM Logger" readme = "README.md" requires-python = ">=3.9"