mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
tools: add a noop notify() function to all our classes
ratbagd uses GObjects and properties so we also make use of notify() a fair bit. Make sure we don't crash out in ratbagc for that, just add an empty noop function named notify() Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
8c32036e03
commit
653b834e01
@@ -51,6 +51,10 @@ class MetaRatbag(type):
|
||||
c = type.__new__(cls, name, bases, dct)
|
||||
if "__late_init__" in dct:
|
||||
c.__late_init__()
|
||||
|
||||
# Add a noop self.notify() so we're compatible with GObjects
|
||||
c.notify = lambda *args : None
|
||||
|
||||
return c
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user