mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 04:20:04 +01:00
up-device-list: Introduce the UpDeviceKbdBacklight object
This commit makes UpDeviceList store the UpDeviceKbdBacklight objects and sets the udev native path property of UpDevice and UpDeviceKbdBacklight.
This commit is contained in:
parent
aaf52de8dc
commit
9f9b8478bd
1 changed files with 5 additions and 1 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include "up-native.h"
|
||||
#include "up-device-list.h"
|
||||
#include "up-device.h"
|
||||
#include "up-device-kbd-backlight.h"
|
||||
|
||||
static void up_device_list_finalize (GObject *object);
|
||||
|
||||
|
|
@ -80,7 +81,10 @@ up_device_list_insert (UpDeviceList *list, gpointer device)
|
|||
g_return_val_if_fail (UP_IS_DEVICE_LIST (list), FALSE);
|
||||
g_return_val_if_fail (device != NULL, FALSE);
|
||||
|
||||
native = up_device_get_native (UP_DEVICE (device));
|
||||
if (UP_IS_DEVICE_KBD_BACKLIGHT (device))
|
||||
native = up_device_kbd_backlight_get_native (UP_DEVICE_KBD_BACKLIGHT (device));
|
||||
else
|
||||
native = up_device_get_native (UP_DEVICE (device));
|
||||
g_return_val_if_fail (native != NULL, FALSE);
|
||||
|
||||
native_path = up_native_get_native_path (native);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue