summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-03-07 12:59:55 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-03-07 12:59:55 +0000
commit2adadc7596273634c7181adbc5eb8eb53e85ba67 (patch)
treeb4512c870285e8fce02852a8df6a1ca1986dbf00
parent2c2bf2c7f923a2629600a0b1962c976fb21b6520 (diff)
downloadgvfs-2adadc7596273634c7181adbc5eb8eb53e85ba67.tar.gz
Translate disc names.
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. svn path=/trunk/; revision=1605
-rw-r--r--ChangeLog10
-rw-r--r--hal/ghalmount.c4
-rw-r--r--hal/ghalvolume.c11
3 files changed, 21 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a913ac8b..1808d805 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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.
+
2008-03-07 Kjartan Maraas <kmaraas@gnome.org>
* programs/gvfs-mount.c: ANSIfication
diff --git a/hal/ghalmount.c b/hal/ghalmount.c
index e270f510..7f205864 100644
--- a/hal/ghalmount.c
+++ b/hal/ghalmount.c
@@ -209,9 +209,9 @@ get_disc_name (const char *disc_type, gboolean is_blank)
}
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
diff --git a/hal/ghalvolume.c b/hal/ghalvolume.c
index 27e282e8..5a57f3e3 100644
--- a/hal/ghalvolume.c
+++ b/hal/ghalvolume.c
@@ -517,7 +517,10 @@ g_hal_volume_new (GVolumeMonitor *volume_monitor,
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 @@ g_hal_volume_new (GVolumeMonitor *volume_monitor,
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 @@ g_hal_volume_new (GVolumeMonitor *volume_monitor,
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);