davemds pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/places.git/commit/?id=1e63c232bb60c360955f16490bd7f0efb6359739

commit 1e63c232bb60c360955f16490bd7f0efb6359739
Author: Dave Andreoli <d...@gurumeditation.it>
Date:   Sun Apr 25 07:55:18 2021 +0200

    Fix icons for DVD, BD and Audio CD
---
 e-module-places.edc |  15 ---------------
 images/tag_dvd.png  | Bin 892 -> 0 bytes
 src/e_mod_places.c  |  22 ++++++++++++++++------
 3 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/e-module-places.edc b/e-module-places.edc
index fc65b8f..f368e58 100644
--- a/e-module-places.edc
+++ b/e-module-places.edc
@@ -8,7 +8,6 @@ images
    image: "tag_fat.png" COMP;
    image: "tag_hfs.png" COMP;
    image: "tag_ufs.png" COMP;
-   image: "tag_dvd.png" COMP;
    image: "header_bg.png" COMP;
    image: "header_down.png" COMP;
    image: "home.png" COMP;
@@ -409,14 +408,6 @@ collections
                image.normal: "tag_ufs.png";
                color: 255 255 255 240;
             }
-            description { state: "dvd" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
-               image.normal: "tag_dvd.png";
-               rel1.relative: 0.0 0.0;
-               rel2.relative: 1.0 0.5;
-               color: 255 255 255 240;
-            }
          }
          part { name: "gauge_bg";
             mouse_events: 0;
@@ -718,12 +709,6 @@ collections
             action: STATE_SET "ufs" 0.0;
             target: "icon_tag";
          }
-         program { name: "set_tag_dvd";
-            signal: "icon,tag,dvd";
-            source: "places";
-            action: STATE_SET "dvd" 0.0;
-            target: "icon_tag";
-         }
          program { name: "set_separator_horiz";
             signal: "separator,set,horiz";
             source: "places";
diff --git a/images/tag_dvd.png b/images/tag_dvd.png
deleted file mode 100644
index 4eafaef..0000000
Binary files a/images/tag_dvd.png and /dev/null differ
diff --git a/src/e_mod_places.c b/src/e_mod_places.c
index 2dcc227..342d560 100644
--- a/src/e_mod_places.c
+++ b/src/e_mod_places.c
@@ -379,11 +379,23 @@ places_fill_box(Evas_Object *main, Eina_Bool horiz)
         icon = e_icon_add(evas_object_evas_get(main));
         f1 = f2 = f3 = NULL;
         /* optical discs */
-        // TODO more icons: dvd, blueray....
-        if (eina_streq(vol->drive_type, "cdrom") ||
-            eina_streq(vol->drive_type, "optical_cd"))
+        if (eina_str_has_prefix(vol->drive_type, "optical_bd"))
           {
-             f1 = "media"; f2 = "optical";  // OR media-optical ??
+             f1 = "media"; f2 = "optical"; f3 = "bd";
+          }
+        else if (eina_str_has_prefix(vol->drive_type, "optical_dvd"))
+          {
+             f1 = "media"; f2 = "optical"; f3 = "dvd";
+          }
+        else if (eina_str_has_prefix(vol->drive_type, "optical_cd") &&
+                 !eina_streq(vol->fstype, "iso9660"))
+          {
+             f1 = "media"; f2 = "optical"; f3 = "audio";
+          }
+        else if (eina_str_has_prefix(vol->drive_type, "cdrom") ||
+                 eina_str_has_prefix(vol->drive_type, "optical"))
+          {
+             f1 = "media"; f2 = "optical";
           }
         /* flash cards */
         else if (eina_streq(vol->drive_type, "sd_mmc") ||
@@ -455,8 +467,6 @@ places_fill_box(Evas_Object *main, Eina_Bool horiz)
         else if (eina_streq(vol->fstype, "hfs") ||
                  eina_streq(vol->fstype, "hfsplus"))
           edje_object_signal_emit(o, "icon,tag,hfs", "places");
-        else if (eina_streq(vol->fstype, "udf"))
-          edje_object_signal_emit(o, "icon,tag,dvd", "places");
 
         // update labels, gauge and button
         _places_volume_object_update(vol, o);

-- 


Reply via email to