Philipp Hörist pushed to branch master at gajim / gajim


Commits:
40b7d1a1 by Philipp Hörist at 2026-07-26T20:31:09+02:00
refactor: SystemStyle: Port to ReadOne() call

Read() is deprecated

- - - - -


1 changed file:

- gajim/common/dbus/system_style.py


Changes:

=====================================
gajim/common/dbus/system_style.py
=====================================
@@ -38,7 +38,7 @@ def __init__(self, callback: Callable[..., None]) -> None:
                 None,
             )
         except GLib.Error as error:
-            log.info("Settings portal not found: %s", error)
+            log.warning("Settings portal not found: %s", error)
             return
 
         self.dbus_proxy.connect("g-signal", self._signal_setting_changed)
@@ -47,16 +47,19 @@ def __init__(self, callback: Callable[..., None]) -> None:
     def read_color_scheme(self) -> None:
         try:
             result = self.dbus_proxy.call_sync(
-                "Read",
+                "ReadOne",
                 GLib.Variant("(ss)", ("org.freedesktop.appearance", 
"color-scheme")),
                 Gio.DBusCallFlags.NO_AUTO_START,
-                -1,
+                500,
                 None,
             )
-            self._prefer_dark = result[0] == 1
         except GLib.Error as error:
             log.error("Couldn’t read the color-scheme setting: %s", 
error.message)
-            return
+
+        else:
+            value = result[0] == 1
+            self._prefer_dark = value
+            log.info("Current color-scheme: %s", value)
 
     def _signal_setting_changed(
         self,



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/40b7d1a1f524d6f95fa907db385befeddc7209cc

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/40b7d1a1f524d6f95fa907db385befeddc7209cc
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to