forked from enlightenment/efl
elementary/ctxpopup, hoversel, naviframe, multibuttonentry, popup, diskselector, list, menu, segment_control, toolbar - support widget item language change
This commit is contained in:
parent
5153124045
commit
ff10726141
|
@ -1282,3 +1282,8 @@
|
|||
|
||||
* Fix the scrolled entry in scroller is located wrong position when the cursor is changed.
|
||||
It is a scroller in scroller. In this case, it moved twice.
|
||||
|
||||
2013-04-23 ChunEon Park
|
||||
|
||||
* Support language change for widget items (Ctxpopup, Hoversel, Naviframe, Diskselector, List,
|
||||
Menu, Segment_Control, Toolbar, Popup, MultibuttonEntry)
|
||||
|
|
|
@ -99,10 +99,10 @@ Improvements:
|
|||
* Naviframe works for H/W Back key event.
|
||||
* Naviframe is now supproting focus_direction.
|
||||
* Scroller decides whether the accelerator is on or not, depending on the velocity and the interval time of the flick event.
|
||||
* Ctxpopup is now supproting focus_direction.
|
||||
* Ctxpopup is now supproting focus_direction.
|
||||
* Don't try to pop the naviframe item multiple times.
|
||||
|
||||
Fixes:
|
||||
* Support language change for widget items (Ctxpopup, Hoversel, Naviframe, Diskselector, List, Menu, Segment_Control, Toolbar, Popup, MultibuttonEntry)
|
||||
Fixes:
|
||||
|
||||
* Now elm_datetime_field_limit_set() can set year limits wihtout problems.
|
||||
* Fix re-order animation when it doesn't end correctly.
|
||||
|
|
|
@ -20,11 +20,18 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
};
|
||||
|
||||
static void
|
||||
_elm_ctxpopup_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
_elm_ctxpopup_smart_translate(Eo *obj, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Ctxpopup_Smart_Data *sd = _pd;
|
||||
Eina_List *l;
|
||||
Elm_Ctxpopup_Item *it;
|
||||
|
||||
evas_object_hide(obj);
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,20 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_hoversel_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Hoversel_Smart_Data *sd = _pd;
|
||||
Elm_Hoversel_Item *it;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_hoversel_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
|
@ -544,6 +558,7 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_HIDE), _elm_hoversel_smart_hide),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_hoversel_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_hoversel_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_PARENT_SET), _elm_hoversel_smart_parent_set),
|
||||
|
||||
EO_OP_FUNC(ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_ADMITS_AUTOREPEAT_GET), _elm_hoversel_smart_admits_autorepeat_get),
|
||||
|
|
|
@ -36,6 +36,20 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_multibuttonentry_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Multibuttonentry_Smart_Data *sd = _pd;
|
||||
Elm_Multibuttonentry_Item *it;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_multibuttonentry_smart_theme(Eo *obj, void *_pd, va_list *list)
|
||||
{
|
||||
|
@ -2178,6 +2192,7 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_multibuttonentry_smart_del),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_multibuttonentry_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_multibuttonentry_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_multibuttonentry_smart_event),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_multibuttonentry_smart_on_focus),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_multibuttonentry_smart_focus_next_manager_is),
|
||||
|
|
|
@ -29,6 +29,19 @@ static const char SIG_CLICKED[] = "clicked";
|
|||
|
||||
static void _on_item_back_btn_clicked(void *data, Evas_Object *obj, void *event_info __UNUSED__);
|
||||
|
||||
static void
|
||||
_elm_naviframe_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Naviframe_Smart_Data *sd = _pd;
|
||||
Elm_Naviframe_Item *it;
|
||||
|
||||
EINA_INLIST_FOREACH(sd->stack, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_item_content_del_cb(void *data,
|
||||
Evas *e __UNUSED__,
|
||||
|
@ -2014,6 +2027,7 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION), _elm_naviframe_smart_focus_direction),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_naviframe_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_naviframe_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACCESS), _elm_naviframe_smart_access),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_naviframe_smart_event),
|
||||
|
||||
|
|
|
@ -26,6 +26,20 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
|
||||
static void _on_content_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
|
||||
static void
|
||||
_elm_popup_smart_translate(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Popup_Smart_Data *sd = _pd;
|
||||
Elm_Popup_Item *it;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_visuals_set(Evas_Object *obj)
|
||||
{
|
||||
|
@ -1857,6 +1871,7 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_PARENT_SET), _elm_popup_smart_parent_set),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_popup_smart_event),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_popup_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_popup_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_popup_smart_focus_next_manager_is),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_popup_smart_focus_next),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACCESS), _elm_popup_smart_access),
|
||||
|
|
|
@ -36,6 +36,20 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_diskselector_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Diskselector_Smart_Data *sd = _pd;
|
||||
Elm_Diskselector_Item *it;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_selected_item_indicate(Elm_Diskselector_Item *it)
|
||||
{
|
||||
|
@ -1968,6 +1982,7 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _elm_diskselector_smart_move),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_diskselector_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_diskselector_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_diskselector_smart_event),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_diskselector_smart_on_focus),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SUB_OBJECT_DEL), _elm_diskselector_smart_sub_object_del),
|
||||
|
|
|
@ -360,9 +360,16 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
|
|||
}
|
||||
|
||||
static void
|
||||
_elm_list_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
_elm_list_smart_translate(Eo *obj, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_List_Smart_Data *sd = _pd;
|
||||
Elm_List_Item *it;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
|
|
|
@ -14,6 +14,20 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_menu_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Menu_Smart_Data *sd = _pd;
|
||||
Elm_Menu_Item *it;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_item_del(Elm_Menu_Item *item)
|
||||
{
|
||||
|
@ -1268,6 +1282,7 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_SHOW), _elm_menu_smart_show),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_menu_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_menu_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_PARENT_SET), _parent_set),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_PARENT_GET), _parent_get),
|
||||
|
||||
|
|
|
@ -14,6 +14,20 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_segment_control_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Segment_Control_Smart_Data *sd = _pd;
|
||||
Elm_Segment_Item *it;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_segment_control_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||
{
|
||||
|
@ -936,6 +950,7 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_segment_control_smart_del),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_segment_control_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_segment_control_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_DISABLE), _elm_segment_control_smart_disable),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_segment_control_smart_focus_next_manager_is),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_segment_control_smart_focus_next),
|
||||
|
|
|
@ -1361,9 +1361,15 @@ _item_content_unset_hook(Elm_Object_Item *it,
|
|||
}
|
||||
|
||||
static void
|
||||
_elm_toolbar_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
_elm_toolbar_smart_translate(Eo *obj, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Toolbar_Smart_Data *sd = _pd;
|
||||
Elm_Toolbar_Item *it;
|
||||
|
||||
EINA_INLIST_FOREACH(sd->items, it)
|
||||
elm_widget_item_translate(it);
|
||||
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
|
|
Loading…
Reference in New Issue