[gnome-settings-daemon] wacom: Make tablet configuration be per-machine
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Make tablet configuration be per-machine
- Date: Wed, 25 Apr 2012 18:53:14 +0000 (UTC)
commit f6840605930acd5359fc0228df145f163f2f9dda
Author: Bastien Nocera <hadess hadess net>
Date: Wed Apr 25 19:51:03 2012 +0100
wacom: Make tablet configuration be per-machine
As well as per-tablet, we apparently also need to be per-machine
https://bugzilla.gnome.org/show_bug.cgi?id=674792
plugins/wacom/gsd-wacom-device.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index ba29186..6904a54 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -316,6 +316,7 @@ struct GsdWacomDevicePrivate
GsdWacomDeviceType type;
char *name;
char *path;
+ char *machine_id;
const char *icon_name;
char *tool_name;
gboolean reversible;
@@ -1317,6 +1318,10 @@ gsd_wacom_device_init (GsdWacomDevice *device)
{
device->priv = GSD_WACOM_DEVICE_GET_PRIVATE (device);
device->priv->type = WACOM_TYPE_INVALID;
+
+ 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");
}
static void
@@ -1351,6 +1356,9 @@ gsd_wacom_device_finalize (GObject *object)
g_free (p->path);
p->path = NULL;
+ g_free (p->machine_id);
+ p->machine_id = 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]