mirror of
https://github.com/libratbag/piper.git
synced 2026-05-19 12:26:00 -04:00
ratbagd.py: sync with libratbag
This commit is contained in:
@@ -246,9 +246,9 @@ class Ratbagd(_RatbagdDBus):
|
||||
|
||||
__gsignals__ = {
|
||||
"device-added":
|
||||
(GObject.SIGNAL_RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)),
|
||||
(GObject.SignalFlags.RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)),
|
||||
"device-removed":
|
||||
(GObject.SIGNAL_RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)),
|
||||
(GObject.SignalFlags.RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)),
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
@@ -313,7 +313,7 @@ class RatbagdDevice(_RatbagdDBus):
|
||||
|
||||
__gsignals__ = {
|
||||
"active-profile-changed":
|
||||
(GObject.SIGNAL_RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)),
|
||||
(GObject.SignalFlags.RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)),
|
||||
}
|
||||
|
||||
def __init__(self, object_path):
|
||||
@@ -411,15 +411,15 @@ class RatbagdProfile(_RatbagdDBus):
|
||||
|
||||
# FIXME: if we start adding and removing objects from any of these
|
||||
# lists, things will break!
|
||||
result = self._get_dbus_property("Resolutions")
|
||||
result = self._get_dbus_property("Resolutions") or []
|
||||
self._resolutions = [RatbagdResolution(objpath) for objpath in result]
|
||||
self._subscribe_dirty(self._resolutions)
|
||||
|
||||
result = self._get_dbus_property("Buttons")
|
||||
result = self._get_dbus_property("Buttons") or []
|
||||
self._buttons = [RatbagdButton(objpath) for objpath in result]
|
||||
self._subscribe_dirty(self._buttons)
|
||||
|
||||
result = self._get_dbus_property("Leds")
|
||||
result = self._get_dbus_property("Leds") or []
|
||||
self._leds = [RatbagdLed(objpath) for objpath in result]
|
||||
self._subscribe_dirty(self._leds)
|
||||
|
||||
@@ -450,7 +450,7 @@ class RatbagdProfile(_RatbagdDBus):
|
||||
"""
|
||||
return self._get_dbus_property("Capabilities")
|
||||
|
||||
@GObject.property
|
||||
@GObject.Property
|
||||
def name(self):
|
||||
"""The name of the profile"""
|
||||
return self._get_dbus_property("Name")
|
||||
@@ -820,7 +820,7 @@ class RatbagdMacro(GObject.Object):
|
||||
}
|
||||
|
||||
__gsignals__ = {
|
||||
'macro-set': (GObject.SIGNAL_RUN_FIRST, None, ()),
|
||||
'macro-set': (GObject.SignalFlags.RUN_FIRST, None, ()),
|
||||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user