From 4b09ce57630ac2502224ab7a9da6f69a7f26eab5 Mon Sep 17 00:00:00 2001 From: JinYong Park Date: Wed, 29 Nov 2017 16:21:39 +0900 Subject: [PATCH] popup: add tizen custom signal (tizen 2.3 layout feature) for wearable circle theme compatibility @tizen_fix original patch : https://review.tizen.org/gerrit/#/c/108302/ Change-Id: I2edb99e2a85461c98ffec330b7adc33ec9a74d66 Signed-off-by: JinYong Park --- src/lib/elementary/elc_popup.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index 28c3e07..358f01c 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -1640,7 +1640,27 @@ _elm_popup_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *par _action_button_set(obj, content, i); } else + /* TIZEN_ONLY(20161206): support tizen custom signal (tizen_2.3) ret = efl_content_set(efl_part(_pd->main_layout, part), content); + */ + { + if (strcmp("elm.swallow.icon", part) != 0 && + strcmp("elm.swallow.end", part) != 0) + { + const char *type; + char buf[1024]; + if (strncmp(part, "elm.swallow.", sizeof("elm.swallow.") - 1) == 0) + type = part + sizeof("elm.swallow.")-1; + else + type = part; + + snprintf(buf, sizeof(buf), "elm,state,tizen,%s,show", type); + elm_layout_signal_emit(_pd->main_layout, buf, "elm"); + } + + ret = efl_content_set(efl_part(_pd->main_layout, part), content); + } + /* END */ elm_layout_sizing_eval(obj); @@ -1766,7 +1786,27 @@ _elm_popup_content_unset(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *p _button_remove(obj, i, EINA_FALSE); } else + /* TIZEN_ONLY(20161206): support tizen custom signal (tizen_2.3) goto err; + */ + { + if (strcmp("elm.swallow.icon", part) != 0 && + strcmp("elm.swallow.end", part) != 0) + { + const char *type; + char buf[1024]; + if (strncmp(part, "elm.swallow.", sizeof("elm.swallow.") - 1) == 0) + type = part + sizeof("elm.swallow.")-1; + else + type = part; + + snprintf(buf, sizeof(buf), "elm,state,tizen,%s,hide", type); + elm_layout_signal_emit(_pd->main_layout, buf, "elm"); + } + + content = efl_content_unset(efl_part(_pd->main_layout, part)); + } + /* END */ return content; -- 2.7.4