From 1120367dba3e8aeee0155c5c2f04e4f4f83a74f7 Mon Sep 17 00:00:00 2001 From: Shilpa Singh Date: Wed, 15 Nov 2017 18:18:33 +0530 Subject: [PATCH] elc_ctxpopup: Add item_style_get API Change-Id: I1911c4fb41a21e71ffeb9cfde193755872f6909b Signed-off-by: Shilpa Singh (cherry picked from commit 62bfee336397cc980f003e27213f2ffefae4c545) --- src/lib/elc_ctxpopup.c | 9 +++++++++ src/lib/elm_ctxpopup_item.eo | 1 + src/mobile_lib/elc_ctxpopup.c | 9 +++++++++ src/mobile_lib/elm_widget_ctxpopup.h | 1 + 4 files changed, 20 insertions(+) diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c index 198a401..e5ba191 100644 --- a/src/lib/elc_ctxpopup.c +++ b/src/lib/elc_ctxpopup.c @@ -1019,6 +1019,15 @@ _elm_ctxpopup_item_elm_widget_item_style_set(Eo *eo_item EINA_UNUSED, // mobile & wearable only feature } +/* TIZEN_ONLY(20171116): merge eo & header files for different profiles */ +EOLIAN static const char * +_elm_ctxpopup_item_elm_widget_item_style_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item EINA_UNUSED) +{ + // mobile & wearable only feature + return NULL; +} +/* END */ + EOLIAN static Elm_Atspi_State_Set _elm_ctxpopup_item_elm_interface_atspi_accessible_state_set_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Item_Data *it EINA_UNUSED) { diff --git a/src/lib/elm_ctxpopup_item.eo b/src/lib/elm_ctxpopup_item.eo index 87286d1..4367beb 100644 --- a/src/lib/elm_ctxpopup_item.eo +++ b/src/lib/elm_ctxpopup_item.eo @@ -44,6 +44,7 @@ class Elm.Ctxpopup_Item(Elm.Widget_Item, Elm_Interface_Atspi_Widget_Action) Elm.Widget_Item.signal_emit; Elm.Widget_Item.del_pre; Elm.Widget_Item.style.set; // TIZEN_ONLY(20170116): merge eo & header files for different profiles + Elm.Widget_Item.style.get; //TIZEN_ONLY(20171115): merge eo & header files for different profiles Elm.Widget_Item.part_text.get; Elm.Widget_Item.part_text.set; Elm.Widget_Item.part_content.get; diff --git a/src/mobile_lib/elc_ctxpopup.c b/src/mobile_lib/elc_ctxpopup.c index eac6aad..84b0bad 100644 --- a/src/mobile_lib/elc_ctxpopup.c +++ b/src/mobile_lib/elc_ctxpopup.c @@ -443,6 +443,7 @@ _elm_ctxpopup_item_elm_widget_item_del_pre(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup evas_object_del(VIEW(item)); eina_stringshare_del(item->label); + if (item->style) eina_stringshare_del(item->style); sd->items = eina_list_remove(sd->items, item); if (eina_list_count(sd->items) < 1) @@ -1732,6 +1733,7 @@ _elm_ctxpopup_item_elm_widget_item_style_set(Eo *eo_item EINA_UNUSED, { ELM_CTXPOPUP_DATA_GET(WIDGET(item), sd); + eina_stringshare_replace(&item->style, style); if (item->icon && item->label) { if (sd->horizontal) @@ -1757,6 +1759,13 @@ _elm_ctxpopup_item_elm_widget_item_style_set(Eo *eo_item EINA_UNUSED, if (sd->visible) elm_layout_sizing_eval(WIDGET(item)); } +EOLIAN static const char * +_elm_ctxpopup_item_elm_widget_item_style_get(Eo *eo_it EINA_UNUSED, + Elm_Ctxpopup_Item_Data *item) +{ + return item->style; +} + static void _bg_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, diff --git a/src/mobile_lib/elm_widget_ctxpopup.h b/src/mobile_lib/elm_widget_ctxpopup.h index 42fe6cc..d70af2b 100644 --- a/src/mobile_lib/elm_widget_ctxpopup.h +++ b/src/mobile_lib/elm_widget_ctxpopup.h @@ -36,6 +36,7 @@ struct _Elm_Ctxpopup_Item_Data const char *label; Evas_Object *icon; Evas_Object *btn; + Eina_Stringshare *style; struct { -- 2.7.4