[gnome-settings-daemon] wacom: Make icon name static



commit 403088ec66062fc712c3c44b0b916527acf17776
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Mar 4 14:34:54 2012 +0000

    wacom: Make icon name static
    
    It's never modified.

 plugins/wacom/gsd-wacom-device.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 0f0ae0b..1aac312 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -315,7 +315,7 @@ struct GsdWacomDevicePrivate
 
 	GsdWacomDeviceType type;
 	char *name;
-	char *icon_name;
+	const char *icon_name;
 	char *tool_name;
 	gboolean reversible;
 	gboolean is_screen_tablet;
@@ -1110,11 +1110,11 @@ gsd_wacom_device_update_from_db (GsdWacomDevice *device,
 	device->priv->is_screen_tablet = libwacom_is_builtin (wacom_device);
 	if (device->priv->is_screen_tablet) {
 		if (libwacom_get_class (wacom_device) == WCLASS_CINTIQ)
-			device->priv->icon_name = g_strdup ("wacom-tablet-cintiq");
+			device->priv->icon_name = "wacom-tablet-cintiq";
 		else
-			device->priv->icon_name = g_strdup ("wacom-tablet-pc");
+			device->priv->icon_name = "wacom-tablet-pc";
 	} else {
-		device->priv->icon_name = g_strdup ("wacom-tablet");
+		device->priv->icon_name = "wacom-tablet";
 	}
 
 	if (device->priv->type == WACOM_TYPE_PAD) {
@@ -1333,9 +1333,6 @@ gsd_wacom_device_finalize (GObject *object)
         g_free (p->tool_name);
         p->tool_name = NULL;
 
-        g_free (p->icon_name);
-        p->icon_name = NULL;
-
         if (p->modes) {
                 g_hash_table_destroy (p->modes);
                 p->modes = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]