[gnome-color-manager] trivial: when we can guess the camera device is likely a webcam, use the camera-web device icon



commit c8259f9a372bc09bc4bc5e9bd3bed3b1ec2d9e88
Author: Richard Hughes <richard hughsie com>
Date:   Tue Mar 29 14:24:45 2011 +0100

    trivial: when we can guess the camera device is likely a webcam, use the camera-web device icon

 src/gcm-prefs.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index f87a99a..4f0f900 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -1791,6 +1791,16 @@ gcm_prefs_add_device (GcmPrefsPriv *prefs, CdDevice *device)
 	/* italic for non-connected devices */
 	title = gcm_device_get_title (device);
 
+	/* are we really a webcam */
+	if (kind == CD_DEVICE_KIND_CAMERA) {
+		if (g_strstr_len (title, -1, "webcam") != NULL ||
+		    g_strstr_len (title, -1, "Webcam") != NULL ||
+		    g_strstr_len (title, -1, "Internal") != NULL ||
+		    g_strstr_len (title, -1, "Integrated") != NULL) {
+			icon_name = "camera-web";
+		}
+	}
+
 	/* create sort order */
 	sort = g_strdup_printf ("%s%s",
 				gcm_prefs_device_kind_to_string (kind),



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