forked from drath/libratbag
Move the set-default-profile capability into the profiles
Theoretical case is where some profiles cannot be set to be the default, but realistically: this is a profile-specific attribute so let's move the flag there. Arguably, the DBus API should not expose SetDefault() where not available, but that's a separate issue. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -262,7 +262,6 @@ def print_device(d, level):
|
||||
RatbagdDevice.CAP_PROFILE_SWITCHABLE: "switchable-profile",
|
||||
RatbagdDevice.CAP_BUTTON_KEY: "button-keys",
|
||||
RatbagdDevice.CAP_BUTTON_MACROS: "button-macros",
|
||||
RatbagdDevice.CAP_PROFILE_DEFAULT: "default-profile",
|
||||
RatbagdDevice.CAP_QUERY_CONFIGURATION: "query-configuration",
|
||||
RatbagdDevice.CAP_PROFILE_DISABLE: "disable-profile",
|
||||
RatbagdDevice.CAP_LED: "led"}
|
||||
|
||||
@@ -324,7 +324,6 @@ class RatbagdDevice(_RatbagdDBus):
|
||||
CAP_PROFILE = 200
|
||||
CAP_PROFILE_SWITCHABLE = 201
|
||||
CAP_PROFILE_DISABLE = 202
|
||||
CAP_PROFILE_DEFAULT = 203
|
||||
CAP_BUTTON = 300
|
||||
CAP_BUTTON_KEY = 301
|
||||
CAP_BUTTON_MACROS = 302
|
||||
@@ -424,6 +423,7 @@ class RatbagdProfile(_RatbagdDBus):
|
||||
"""Represents a ratbagd profile."""
|
||||
|
||||
CAP_WRITABLE_NAME = 100
|
||||
CAP_SET_DEFAULT = 101
|
||||
|
||||
def __init__(self, object_path):
|
||||
_RatbagdDBus.__init__(self, "Profile", object_path)
|
||||
|
||||
Reference in New Issue
Block a user