mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
tools: return the full svg path for ratbagc get_svg()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
dfeac1bcbc
commit
34fbfe105c
@@ -580,6 +580,7 @@ shared_library(
|
||||
|
||||
|
||||
ratbagc_py_conf = configuration_data()
|
||||
ratbagc_py_conf.set('LIBRATBAG_DATA_DIR', libratbag_data_dir_devel)
|
||||
ratbagc_py = configure_file(input: 'tools/ratbagc.py.in',
|
||||
output: 'ratbagc.py',
|
||||
configuration: ratbagc_py_conf)
|
||||
|
||||
@@ -27,6 +27,7 @@ import sys
|
||||
|
||||
from evdev import ecodes
|
||||
|
||||
LIBRATBAG_DATA_DIR = "@LIBRATBAG_DATA_DIR@"
|
||||
|
||||
# Deferred translations, see https://docs.python.org/3/library/gettext.html#deferred-translations
|
||||
def N_(x):
|
||||
@@ -281,7 +282,7 @@ class RatbagdDevice(metaclass=MetaRatbag):
|
||||
|
||||
@param theme The theme from which to retrieve the SVG, as str
|
||||
"""
|
||||
return os.path.join(theme, libratbag.ratbag_device_get_svg_name(self._device))
|
||||
return os.path.join(LIBRATBAG_DATA_DIR, theme, libratbag.ratbag_device_get_svg_name(self._device))
|
||||
|
||||
def commit(self, callback=None):
|
||||
"""Commits all changes made to the device.
|
||||
|
||||
Reference in New Issue
Block a user