Show the umount/eject button only if can actually do the operation

This commit is contained in:
Davide Andreoli 2015-01-10 20:54:12 +01:00
parent 3261042294
commit 63017167e0
1 changed files with 4 additions and 2 deletions

View File

@ -627,12 +627,14 @@ _places_volume_object_update(Volume *vol, Evas_Object *obj)
}
// the mount/eject icon
if (vol->mounted && vol->mount_point && strcmp(vol->mount_point, "/"))
if (vol->mounted && vol->mount_point && vol->mount_func &&
strcmp(vol->mount_point, "/"))
{
edje_object_signal_emit(obj, "icon,eject,show", "places");
edje_object_part_text_set(obj, "eject_label", D_("unmount"));
}
else if (!vol->mounted && (vol->requires_eject || vol->removable))
else if (!vol->mounted && vol->eject_func &&
(vol->requires_eject || vol->removable))
{
edje_object_signal_emit(obj, "icon,eject,show", "places");
edje_object_part_text_set(obj, "eject_label", D_("eject"));