[gnome-color-manager] trivial: make GcmColormeter fall back to the sysfs attributes if the usb.ids support is not in place



commit 952fd9de7555d2ca5adf3ebad8e04e839fce544c
Author: Richard Hughes <richard hughsie com>
Date:   Mon Feb 22 14:21:14 2010 +0000

    trivial: make GcmColormeter fall back to the sysfs attributes if the usb.ids support is not in place

 src/gcm-colorimeter.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-colorimeter.c b/src/gcm-colorimeter.c
index 366ed0a..669160d 100644
--- a/src/gcm-colorimeter.c
+++ b/src/gcm-colorimeter.c
@@ -297,10 +297,14 @@ gcm_colorimeter_device_add (GcmColorimeter *colorimeter, GUdevDevice *device)
 	/* vendor */
 	g_free (priv->vendor);
 	priv->vendor = g_strdup (g_udev_device_get_property (device, "ID_VENDOR_FROM_DATABASE"));
+	if (priv->vendor == NULL)
+		priv->vendor = g_strdup (g_udev_device_get_sysfs_attr (device, "manufacturer"));
 
 	/* model */
 	g_free (priv->model);
 	priv->model = g_strdup (g_udev_device_get_property (device, "ID_MODEL_FROM_DATABASE"));
+	if (priv->model == NULL)
+		priv->model = g_strdup (g_udev_device_get_sysfs_attr (device, "product"));
 
 	/* device support */
 	priv->supports_display = g_udev_device_get_property_as_boolean (device, "GCM_TYPE_DISPLAY");



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