mirror of
https://github.com/libratbag/piper.git
synced 2026-05-19 12:26:00 -04:00
ratbagd.py: listen and notify about RatabgdProfile.Disabled changes
This commit is contained in:
@@ -443,6 +443,7 @@ class RatbagdProfile(_RatbagdDBus):
|
||||
self._angle_snapping = self._get_dbus_property("AngleSnapping")
|
||||
self._debounce = self._get_dbus_property("Debounce")
|
||||
self._dirty = self._get_dbus_property("IsDirty")
|
||||
self._disabled = self._get_dbus_property("Disabled")
|
||||
self._report_rate = self._get_dbus_property("ReportRate")
|
||||
|
||||
# FIXME: if we start adding and removing objects from any of these
|
||||
@@ -489,6 +490,16 @@ class RatbagdProfile(_RatbagdDBus):
|
||||
self._debounce = debounce
|
||||
self.notify("debounce")
|
||||
|
||||
try:
|
||||
disabled = changed_props["Disabled"]
|
||||
except KeyError:
|
||||
# Different property changed, skip.
|
||||
pass
|
||||
else:
|
||||
if disabled != self._disabled:
|
||||
self._disabled = disabled
|
||||
self.notify("disabled")
|
||||
|
||||
try:
|
||||
active = changed_props["IsActive"]
|
||||
except KeyError:
|
||||
@@ -554,7 +565,7 @@ class RatbagdProfile(_RatbagdDBus):
|
||||
@GObject.Property
|
||||
def disabled(self):
|
||||
"""tells if the profile is disabled."""
|
||||
return self._get_dbus_property("Disabled")
|
||||
return self._disabled
|
||||
|
||||
@disabled.setter
|
||||
def disabled(self, disabled):
|
||||
|
||||
Reference in New Issue
Block a user