gnome-scan r523 - in trunk: . modules



Author: bersace
Date: Tue Feb 26 23:27:53 2008
New Revision: 523
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=523&view=rev

Log:
Ignore webcam. Fix bug #507755


Modified:
   trunk/ChangeLog
   trunk/modules/gsane-scanner.c

Modified: trunk/modules/gsane-scanner.c
==============================================================================
--- trunk/modules/gsane-scanner.c	(original)
+++ trunk/modules/gsane-scanner.c	Tue Feb 26 23:27:53 2008
@@ -242,9 +242,19 @@
 GnomeScanner*
 gsane_scanner_new (const SANE_Device *device)
 {
+	/* v4l set type as "virtual device". Welcome to the bazar of
+	   SANE backends :( */
+	if (g_str_equal(device->type, "video camera")
+	    || g_str_equal(device->type, "webcam")
+	    || g_strstr_len(device->name, 4, "v4l"))
+		return NULL;
+
 	GObject *object =
 		g_object_new (GSANE_TYPE_SCANNER,
-					  "name", g_strconcat(device->vendor, " ", device->model, NULL),
+					  "name", g_strconcat(device->vendor,
+							      " ",
+							      device->model,
+							      NULL),
 					  "blurb", "",
 					  "icon-name", "scanner",
 					  "sane-id", device->name,



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