gvfs r1605 - in trunk: . hal



Author: alexl
Date: Fri Mar  7 12:59:55 2008
New Revision: 1605
URL: http://svn.gnome.org/viewvc/gvfs?rev=1605&view=rev

Log:
2008-03-07  Alexander Larsson  <alexl redhat com>

        * hal/ghalmount.c:
        (get_disc_name):
	Translate disc names.
	
        * hal/ghalvolume.c:
        (g_hal_volume_new):
	Don't automount gphoto volumes.



Modified:
   trunk/ChangeLog
   trunk/hal/ghalmount.c
   trunk/hal/ghalvolume.c

Modified: trunk/hal/ghalmount.c
==============================================================================
--- trunk/hal/ghalmount.c	(original)
+++ trunk/hal/ghalmount.c	Fri Mar  7 12:59:55 2008
@@ -209,9 +209,9 @@
     }
   
   if (is_blank)
-    return disc_data[n].ui_name_blank;
+    return gettext(disc_data[n].ui_name_blank);
   else
-    return disc_data[n].ui_name;
+    return gettext(disc_data[n].ui_name);
 }
 
 typedef struct _MountIconSearchData

Modified: trunk/hal/ghalvolume.c
==============================================================================
--- trunk/hal/ghalvolume.c	(original)
+++ trunk/hal/ghalvolume.c	Fri Mar  7 12:59:55 2008
@@ -517,7 +517,10 @@
   HalDevice *drive_device;
   const char *storage_udi;
   const char *device_path;
-      
+  gboolean ignore_automount;
+
+  ignore_automount = FALSE;
+  
   if (hal_device_has_capability (device, "block"))
     {
       storage_udi = hal_device_get_property_string (device, "block.storage_device");
@@ -554,6 +557,10 @@
 
       if (foreign_mount_root == NULL)
         return NULL;
+
+      /* We don't want to automount cameras as the gphoto backend
+         blocks access from other apps */
+      ignore_automount = TRUE;
     }
 #endif
   else
@@ -570,7 +577,7 @@
   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);
+  volume->ignore_automount = 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);



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