forked from drath/libratbag
ratbagd: drop SvgPath property from device
Obsolete now that we have theme support, use GetSvg() instead Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
0018431f31
commit
19cdf6d7e9
@@ -75,11 +75,6 @@ capabilities.
|
||||
|
||||
The device's SVG file name, without path.
|
||||
|
||||
#### `SvgPath`
|
||||
- type: `s`, read-only, constant
|
||||
|
||||
The device's SVG file name including the absolute path.
|
||||
|
||||
#### `Profiles`
|
||||
- type: `ao`, read-only, mutable
|
||||
|
||||
|
||||
@@ -154,31 +154,6 @@ static int ratbagd_device_get_svg(sd_bus *bus,
|
||||
return sd_bus_message_append(reply, "s", svg);
|
||||
}
|
||||
|
||||
static int ratbagd_device_get_svg_path(sd_bus *bus,
|
||||
const char *path,
|
||||
const char *interface,
|
||||
const char *property,
|
||||
sd_bus_message *reply,
|
||||
void *userdata,
|
||||
sd_bus_error *error)
|
||||
{
|
||||
struct ratbagd_device *device = userdata;
|
||||
char svg_path[PATH_MAX] = {0};
|
||||
const char *svg;
|
||||
|
||||
svg = ratbag_device_get_svg_name(device->lib_device);
|
||||
if (!svg) {
|
||||
log_error("Unable to fetch SVG for %s\n",
|
||||
ratbagd_device_get_name(device));
|
||||
goto out;
|
||||
}
|
||||
|
||||
sprintf(svg_path, "%s/%s", LIBRATBAG_DATA_DIR, svg);
|
||||
|
||||
out:
|
||||
return sd_bus_message_append(reply, "s", svg_path);
|
||||
}
|
||||
|
||||
static int ratbagd_device_get_theme_svg(sd_bus_message *m,
|
||||
void *userdata,
|
||||
sd_bus_error *error)
|
||||
@@ -348,7 +323,6 @@ const sd_bus_vtable ratbagd_device_vtable[] = {
|
||||
SD_BUS_PROPERTY("Capabilities", "au", ratbagd_device_get_capabilities, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||
SD_BUS_PROPERTY("Name", "s", ratbagd_device_get_device_name, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||
SD_BUS_PROPERTY("Svg", "s", ratbagd_device_get_svg, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||
SD_BUS_PROPERTY("SvgPath", "s", ratbagd_device_get_svg_path, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||
SD_BUS_PROPERTY("Profiles", "ao", ratbagd_device_get_profiles, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||
SD_BUS_PROPERTY("ActiveProfile", "u", ratbagd_device_get_active_profile, 0, 0),
|
||||
SD_BUS_METHOD("GetProfileByIndex", "u", "o", ratbagd_device_get_profile_by_index, SD_BUS_VTABLE_UNPRIVILEGED),
|
||||
|
||||
Reference in New Issue
Block a user