Updating branch refs/heads/master
to fb0156aa39ee301bcd4a7bfb9cbd9ae952f11970 (commit)
from dede380139cf264918cc2478d19227e49ff0a1c5 (commit)
commit fb0156aa39ee301bcd4a7bfb9cbd9ae952f11970
Author: Jannis Pohlmann <[email protected]>
Date: Tue Oct 12 12:04:53 2010 +0200
Display eject button only if a volume is removable and present.
thunar/thunar-shortcuts-model.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c
index 0018c88..d87891a 100644
--- a/thunar/thunar-shortcuts-model.c
+++ b/thunar/thunar-shortcuts-model.c
@@ -561,12 +561,15 @@ thunar_shortcuts_model_get_value (GtkTreeModel
*tree_model,
g_value_init (value, G_TYPE_STRING);
if (shortcut->volume != NULL)
{
- mount = g_volume_get_mount (shortcut->volume);
- if (g_volume_can_eject (shortcut->volume) || (mount != NULL &&
g_mount_can_unmount (mount)))
- g_value_set_static_string (value, "media-eject");
+ if (thunar_g_volume_is_removable (shortcut->volume)
+ && thunar_g_volume_is_present (shortcut->volume))
+ {
+ g_value_set_static_string (value, "media-eject");
+ }
else
- g_value_set_static_string (value, "");
- g_object_unref (mount);
+ {
+ g_value_set_static_string (value, "");
+ }
}
else
{
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits