Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2023-05-28 17:16:41 +0300
committerwurstsalat <mailtrash@posteo.de>2023-05-28 17:16:55 +0300
commit71f94434be7ce180a8b8150f283dfe16b9c80143 (patch)
tree8d5c011691b992706d83c72754e0926b80cece2a
parentdc0e24693622b8b475fb4cc82866166c1bec50d8 (diff)
fix: Windows themes: Don't fail hard when winsdk UISettings are not available
Fixes #11542
-rw-r--r--gajim/common/winapi/system_style.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gajim/common/winapi/system_style.py b/gajim/common/winapi/system_style.py
index 27c8f1b85..afbdc75d8 100644
--- a/gajim/common/winapi/system_style.py
+++ b/gajim/common/winapi/system_style.py
@@ -35,7 +35,12 @@ class SystemStyleListener:
self._prefer_dark: bool | None = None
self._callback = callback
- self._ui_settings = UISettings()
+ try:
+ self._ui_settings = UISettings()
+ except OSError as err:
+ log.warning('winsdk UISettings not available:%s', err)
+ return
+
self._ui_settings.add_color_values_changed(
self._signal_color_values_changed)
foreground_color = self._ui_settings.get_color_value(