[Xfce4-commits] <thunar:master> Assume shadowed mounts are not present.
Jannis Pohlmann
noreply at xfce.org
Tue Oct 12 12:20:01 CEST 2010
Updating branch refs/heads/master
to 4c13cf2491a553afeeec73e73699c7b90a97d876 (commit)
from fb0156aa39ee301bcd4a7bfb9cbd9ae952f11970 (commit)
commit 4c13cf2491a553afeeec73e73699c7b90a97d876
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Tue Oct 12 12:18:38 2010 +0200
Assume shadowed mounts are not present.
thunar/thunar-gio-extensions.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c
index f4b68e5..7eaf50a 100644
--- a/thunar/thunar-gio-extensions.c
+++ b/thunar/thunar-gio-extensions.c
@@ -397,7 +397,7 @@ thunar_g_volume_is_removable (GVolume *volume)
GMount *mount;
_thunar_return_val_if_fail (G_IS_VOLUME (volume), FALSE);
-
+
/* check if the volume can be ejected */
can_eject = g_volume_can_eject (volume);
@@ -456,7 +456,9 @@ gboolean
thunar_g_volume_is_present (GVolume *volume)
{
gboolean has_media = FALSE;
+ gboolean is_shadowed = FALSE;
GDrive *drive;
+ GMount *mount;
_thunar_return_val_if_fail (G_IS_VOLUME (volume), FALSE);
@@ -467,7 +469,14 @@ thunar_g_volume_is_present (GVolume *volume)
g_object_unref (drive);
}
- return has_media;
+ mount = g_volume_get_mount (volume);
+ if (mount != NULL)
+ {
+ is_shadowed = g_mount_is_shadowed (mount);
+ g_object_unref (mount);
+ }
+
+ return has_media && !is_shadowed;
}
More information about the Xfce4-commits
mailing list