summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elc_naviframe.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-14 21:14:52 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-15 13:11:01 -0500
commitf07d0d3ff65c82ca9c04059f54fcf81bef32f55c (patch)
treee4943ddd290ec5fe84477c49c96c0d623f0e5836 /src/lib/elementary/elc_naviframe.c
parent8fc6aa5467bcd8a0b4d7ffd425035a2e7fe0da2d (diff)
naviframe: remove 'style' property
Diffstat (limited to 'src/lib/elementary/elc_naviframe.c')
-rw-r--r--src/lib/elementary/elc_naviframe.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c
index d05ad47..c683a6e 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -181,7 +181,6 @@ _item_free(Elm_Naviframe_Item_Data *it)
181 181
182 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); 182 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
183 183
184 eina_stringshare_del(it->style);
185 eina_stringshare_del(it->title_label); 184 eina_stringshare_del(it->title_label);
186 eina_stringshare_del(it->subtitle_label); 185 eina_stringshare_del(it->subtitle_label);
187 186
@@ -334,12 +333,12 @@ _item_style_set(Elm_Naviframe_Item_Data *it,
334 if (!item_style) 333 if (!item_style)
335 { 334 {
336 strcpy(buf, "item/basic"); 335 strcpy(buf, "item/basic");
337 eina_stringshare_replace(&it->style, "basic"); 336 elm_wdg_item_style_set(efl_super(EO_OBJ(it), ELM_NAVIFRAME_ITEM_CLASS), "basic");
338 } 337 }
339 else 338 else
340 { 339 {
341 snprintf(buf, sizeof(buf), "item/%s", item_style); 340 snprintf(buf, sizeof(buf), "item/%s", item_style);
342 eina_stringshare_replace(&it->style, item_style); 341 elm_wdg_item_style_set(efl_super(EO_OBJ(it), ELM_NAVIFRAME_ITEM_CLASS), item_style);
343 } 342 }
344 343
345 if (!elm_layout_theme_set(VIEW(it), "naviframe", buf, 344 if (!elm_layout_theme_set(VIEW(it), "naviframe", buf,
@@ -403,7 +402,7 @@ _elm_naviframe_efl_ui_widget_theme_apply(Eo *obj, Elm_Naviframe_Data *sd)
403 { 402 {
404 sstyle = efl_ui_widget_style_get(VIEW(it)); 403 sstyle = efl_ui_widget_style_get(VIEW(it));
405 if ((style && sstyle) && strcmp(style, sstyle)) 404 if ((style && sstyle) && strcmp(style, sstyle))
406 _item_style_set(it, it->style); 405 _item_style_set(it, elm_wdg_item_style_get(EO_OBJ(it)));
407 _item_signals_emit(it); 406 _item_signals_emit(it);
408 _item_title_enabled_update(it, EINA_FALSE); 407 _item_title_enabled_update(it, EINA_FALSE);
409 } 408 }
@@ -1880,25 +1879,30 @@ _elm_naviframe_bottom_item_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd)
1880} 1879}
1881 1880
1882EOLIAN static void 1881EOLIAN static void
1883_elm_naviframe_item_style_set(Eo *eo_item EINA_UNUSED, 1882_elm_naviframe_item_elm_widget_item_style_set(Eo *eo_item EINA_UNUSED,
1884 Elm_Naviframe_Item_Data *nit, 1883 Elm_Naviframe_Item_Data *nit,
1885 const char *item_style) 1884 const char *item_style)
1886{ 1885{
1887 if (item_style && !strcmp(item_style, nit->style)) return; 1886 if (item_style && eina_streq(item_style, elm_wdg_item_style_get(EO_OBJ(nit)))) return;
1888 1887
1889 if (!item_style) 1888 if (!item_style)
1890 if (!strcmp("basic", nit->style)) return; 1889 if (eina_streq("basic", elm_wdg_item_style_get(EO_OBJ(nit)))) return;
1891 1890
1892 _item_style_set(nit, item_style); 1891 _item_style_set(nit, item_style);
1893 _item_signals_emit(nit); 1892 _item_signals_emit(nit);
1894 _item_title_enabled_update(nit, EINA_FALSE); 1893 _item_title_enabled_update(nit, EINA_FALSE);
1895} 1894}
1896 1895
1897EOLIAN static const char * 1896EAPI void
1898_elm_naviframe_item_style_get(Eo *eo_item EINA_UNUSED, 1897elm_naviframe_item_style_set(Elm_Object_Item *obj, const char *style)
1899 Elm_Naviframe_Item_Data *nit) 1898{
1899 elm_wdg_item_style_set(obj, style);
1900}
1901
1902EAPI const char *
1903elm_naviframe_item_style_get(const Elm_Object_Item *obj)
1900{ 1904{
1901 return nit->style; 1905 return elm_wdg_item_style_get(obj);
1902} 1906}
1903 1907
1904EINA_DEPRECATED EAPI void 1908EINA_DEPRECATED EAPI void