# Description: Respect storage.automount_enabled_hint hal property
# Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=520736
--- gvfs-0.1.11/hal/ghalvolume.c	2008-03-04 17:19:13.000000000 +0100
+++ gvfs-0.1.11.new/hal/ghalvolume.c	2008-03-07 16:12:45.000000000 +0100
@@ -570,7 +570,13 @@
   volume->drive_device = g_object_ref (drive_device);
   volume->foreign_mount_root = foreign_mount_root != NULL ? g_object_ref (foreign_mount_root) : NULL;
   volume->is_mountable = is_mountable;
-  volume->ignore_automount = ! hal_device_is_recently_plugged_in (device);
+
+  if (drive_device && 
+      hal_device_has_property(drive_device, "storage.automount_enabled_hint") &&
+      !hal_device_get_property_bool (drive_device, "storage.automount_enabled_hint"))
+    volume->ignore_automount = TRUE;
+  else
+    volume->ignore_automount = ! hal_device_is_recently_plugged_in (device);
   
   g_signal_connect_object (device, "hal_property_changed", (GCallback) hal_changed, volume, 0);
   g_signal_connect_object (drive_device, "hal_property_changed", (GCallback) hal_changed, volume, 0);
