gvfs r1798 - in trunk: . hal



Author: hadess
Date: Wed Jun  4 17:45:53 2008
New Revision: 1798
URL: http://svn.gnome.org/viewvc/gvfs?rev=1798&view=rev

Log:
2008-06-04  Bastien Nocera  <hadess hadess net>

	* hal/ghalvolumemonitor.c (update_cameras): Don't add
	devices that are both audio players and cameras twice,
	as it causes 1) error messages when plugging in (it tries to
	mount the device another time) 2) weird behaviour in
	nautilus' computer:/ (See #536601)



Modified:
   trunk/ChangeLog
   trunk/hal/ghalvolumemonitor.c

Modified: trunk/hal/ghalvolumemonitor.c
==============================================================================
--- trunk/hal/ghalvolumemonitor.c	(original)
+++ trunk/hal/ghalvolumemonitor.c	Wed Jun  4 17:45:53 2008
@@ -1520,6 +1520,22 @@
       GFile *foreign_mount_root;
       int usb_bus_num;
       int usb_device_num;
+      gboolean found;
+
+      /* Look for the device in the added volumes, so as
+       * not to add devices that are both audio players, and cameras */
+      found = FALSE;
+      for (ll = *added_volumes; ll; ll = ll->next)
+        {
+	  if (g_hal_volume_has_udi (ll->data, hal_device_get_udi (d)) != FALSE)
+	    {
+	      found = TRUE;
+	      break;
+	    }
+	}
+
+      if (found)
+        continue;
 
       usb_bus_num = hal_device_get_property_int (d, "usb.bus_number");
       usb_device_num = hal_device_get_property_int (d, "usb.linux.device_number");



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