tizen ctxpopup: fix backward compatibility for "default" name part 16/181116/2
authorYeongJong Lee <yj34.lee@samsung.com>
Wed, 23 May 2018 12:24:37 +0000 (21:24 +0900)
committerYeongJong Lee <yj34.lee@samsung.com>
Fri, 8 Jun 2018 08:07:01 +0000 (08:07 +0000)
If you use legacy content/text set/get/unset with "default" part name,
_elm_layout_part_aliasing_eval change the part name to "elm.swallow.content".
Because internal _content_set/get/unset checked only "default" string,
legacy content/test set/get/unset with "default" part name was not working.

This patch fixes that bug.

Change-Id: I8400a47e6e9d159066ea022cc14945212381b084

src/lib/elementary_tizen/elc_ctxpopup.c

index b4eb99f..86d521b 100644 (file)
@@ -1514,7 +1514,7 @@ _elm_ctxpopup_content_set(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part, Evas
 {
    Evas_Coord min_w = -1, min_h = -1;
 
-   if ((part) && (strcmp(part, "default")))
+   if ((part) && (strcmp(part, "elm.swallow.content")))
      {
         return efl_content_set(efl_part(efl_super(obj, MY_CLASS), part), content);
      }
@@ -1556,7 +1556,7 @@ static Evas_Object*
 _elm_ctxpopup_content_get(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part)
 {
 
-   if ((part) && (strcmp(part, "default")))
+   if ((part) && (strcmp(part, "elm.swallow.content")))
         return efl_content_get(efl_part(efl_super(obj, MY_CLASS), part));
 
    return sd->content;
@@ -1567,7 +1567,7 @@ _elm_ctxpopup_content_unset(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part)
 {
    Evas_Object *content = NULL;
 
-   if ((part) && (strcmp(part, "default")))
+   if ((part) && (strcmp(part, "elm.swallow.content")))
         return efl_content_unset(efl_part(efl_super(obj, MY_CLASS), part));
 
    content = sd->content;
@@ -3114,7 +3114,6 @@ ELM_PART_OVERRIDE(elm_ctxpopup, ELM_CTXPOPUP, Elm_Ctxpopup_Data)
 ELM_PART_OVERRIDE_CONTENT_SET(elm_ctxpopup, ELM_CTXPOPUP, Elm_Ctxpopup_Data)
 ELM_PART_OVERRIDE_CONTENT_GET(elm_ctxpopup, ELM_CTXPOPUP, Elm_Ctxpopup_Data)
 ELM_PART_OVERRIDE_CONTENT_UNSET(elm_ctxpopup, ELM_CTXPOPUP, Elm_Ctxpopup_Data)
-ELM_PART_CONTENT_DEFAULT_GET(elm_ctxpopup, "default")
 #include "../elementary/elm_ctxpopup_part.eo.c"
 
 /* Efl.Part end */
@@ -3123,7 +3122,6 @@ ELM_PART_CONTENT_DEFAULT_GET(elm_ctxpopup, "default")
 
 #define ELM_CTXPOPUP_EXTRA_OPS \
    ELM_LAYOUT_SIZING_EVAL_OPS(elm_ctxpopup), \
-   ELM_PART_CONTENT_DEFAULT_OPS(elm_ctxpopup), \
    EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_ctxpopup)
 //
 #include "../elementary/elm_ctxpopup_item.eo.c"