forked from enlightenment/efl
elemenatry/navifrmae - killed 2 more apis.
elm_naviframe_item_style_default_set elm_nvaiframe_item_style_default_get SVN revision: 68990
This commit is contained in:
parent
005f2465d9
commit
c652e37c6e
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -383,30 +383,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.
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue