popup: add tizen custom signal (tizen 2.3 layout feature) 02/108302/2
authorJinYong Park <j4939.park@samsung.com>
Tue, 6 Dec 2016 13:12:55 +0000 (22:12 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 20 Mar 2017 03:58:59 +0000 (20:58 -0700)
for wearable circle theme compatibility

Change-Id: I7f41df17795a373e52595ec257144cc7e81cec10
Signed-off-by: Jinyong Park <j4939.park@samsung.com>
src/lib/elc_popup.c

index 062b681..f23f09d 100644 (file)
@@ -1658,7 +1658,27 @@ _elm_popup_elm_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, c
         _action_button_set(obj, content, i);
      }
    else
+   /* TIZEN_ONLY(20161206): support tizen custom signal (tizen_2.3)
      ret = eo_do_ret(_pd->main_layout, tmp, elm_obj_container_content_set(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 = eo_do_ret(_pd->main_layout, tmp, elm_obj_container_content_set(part, content));
+     }
+   /* END */
 
    _scroller_size_calc(obj);
    elm_layout_sizing_eval(obj);
@@ -1771,6 +1791,9 @@ _elm_popup_elm_container_content_unset(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED,
 {
    Evas_Object *content = NULL;
    unsigned int i;
+   /* TIZEN_ONLY(20161206): support tizen custom signal (tizen_2.3) */
+   Eina_Bool tmp;
+   /* END */
 
    if (!part || !strcmp(part, "default"))
      content = _content_unset(obj);
@@ -1786,7 +1809,27 @@ _elm_popup_elm_container_content_unset(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED,
         _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 = eo_do_ret(_pd->main_layout, tmp, elm_obj_container_content_unset(part));
+     }
+   /* END */
 
    return content;