[gnome-settings-daemon] wacom: Add icon-name property to tablets
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Add icon-name property to tablets
- Date: Fri, 25 Nov 2011 14:12:17 +0000 (UTC)
commit 51c9edd6a6fc2d152ea350621c0728606e9cfd1d
Author: Bastien Nocera <hadess hadess net>
Date: Fri Nov 25 14:06:34 2011 +0000
wacom: Add icon-name property to tablets
plugins/wacom/gsd-wacom-device.c | 13 +++++++++++++
plugins/wacom/gsd-wacom-device.h | 1 +
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index e47e51f..4274833 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -162,6 +162,7 @@ struct GsdWacomDevicePrivate
GdkDevice *gdk_device;
GsdWacomDeviceType type;
char *name;
+ char *icon_name;
char *tool_name;
gboolean reversible;
gboolean is_screen_tablet;
@@ -301,6 +302,7 @@ gsd_wacom_device_constructor (GType type,
* This needs to come from real data */
device->priv->reversible = FALSE;
device->priv->is_screen_tablet = FALSE;
+ device->priv->icon_name = g_strdup ("wacom-tablet");
if (device->priv->type == WACOM_TYPE_STYLUS ||
device->priv->type == WACOM_TYPE_ERASER) {
@@ -411,6 +413,9 @@ gsd_wacom_device_finalize (GObject *object)
g_free (p->tool_name);
p->tool_name = NULL;
+ g_free (p->icon_name);
+ p->icon_name = NULL;
+
G_OBJECT_CLASS (gsd_wacom_device_parent_class)->finalize (object);
}
@@ -439,6 +444,14 @@ gsd_wacom_device_get_name (GsdWacomDevice *device)
}
const char *
+gsd_wacom_device_get_icon_name (GsdWacomDevice *device)
+{
+ g_return_val_if_fail (GSD_IS_WACOM_DEVICE (device), NULL);
+
+ return device->priv->icon_name;
+}
+
+const char *
gsd_wacom_device_get_tool_name (GsdWacomDevice *device)
{
g_return_val_if_fail (GSD_IS_WACOM_DEVICE (device), NULL);
diff --git a/plugins/wacom/gsd-wacom-device.h b/plugins/wacom/gsd-wacom-device.h
index 3b701b8..420e709 100644
--- a/plugins/wacom/gsd-wacom-device.h
+++ b/plugins/wacom/gsd-wacom-device.h
@@ -87,6 +87,7 @@ GType gsd_wacom_device_get_type (void);
GsdWacomDevice * gsd_wacom_device_new (GdkDevice *device);
GList * gsd_wacom_device_list_styli (GsdWacomDevice *device);
const char * gsd_wacom_device_get_name (GsdWacomDevice *device);
+const char * gsd_wacom_device_get_icon_name (GsdWacomDevice *device);
const char * gsd_wacom_device_get_tool_name (GsdWacomDevice *device);
gboolean gsd_wacom_device_reversible (GsdWacomDevice *device);
gboolean gsd_wacom_device_is_screen_tablet (GsdWacomDevice *device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]