From c2130884dedd29cc3adbe109c9956383bf3690e8 Mon Sep 17 00:00:00 2001 From: aryoda <11374410+aryoda@users.noreply.github.com> Date: Mon, 17 Oct 2022 22:46:13 +0200 Subject: [PATCH 1/2] Fixes 1244 (KDE/Wayland: Wrong icon in taskbar (default Wayland instead of BiT) --- qt/qttools.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qt/qttools.py b/qt/qttools.py index 4b3f15d85..9f2370ada 100644 --- a/qt/qttools.py +++ b/qt/qttools.py @@ -18,6 +18,7 @@ import os import sys import gettext + from PyQt5.QtGui import (QFont, QColor, QKeySequence) from PyQt5.QtCore import (QDir, Qt, pyqtSlot, pyqtSignal, QModelIndex, QTranslator, QLocale, QLibraryInfo, QEvent, @@ -30,6 +31,7 @@ from calendar import monthrange from packaging.version import Version + _ = gettext.gettext def backintimePath(*path): @@ -45,6 +47,8 @@ def registerBackintimePath(*path): registerBackintimePath('common') import snapshots +import tools +import logger def fontBold(font): font.setWeight(QFont.Bold) @@ -161,6 +165,17 @@ def createQApplication(app_name = 'Back In Time'): QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) qapp = QApplication(sys.argv) qapp.setApplicationName(app_name) + try: + if tools.isRoot(): + logger.debug("Trying to set App ID for root user") + qapp.setDesktopFileName("backintime-qt-root") + else: + logger.debug("Trying to set App ID for non-privileged user") + qapp.setDesktopFileName("backintime-qt") + except Exception as e: + logger.warning("Could not set App ID (required for Wayland App icon and more)") + logger.warning("Reason: " + repr(e)) + qapp.setDesktopFileName("backintime-qt") if os.geteuid() == 0 and \ qapp.style().objectName().lower() == 'windows' and \ 'GTK+' in QStyleFactory.keys(): From ac86af3d35dcdac3a5ef9e0492aa5325f4466e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCker?= Date: Fri, 21 Oct 2022 23:03:21 +0200 Subject: [PATCH 2/2] Update CHANGES --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index 3e3c82ec8..196a1e142 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ Upcoming Release * Bugfix: AttributeError in "Diff Options" dialog (#898) * Bugfix: Settings GUI: "Save password to Keyring" was disabled due to "no appropriate keyring found" (#1321) * Bugfix: Avoid logging errors while waiting for a target drive to be mounted (#1142, #1143, #1328) +* Bugfix: Wrong systray icon showing in Wayland (#1244) * Documentation update: correct description of profile.schedule.time in backintime-config manpage (#1270) * Translation update: Brazilian Portuguese (#1267) * Translation update: Italian (#1110, #1123)