hplip/hplip-3.22.4-ui5-systray-hide-when-inactive.patch

27 lines
1.1 KiB
Diff

diff -Nru hplip-3.22.4/ui5/ui_utils.py hplip-3.22.4.patched/ui5/ui_utils.py
--- hplip-3.22.4/ui5/ui_utils.py 2022-04-26 06:17:00.000000000 +0200
+++ hplip-3.22.4.patched/ui5/ui_utils.py 2022-06-20 10:08:24.597882779 +0200
@@ -173,7 +173,7 @@
else:
QSettings.__init__(self, os.path.join(prop.user_dir, 'hplip.conf'), QSettings.IniFormat)
- self.systray_visible = SYSTRAY_VISIBLE_SHOW_ALWAYS
+ self.systray_visible = SYSTRAY_VISIBLE_HIDE_WHEN_INACTIVE
self.systray_messages = SYSTRAY_MESSAGES_SHOW_ALL
self.last_used_device_uri = ''
self.last_used_printer = ''
@@ -214,8 +214,11 @@
self.sync()
self.beginGroup("settings")
- self.systray_visible = value_int(self.value("systray_visible"))[0]
-
+ if self.value("systray_visible") is not None:
+ self.systray_visible = value_int(self.value("systray_visible"))[0]
+ else:
+ self.systray_visible = SYSTRAY_VISIBLE_HIDE_WHEN_INACTIVE
+
self.systray_messages = value_int(self.value("systray_messages"))[0]
self.endGroup()