discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7353fc1cb85e08eb6e884ed8bbf9a009226069b6

commit 7353fc1cb85e08eb6e884ed8bbf9a009226069b6
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Feb 27 15:22:08 2018 -0500

    elm_theme: deduplicate theme apply code
    
    the "default" style fallback code here was identical, so just call again
    with "default" instead of copy and pasting the same code
---
 src/lib/elementary/elm_theme.c | 30 ++----------------------------
 1 file changed, 2 insertions(+), 28 deletions(-)

diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c
index f47c3217d9..f060064494 100644
--- a/src/lib/elementary/elm_theme.c
+++ b/src/lib/elementary/elm_theme.c
@@ -321,35 +321,9 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char 
*clas, const char *grou
    if (!style)
      return EFL_UI_THEME_APPLY_FAILED;
 
+   if (eina_streq(style, "default")) return EFL_UI_THEME_APPLY_FAILED;
    // Use the elementary default style.
-   if (is_legacy)
-     snprintf(buf2, sizeof(buf2), "elm/%s/%s/%s", clas, (group) ? group : 
"base", "default");
-   else
-     snprintf(buf2, sizeof(buf2), "efl/%s%s%s", clas,
-            ((group) ? group_sep : "\0"), ((group) ? group : "\0"));
-   if (!eina_hash_find(th->cache_style_load_failed, buf2))
-     {
-        file = _elm_theme_group_file_find(th, buf2);
-        if (file)
-          {
-             if (edje_object_mmap_set(o, file, buf2))
-               {
-                  INF("could not set theme style '%s', fallback to default",
-                      style);
-                  return EFL_UI_THEME_APPLY_DEFAULT;
-               }
-             else
-               {
-                  INF("could not set theme group '%s' from file '%s': %s",
-                      buf2,
-                      eina_file_filename_get(file),
-                      edje_load_error_str(edje_object_load_error_get(o)));
-               }
-          }
-        //style not found, add to the not found list
-        eina_hash_add(th->cache_style_load_failed, buf2, (void *)1);
-     }
-   return EFL_UI_THEME_APPLY_FAILED;
+   return _elm_theme_set(th, o, clas, group, "default", is_legacy);
 }
 
 Eina_Bool

-- 


Reply via email to