mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
device: use "Name" instead of "Description"
This is the terminology used in libratbag as well (and everywhere else where we deal with input devices). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -34,7 +34,7 @@ import argparse
|
||||
|
||||
def list_devices(r, args):
|
||||
for d in r.devices:
|
||||
print("{:10s} {:32s}".format(d.id + ":", d.description))
|
||||
print("{:10s} {:32s}".format(d.id + ":", d.name))
|
||||
|
||||
def find_device(r, args):
|
||||
dev = None
|
||||
@@ -85,7 +85,7 @@ def show_device(r, args):
|
||||
RatbagdDevice.CAP_DEFAULT_PROFILE : "default-profile" }
|
||||
capabilities = [caps[c] for c in d.capabilities]
|
||||
|
||||
print("{} - {}".format(d.id, d.description))
|
||||
print("{} - {}".format(d.id, d.name))
|
||||
print(" SVG: {}".format(d.svg))
|
||||
print(" Capabilities: {}".format(", ".join(capabilities)))
|
||||
print("Number of Profiles: {}".format(len(d.profiles)))
|
||||
@@ -99,7 +99,7 @@ def show_device(r, args):
|
||||
def show_profile(r, args):
|
||||
p, d = find_profile(r, args)
|
||||
|
||||
print("Profile {} on {} ({})".format(args.profile, d.id, d.description))
|
||||
print("Profile {} on {} ({})".format(args.profile, d.id, d.name))
|
||||
print(" Number of Buttons: {}".format(len(p.buttons)))
|
||||
print("Number of Resolutions: {}".format(len(p.resolutions)))
|
||||
active, default = -1, -1
|
||||
@@ -118,7 +118,7 @@ def show_resolution(r, args):
|
||||
print("Resolution {} on Profile {} on {} ({})".format(args.resolution,
|
||||
args.profile,
|
||||
d.id,
|
||||
d.description))
|
||||
d.name))
|
||||
print(" Report Rate: {}Hz".format(r.report_rate))
|
||||
if RatbagdResolution.CAP_SEPARATE_XY_RESOLUTION in r.capabilities:
|
||||
print(" Resolution: {}x{}dpi".format(*r.resolution))
|
||||
@@ -137,7 +137,7 @@ def show_button(r, args):
|
||||
print("Button {} on Profile {} on {} ({})".format(args.button,
|
||||
args.profile,
|
||||
d.id,
|
||||
d.description))
|
||||
d.name))
|
||||
|
||||
print(" Type: {}".format(b.button_type))
|
||||
print(" Action Type: {}".format(b.action_type))
|
||||
|
||||
@@ -88,7 +88,7 @@ class RatbagdDevice(_RatbagdDBus):
|
||||
def __init__(self, object_path):
|
||||
_RatbagdDBus.__init__(self, "Device", object_path)
|
||||
self._devnode = self.dbus_property("Id")
|
||||
self._description = self.dbus_property("Description")
|
||||
self._name = self.dbus_property("Name")
|
||||
self._svg = self.dbus_property("Svg")
|
||||
self._svg_path = self.dbus_property("SvgPath")
|
||||
|
||||
@@ -109,11 +109,11 @@ class RatbagdDevice(_RatbagdDBus):
|
||||
return self._profiles
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
def name(self):
|
||||
"""
|
||||
The device name, usually provided by the kernel.
|
||||
"""
|
||||
return self._description
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def svg(self):
|
||||
|
||||
Reference in New Issue
Block a user