From dc98fd4f5e4db5405990d0cf794bd37ecee0a3a3 Mon Sep 17 00:00:00 2001 From: SangHyeon Lee Date: Fri, 2 Jun 2017 10:32:04 +0900 Subject: [PATCH] elm_gen : apply Elm_Theme_Apply enum return types for theme_object_get of item view. elm_widget_theme_object_get now return Elm_Theme_Apply enum not bools. only ELM_THEME_APPLY_FAILED case, need to re-apply default item edje. Signed-off-by: SangHyeon Lee --- src/lib/elementary/elm_gengrid.c | 7 ++++--- src/lib/elementary/elm_genlist.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 60076cd..62a1ab7 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -1109,9 +1109,10 @@ _view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style) ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); snprintf(buf, sizeof(buf), "item/%s", style ? style : "default"); - if (!elm_widget_theme_object_set(WIDGET(it), view, - "gengrid", buf, - elm_widget_style_get(WIDGET(it)))) + Elm_Theme_Apply th_ret = + elm_widget_theme_object_set(WIDGET(it), view, "gengrid", buf, + elm_widget_style_get(WIDGET(it))); + if (th_ret == ELM_THEME_APPLY_FAILED) { ERR("%s is not a valid gengrid item style. " "Automatically falls back into default style.", diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index c771570..5a5436b 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -520,9 +520,10 @@ _view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style) "",style ? : "default"); } - if (!elm_widget_theme_object_set(WIDGET(it), view, - "genlist", buf, - elm_widget_style_get(WIDGET(it)))) + Elm_Theme_Apply th_ret = + elm_widget_theme_object_set(WIDGET(it), view, "genlist", buf, + elm_widget_style_get(WIDGET(it))); + if (th_ret == ELM_THEME_APPLY_FAILED) { ERR("%s is not a valid genlist item style. " "Automatically falls back into default style.", -- 2.7.4