summaryrefslogtreecommitdiff
path: root/libdevkit-power/dkp-enum.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-08-22 10:23:43 +0100
committerRichard Hughes <richard@hughsie.com>2008-08-22 10:23:43 +0100
commit15a2a3562537bc2f24dfc07ae811ee6da098f5f8 (patch)
tree906d04c05fe8f6185239acb04426b9decd8b5c6f /libdevkit-power/dkp-enum.c
parenta2ead86ec4723cec39317c5ffb088f4e0c89fd54 (diff)
add a MONITOR type, and make the printing code a little mor sane
Diffstat (limited to 'libdevkit-power/dkp-enum.c')
-rw-r--r--libdevkit-power/dkp-enum.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdevkit-power/dkp-enum.c b/libdevkit-power/dkp-enum.c
index 04b673a..bfb00fa 100644
--- a/libdevkit-power/dkp-enum.c
+++ b/libdevkit-power/dkp-enum.c
@@ -41,6 +41,9 @@ dkp_device_type_to_text (DkpDeviceType type_enum)
case DKP_DEVICE_TYPE_UPS:
type = "ups";
break;
+ case DKP_DEVICE_TYPE_MONITOR:
+ type = "monitor";
+ break;
case DKP_DEVICE_TYPE_MOUSE:
type = "mouse";
break;
@@ -77,6 +80,8 @@ dkp_device_type_from_text (const gchar *type)
return DKP_DEVICE_TYPE_BATTERY;
if (strcmp (type, "ups") == 0)
return DKP_DEVICE_TYPE_UPS;
+ if (strcmp (type, "monitor") == 0)
+ return DKP_DEVICE_TYPE_MONITOR;
if (strcmp (type, "mouse") == 0)
return DKP_DEVICE_TYPE_MOUSE;
if (strcmp (type, "keyboard") == 0)