mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-22 21:38:19 +02:00
Add UP_DEVICE_KIND_COMPUTER as we'll need UP_DEVICE_KIND_TABLET for wacom tablets
This commit is contained in:
parent
6bb6602c06
commit
34add0cfe2
3 changed files with 5 additions and 1 deletions
|
|
@ -79,6 +79,9 @@ up_device_kind_to_string (UpDeviceKind type_enum)
|
|||
case UP_DEVICE_KIND_TABLET:
|
||||
type = "tablet";
|
||||
break;
|
||||
case UP_DEVICE_KIND_COMPUTER:
|
||||
type = "computer";
|
||||
break;
|
||||
default:
|
||||
type = "unknown";
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ typedef enum {
|
|||
UP_DEVICE_KIND_PHONE,
|
||||
UP_DEVICE_KIND_MEDIA_PLAYER,
|
||||
UP_DEVICE_KIND_TABLET,
|
||||
UP_DEVICE_KIND_COMPUTER,
|
||||
UP_DEVICE_KIND_LAST
|
||||
} UpDeviceKind;
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ up_device_idevice_coldplug (UpDevice *device)
|
|||
model = g_udev_device_get_property (native, "ID_MODEL");
|
||||
kind = UP_DEVICE_KIND_PHONE;
|
||||
if (model != NULL && g_strstr_len (model, -1, "iPad")) {
|
||||
kind = UP_DEVICE_KIND_TABLET;
|
||||
kind = UP_DEVICE_KIND_COMPUTER;
|
||||
} else if (model != NULL && g_strstr_len (model, -1, "iPod")) {
|
||||
kind = UP_DEVICE_KIND_MEDIA_PLAYER;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue