Sorry that I have missed bringing this up before:
https://phab.enlightenment.org/T4996

This has been around for a while... I have the code and it is simple:
in elm_image_file_set, if the file extension is .desktop, then create an
Efreet_Desktop *desktop object and do the following:
const char *path = NULL, *key = NULL;
char buf[4096];
if (!desktop->icon)
          path = NULL;
        else if (strncmp(desktop->icon, "/", 1) &&
!ecore_file_exists(desktop->icon))
          {
             clamp = (4 * round((double)ic->inst->size/4));
             path = efreet_icon_path_find(e_config->icon_theme,
desktop->icon, clamp);
             if (!path)
               {
                  if (e_util_strcmp(e_config->icon_theme, "hicolor"))
                    path = efreet_icon_path_find("hicolor", desktop->icon,
clamp);
               }
          }
        else if (ecore_file_exists(desktop->icon))
          {
             path = desktop->icon;
          }
        if (!path && desktop->icon)
          {
             snprintf(buf, sizeof(buf), "e/icons/%s", desktop->icon);
             if
(eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
               {
                  path = e_theme_edje_file_get("base/theme/icons", buf);
                  k = buf;
               }
             else
               {
                  path = e_theme_edje_file_get("base/theme/icons",
"e/icons/unknown");
                  k =  "e/icons/unknown";
               }
          }
        else if (!path && !desktop->icon)
          {
             path = e_theme_edje_file_get("base/theme/icons",
"e/icons/unknown");
             k = "e/icons/unknown";
          }
        if (path && desktop->icon && !k)
          {
             len = strlen(desktop->icon);
             if ((len > 4) && (!strcasecmp(desktop->icon + len - 4,
".edj")))
               k = "icon";
          }
Then just set the path and key.  The e_theme_edje* stuff of course would be
substituted with elm theme stuff of course.
No need for anything special in image_file_get as the path and key set in
file_set would return normally.

This would allow a TON of redundant code throughout E and potentially other
places to be removed and elm_icon to fully replace e_icon.  I'm also sure
this would be helpful for other apps that would have a need to load a
.desktop's image.

This would be very simple to add to elm_image_file_set, with the catch
being it probably should be backported to other efl releases as well.  I
really think this is a necessary functionality that should exist and is
warranted.  With the simplicity of adding the code, if someone who is more
familiar with the current layout of the eo and elm stuff and who is more
familiar with backporting than I am would apply this, I think it is very
necessary.

Again, sorry for the late notice.  Thoughts?

On Wed, Jul 12, 2017 at 4:33 AM Stefan Schmidt <ste...@osg.samsung.com>
wrote:

> Hello.
>
> This comes really late this time. Sorry for that.
>
> This is the list of items that need fixing before we can go ahead and
> release 1.20. Help is very much appreciated on them. If you think one is
> not critical or another one is speak up before it is to late.
>
> Phab show stopper:
> ------------------
> infinite loop on evas free is back
> https://phab.enlightenment.org/T5680
>
> image rendering fails with no feedback and then never renders
> https://phab.enlightenment.org/T5678
>
> buffer rendering regression
> https://phab.enlightenment.org/T5595
>
> macOS graphical programs crash on termination
> https://phab.enlightenment.org/T5245
>
> Screen does not unblank...
> https://phab.enlightenment.org/T5462
>
>
> Are there any other issues that need to be promoted to a showstopper?
>
>
> Coverity high impact:
> ---------------------
> 1377545 Out-of-bounds write Memory - corruptions
> /src/lib/efl_wl/efl_wl.c
>
> 1377544 Resource leak
> /src/lib/ecore/ecore_poller.c
>
> 1377542 Resource leak
> /src/lib/efl_wl/x11.x
>
> 1377539 Resource leak
> /src/lib/elput/elput_logind.c
>
> 1377537 Resource leak
> /src/lib/efl_wl/x11.x
>
> 1377526 Use after free Memory - illegal accesses
> /src/lib/efl_wl/x11.x
>
> 1377520 Resource leak
> /src/lib/efl_wl/x11.x
>
> 1374646 Resource leak
> /src/modules/evas/engines/gl_...vas_ector_gl_image_buffer.c
>
> 1374645 Resource leak
> /src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c
>
> 1365656 Resource leak
> /src/lib/evas/canvas/efl_canvas_image.c
>
>
> ABI/API report:
> ---------------
> https://abi-laboratory.pro/tracker/timeline/efl/index.html
> o People need to review this one
> o I need to prepare our own report to compare against the one from
> abi-laboratory
>
> regards
> Stefan Schmidt
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to