From: hermet Date: Wed, 7 Mar 2012 16:15:17 +0000 (+0000) Subject: elemenatry/navifrmae - killed 2 more apis. X-Git-Tag: REL_F_I9500_20120323_1~17^2~183 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=243667144d9dc90262cb680414665043147f3272;p=framework%2Fuifw%2Felementary.git elemenatry/navifrmae - killed 2 more apis. elm_naviframe_item_style_default_set elm_nvaiframe_item_style_default_get git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68990 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index 2648eb6..f69b4e8 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -13,7 +13,6 @@ struct _Widget_Data Eina_Bool preserve: 1; Eina_Bool auto_pushed: 1; Eina_Bool freeze_events: 1; - Eina_Stringshare *item_style; }; struct _Elm_Naviframe_Content_Item_Pair @@ -195,7 +194,6 @@ _del_hook(Evas_Object *obj) if (!wd->stack) break; } } - eina_stringshare_del(wd->item_style); free(wd); } @@ -947,14 +945,13 @@ _item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style) Elm_Naviframe_Content_Item_Pair *content_pair; Elm_Naviframe_Text_Item_Pair *text_pair; Widget_Data *wd; - wd = elm_widget_data_get(WIDGET(navi_it)); - if (!wd) return; char buf[256]; if (!item_style) { - snprintf(buf, sizeof(buf), "item/%s", wd->item_style); + strcpy(buf, "item/basic"); + eina_stringshare_replace(&navi_it->style, "basic"); } else { @@ -993,6 +990,9 @@ _item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style) // navi_it->title_visible = EINA_TRUE; _sizing_eval(WIDGET(navi_it)); + wd = elm_widget_data_get(WIDGET(navi_it)); + if (!wd) return; + if (wd->freeze_events) evas_object_freeze_events_set(VIEW(navi_it), EINA_FALSE); } @@ -1116,7 +1116,6 @@ elm_naviframe_add(Evas_Object *parent) wd->auto_pushed = EINA_TRUE; wd->freeze_events = EINA_TRUE; - wd->item_style = eina_stringshare_add("basic"); return obj; } @@ -1400,12 +1399,11 @@ elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style) ELM_OBJ_ITEM_CHECK_OR_RETURN(it); Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it; - //Return if new style is exsiting one. - if ((item_style && navi_it->style) && (!strcmp(item_style, navi_it->style))) - return; + if (item_style) + if (!strcmp(item_style, navi_it->style)) return; - if ((!item_style) && (!navi_it->style)) - return; + if (!item_style) + if (!strcmp("basic", navi_it->style)) return; _item_style_set(navi_it, item_style); } @@ -1489,22 +1487,3 @@ elm_naviframe_event_enabled_get(const Evas_Object *obj) if (!wd) return EINA_FALSE; return !wd->freeze_events; } - -EAPI void -elm_naviframe_item_style_default_set(Evas_Object *obj, const char *style) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - eina_stringshare_replace(&wd->item_style, style); - _theme_hook(obj); -} - -EAPI const char * -elm_naviframe_item_style_default_get(const Evas_Object *obj) -{ - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return NULL; - return wd->item_style; -} diff --git a/src/lib/elc_naviframe.h b/src/lib/elc_naviframe.h index 063b9eb..ab8efb6 100644 --- a/src/lib/elc_naviframe.h +++ b/src/lib/elc_naviframe.h @@ -384,30 +384,6 @@ EAPI void elm_naviframe_event_enabled_set(Evas_Object *obj, Eina_Boo EAPI Eina_Bool elm_naviframe_event_enabled_get(const Evas_Object *obj); /** - * @brief Set the default item style. - * - * Default item style will be used with items who's style is NULL - * - * @param obj The naviframe object - * @param style The style - * - * @ingroup Naviframe - */ -EAPI void elm_naviframe_item_style_default_set(Evas_Object *obj, const char *style); - -/** - * @brief Get the default item style - * - * @param obj The naviframe object - * @return the default item style - * - * @see elm_naviframe_item_style_default_set() - * - * @ingroup Naviframe - */ -EAPI const char *elm_naviframe_item_style_default_get(const Evas_Object *obj); - -/** * @brief Simple version of item_push. * * @see elm_naviframe_item_push diff --git a/src/lib/elm_pager.c b/src/lib/elm_pager.c index a56acc5..cfdb671 100644 --- a/src/lib/elm_pager.c +++ b/src/lib/elm_pager.c @@ -76,11 +76,11 @@ elm_pager_content_top_get(const Evas_Object *obj) EINA_DEPRECATED EAPI void elm_pager_item_style_default_set(Evas_Object *obj, const char *style) { - elm_naviframe_item_style_default_set(obj, style); + elm_object_style_set(obj, style); } EINA_DEPRECATED EAPI const char * elm_pager_item_style_default_get(const Evas_Object *obj) { - return elm_naviframe_item_style_default_get(obj); + return elm_object_style_get(obj); }