[gnome-settings-daemon] wacom: Fix mess left by last 2 commits



commit 1630fe5cb20ddf26fd9de8544c1a141885bab917
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Apr 25 19:59:09 2012 +0100

    wacom: Fix mess left by last 2 commits
    
    You know it's been that kind of day...

 plugins/wacom/gsd-wacom-device.c |   23 +++++------------------
 1 files changed, 5 insertions(+), 18 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 6904a54..0cc4b75 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -1096,23 +1096,6 @@ gsd_wacom_device_add_modes (GsdWacomDevice *device,
 	}
 }
 
-static char *
-settings_path_for_device (WacomDevice *wacom_device)
-{
-	char *machine_id, *settings_path;
-
-	machine_id = g_dbus_get_machine_id (NULL);
-	g_assert (machine_id);
-
-	settings_path = g_strdup_printf (WACOM_DEVICE_CONFIG_BASE,
-					 machine_id,
-					 libwacom_get_match (wacom_device));
-
-	g_free (machine_id);
-
-	return settings_path;
-}
-
 static void
 gsd_wacom_device_update_from_db (GsdWacomDevice *device,
 				 WacomDevice    *wacom_device,
@@ -1120,7 +1103,9 @@ gsd_wacom_device_update_from_db (GsdWacomDevice *device,
 {
 	char *settings_path;
 
-	settings_path = settings_path_for_device (wacom_device);
+	settings_path = g_strdup_printf (WACOM_DEVICE_CONFIG_BASE,
+					 device->priv->machine_id,
+					 libwacom_get_match (wacom_device));
 	device->priv->wacom_settings = g_settings_new_with_path (WACOM_TABLET_SCHEMA,
 								 settings_path);
 
@@ -1322,6 +1307,8 @@ gsd_wacom_device_init (GsdWacomDevice *device)
         if (g_file_get_contents ("/etc/machine-id", &device->priv->machine_id, NULL, NULL) == FALSE)
                 if (g_file_get_contents ("/var/lib/dbus/machine-id", &device->priv->machine_id, NULL, NULL) == FALSE)
                         device->priv->machine_id = g_strdup ("00000000000000000000000000000000");
+
+        device->priv->machine_id = g_strstrip (device->priv->machine_id);
 }
 
 static void



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