1
0
forked from drath/libratbag

device: export the full path to the SVG as well

Exporting just the filename requires the caller to know where that file sits.
That's useful for things like e.g. icons where callers may several sets to
chose from but here most callers will just use the default svg provided by
libratbag.

Export that, so that we don't have build-time dependencies in the callers just
for that single path.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2016-03-04 08:30:10 +10:00
parent 18a0be561f
commit 212ab08c15
3 changed files with 38 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ class RatbagdDevice(_RatbagdDBus):
self._devnode = self.dbus_property("Id")
self._description = self.dbus_property("Description")
self._svg = self.dbus_property("Svg")
self._svg_path = self.dbus_property("SvgPath")
self._profiles = []
self._active_profile = -1
@@ -125,6 +126,14 @@ class RatbagdDevice(_RatbagdDBus):
"""
return self._svg
@property
def svg_path(self):
"""
The absolute SVG path. This function returns the full path to the
svg file.
"""
return self._svg_path
@property
def id(self):
"""