summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-11-21 17:30:54 +0000
committerBastien Nocera <hadess@hadess.net>2011-11-22 18:16:38 +0000
commit2ae2c2002626f2886211ba874d9e42c22f1b6672 (patch)
tree464a98d953d03bf592a0bf222c8a80769876f50d
parenta6d45940f2cc3c860549756fb4e98a83b6c7357e (diff)
downloadgnome-settings-daemon-2ae2c2002626f2886211ba874d9e42c22f1b6672.tar.gz
wacom: Add type to string helper
-rw-r--r--plugins/wacom/gsd-wacom-device.c19
-rw-r--r--plugins/wacom/gsd-wacom-device.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 6ab91878..14243fca 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -456,3 +456,22 @@ gsd_wacom_device_get_device_type (GsdWacomDevice *device)
return device->priv->type;
}
+
+const char *
+gsd_wacom_device_type_to_string (GsdWacomDeviceType type)
+{
+ switch (type) {
+ case WACOM_TYPE_INVALID:
+ return "Invalid";
+ case WACOM_TYPE_STYLUS:
+ return "Stylus";
+ case WACOM_TYPE_ERASER:
+ return "Eraser";
+ case WACOM_TYPE_CURSOR:
+ return "Wacom";
+ case WACOM_TYPE_PAD:
+ return "Pad";
+ default:
+ return "Unknown type";
+ }
+}
diff --git a/plugins/wacom/gsd-wacom-device.h b/plugins/wacom/gsd-wacom-device.h
index 278c2bf3..d21067fd 100644
--- a/plugins/wacom/gsd-wacom-device.h
+++ b/plugins/wacom/gsd-wacom-device.h
@@ -91,6 +91,7 @@ GSettings * gsd_wacom_device_get_settings (GsdWacomDevice *device);
GSettings * gsd_wacom_device_get_tool_settings (GsdWacomDevice *device);
GsdWacomDeviceType gsd_wacom_device_get_device_type (GsdWacomDevice *device);
+const char * gsd_wacom_device_type_to_string (GsdWacomDeviceType type);
G_END_DECLS