theme: add DBG() message when style is set to default (fallback)
authorJee-Yong Um <jc9.um@samsung.com>
Mon, 23 Nov 2015 07:26:52 +0000 (08:26 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Mon, 23 Nov 2015 07:45:33 +0000 (08:45 +0100)
Summary:
When _elm_theme_set() failed to set given style, it sets style
as "default".
However, setting style to "default" can be unintended behavior,
so developer should have the chance to get to know fallback.

Reviewers: cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D3352

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
legacy/elementary/src/lib/elm_theme.c

index 87048fe..4006bc6 100644 (file)
@@ -319,7 +319,12 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou
         file = _elm_theme_group_file_find(th, buf2);
         if (file)
           {
-             if (edje_object_mmap_set(o, file, buf2)) return EINA_TRUE;
+             if (edje_object_mmap_set(o, file, buf2))
+               {
+                  DBG("could not set theme style '%s', fallback to default",
+                      style);
+                  return EINA_TRUE;
+               }
              else
                {
                   DBG("could not set theme group '%s' from file '%s': %s",