From 3e66aeb9e13c9ac0ccbdb424dcb4f72449bd7bc7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 20 Aug 2018 12:55:34 +1000 Subject: [PATCH] ratbagd.py: sync with libratbag --- piper/ratbagd.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/piper/ratbagd.py b/piper/ratbagd.py index d686452..611e3ae 100644 --- a/piper/ratbagd.py +++ b/piper/ratbagd.py @@ -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):