davemds pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/places.git/commit/?id=63017167e013fdd7dd40bbb9694a5e12c08b25f9

commit 63017167e013fdd7dd40bbb9694a5e12c08b25f9
Author: Dave Andreoli <[email protected]>
Date:   Sat Jan 10 20:54:12 2015 +0100

    Show the umount/eject button only if can actually do the operation
---
 src/e_mod_places.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/e_mod_places.c b/src/e_mod_places.c
index cc26efd..f4fd980 100644
--- a/src/e_mod_places.c
+++ b/src/e_mod_places.c
@@ -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"));

-- 


Reply via email to