forked from enlightenment/efl
elementary - send signal "language,changed" with one way in the widget.
Call the smart callback in the widget infra so that each widget don't need to hook the smart_translate only for the smart call. This makes reducing duplicated code and supporting language,chagned from all widgets.
This commit is contained in:
parent
aebdcff513
commit
dbacb2fef9
|
@ -18,12 +18,12 @@ EAPI const char ELM_CTXPOPUP_SMART_NAME[] = "elm_ctxpopup";
|
|||
|
||||
#define ELM_PRIV_CTXPOPUP_SIGNALS(cmd) \
|
||||
cmd(SIG_DISMISSED, "dismissed", "") \
|
||||
cmd(SIG_LANG_CHANGED, "language,changed", "")
|
||||
|
||||
ELM_PRIV_CTXPOPUP_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
|
||||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
ELM_PRIV_CTXPOPUP_SIGNALS(ELM_PRIV_SMART_CALLBACKS_DESC)
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
|
|
|
@ -18,26 +18,18 @@ EAPI Eo_Op ELM_OBJ_FILESELECTOR_BUTTON_BASE_ID = EO_NOOP;
|
|||
|
||||
#define ELM_PRIV_FILESELECTOR_BUTTON_SIGNALS(cmd) \
|
||||
cmd(SIG_FILE_CHOSEN, "file,chosen", "s") \
|
||||
cmd(SIG_LANG_CHANGED, "language,changed", "")
|
||||
|
||||
ELM_PRIV_FILESELECTOR_BUTTON_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
|
||||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
ELM_PRIV_FILESELECTOR_BUTTON_SIGNALS(ELM_PRIV_SMART_CALLBACKS_DESC)
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**<handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
};
|
||||
#undef ELM_PRIV_FILESELECTOR_BUTTON_SIGNALS
|
||||
|
||||
static void
|
||||
_elm_fileselector_button_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_fileselector_button_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
|
@ -507,7 +499,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_fileselector_button_smart_del),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_fileselector_button_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_fileselector_button_smart_translate),
|
||||
|
||||
EO_OP_FUNC(ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_ADMITS_AUTOREPEAT_GET), _elm_fileselector_button_smart_admits_autorepeat_get),
|
||||
|
||||
|
|
|
@ -31,13 +31,13 @@ EAPI const char ELM_FILESELECTOR_ENTRY_SMART_NAME[] = "elm_fileselector_entry";
|
|||
cmd(SIG_SELECTION_CUT, "selection,cut", "") \
|
||||
cmd(SIG_UNPRESSED, "unpressed", "") \
|
||||
cmd(SIG_FILE_CHOSEN, "file,chosen", "s") \
|
||||
cmd(SIG_LANG_CHANGED, "language,changed", "")
|
||||
|
||||
ELM_PRIV_FILESELECTOR_ENTRY_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
|
||||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] =
|
||||
{
|
||||
ELM_PRIV_FILESELECTOR_ENTRY_SIGNALS(ELM_PRIV_SMART_CALLBACKS_DESC)
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
};
|
||||
#undef ELM_PRIV_FILESELECTOR_ENTRY_SIGNALS
|
||||
|
@ -92,14 +92,6 @@ _ACTIVATED_fwd(void *data,
|
|||
evas_object_smart_callback_call(data, SIG_ACTIVATED, event_info);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_fileselector_entry_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_fileselector_entry_smart_sizing_eval(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||
{
|
||||
|
@ -725,7 +717,6 @@ _class_constructor(Eo_Class *klass)
|
|||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_DISABLE), _elm_fileselector_entry_smart_disable),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_fileselector_entry_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_fileselector_entry_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_fileselector_entry_smart_focus_next_manager_is),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_fileselector_entry_smart_focus_next),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_fileselector_entry_smart_focus_direction_manager_is),
|
||||
|
|
|
@ -23,12 +23,11 @@ static const char CONTENT_PART[] = "elm.swallow.content";
|
|||
|
||||
static const char SIG_BLOCK_CLICKED[] = "block,clicked";
|
||||
static const char SIG_TIMEOUT[] = "timeout";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_BLOCK_CLICKED, ""},
|
||||
{SIG_TIMEOUT, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
|
@ -47,8 +46,6 @@ _elm_popup_smart_translate(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,10 +63,9 @@ static const char *ignore_separators = "()";
|
|||
static Datetime_Mod_Api *dt_mod = NULL;
|
||||
|
||||
static const char SIG_CHANGED[] = "changed";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_CHANGED, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
|
@ -373,8 +372,6 @@ _elm_datetime_smart_translate(Eo *obj, void *_pd, va_list *list)
|
|||
if (!sd->user_format) _reload_format(obj);
|
||||
else _field_list_display(obj);
|
||||
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,10 +24,9 @@ EAPI Eo_Op ELM_OBJ_DAYSELECTOR_BASE_ID = EO_NOOP;
|
|||
#define ITEM_POS_MIDDLE "elm,pos,check,middle"
|
||||
|
||||
static const char SIG_CHANGED[] = "dayselector,changed";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_CHANGED, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
@ -54,7 +53,7 @@ _dayselector_resize(void *data,
|
|||
}
|
||||
|
||||
static void
|
||||
_elm_dayselector_smart_translate(Eo *obj, void *_pd, va_list *list)
|
||||
_elm_dayselector_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_FALSE;
|
||||
|
@ -79,8 +78,6 @@ _elm_dayselector_smart_translate(Eo *obj, void *_pd, va_list *list)
|
|||
elm_object_text_set(VIEW(it), buf);
|
||||
}
|
||||
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
exit:
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ EAPI Eo_Op ELM_OBJ_ENTRY_BASE_ID = EO_NOOP;
|
|||
cmd(SIG_CURSOR_CHANGED_MANUAL, "cursor,changed,manual", "") \
|
||||
cmd(SIG_FOCUSED, "focused", "") \
|
||||
cmd(SIG_UNFOCUSED, "unfocused", "") \
|
||||
cmd(SIG_LANG_CHANGED, "language,changed", "") \
|
||||
cmd(SIG_LONGPRESSED, "longpressed", "") \
|
||||
cmd(SIG_MAX_LENGTH, "maxlength,reached", "") \
|
||||
cmd(SIG_PREEDIT_CHANGED, "preedit,changed", "") \
|
||||
|
@ -59,6 +58,7 @@ ELM_PRIV_ENTRY_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
|
|||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
ELM_PRIV_ENTRY_SIGNALS(ELM_PRIV_SMART_CALLBACKS_DESC)
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
};
|
||||
#undef ELM_PRIV_ENTRY_SIGNALS
|
||||
|
@ -955,15 +955,6 @@ _elm_entry_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_entry_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_entry_smart_on_focus_region(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
|
@ -5842,7 +5833,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_entry_smart_on_focus),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_DISABLE), _elm_entry_smart_disable),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_entry_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_entry_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS_REGION), _elm_entry_smart_on_focus_region),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SUB_OBJECT_DEL), _elm_entry_smart_sub_object_del),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACTIVATE), _elm_entry_smart_activate),
|
||||
|
|
|
@ -67,7 +67,6 @@ EAPI const char ELM_GENGRID_PAN_SMART_NAME[] = "elm_gengrid_pan";
|
|||
cmd(SIG_INDEX_UPDATE, "index,update", "") \
|
||||
cmd(SIG_HIGHLIGHTED, "highlighted", "") \
|
||||
cmd(SIG_UNHIGHLIGHTED, "unhighlighted", "") \
|
||||
cmd(SIG_LANG_CHANGED, "language,changed", "") \
|
||||
cmd(SIG_PRESSED, "pressed", "") \
|
||||
cmd(SIG_RELEASED, "released", "")
|
||||
|
||||
|
@ -75,6 +74,7 @@ ELM_PRIV_GENGRID_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
|
|||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
ELM_PRIV_GENGRID_SIGNALS(ELM_PRIV_SMART_CALLBACKS_DESC)
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
|
||||
|
@ -82,15 +82,6 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
};
|
||||
#undef ELM_PRIV_GENGRID_SIGNALS
|
||||
|
||||
static void
|
||||
_elm_gengrid_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_item_show_region(void *data)
|
||||
{
|
||||
|
@ -4085,7 +4076,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_gengrid_smart_focus_next),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACCESS), _elm_gengrid_smart_access),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_gengrid_smart_focus_direction_manager_is),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_gengrid_smart_translate),
|
||||
|
||||
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_gengrid_smart_sizing_eval),
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@ EAPI Eo_Op ELM_OBJ_GENLIST_BASE_ID = EO_NOOP;
|
|||
cmd(SIG_TREE_EFFECT_FINISHED , "tree,effect,finished", "") \
|
||||
cmd(SIG_HIGHLIGHTED, "highlighted", "") \
|
||||
cmd(SIG_UNHIGHLIGHTED, "unhighlighted", "") \
|
||||
cmd(SIG_LANG_CHANGED, "language,changed", "") \
|
||||
cmd(SIG_PRESSED, "pressed", "") \
|
||||
cmd(SIG_RELEASED, "released", "")
|
||||
|
||||
|
@ -94,6 +93,7 @@ ELM_PRIV_GENLIST_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
|
|||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
ELM_PRIV_GENLIST_SIGNALS(ELM_PRIV_SMART_CALLBACKS_DESC)
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
|
||||
|
@ -2825,15 +2825,6 @@ _show_region_hook(void *data EINA_UNUSED,
|
|||
eo_do(obj, elm_scrollable_interface_content_region_show(x, y, w, h));
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_genlist_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_item_highlight(Elm_Gen_Item *it)
|
||||
{
|
||||
|
@ -7594,7 +7585,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _elm_genlist_smart_move),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_genlist_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_genlist_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_genlist_smart_event),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_genlist_smart_on_focus),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SUB_OBJECT_ADD), _elm_genlist_smart_sub_object_add),
|
||||
|
|
|
@ -22,19 +22,10 @@ static const char SIG_LANG_CHANGED[] = "language,changed";
|
|||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_FOCUSED, ""},
|
||||
{SIG_UNFOCUSED, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_glview_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_glview_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
|
@ -576,7 +567,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _elm_glview_smart_resize),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_glview_smart_on_focus),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_glview_smart_translate),
|
||||
|
||||
EO_OP_FUNC(ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_GL_API_GET), _gl_api_get),
|
||||
EO_OP_FUNC(ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_MODE_SET), _mode_set),
|
||||
|
|
|
@ -23,7 +23,6 @@ static const char SIG_DELAY_CHANGED[] = "delay,changed";
|
|||
static const char SIG_SELECTED[] = "selected";
|
||||
static const char SIG_LEVEL_UP[] = "level,up";
|
||||
static const char SIG_LEVEL_DOWN[] = "level,down";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_CHANGED, ""},
|
||||
|
@ -31,20 +30,12 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{SIG_SELECTED, ""},
|
||||
{SIG_LEVEL_UP, ""},
|
||||
{SIG_LEVEL_DOWN, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_index_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_item_free(Elm_Index_Item *it)
|
||||
{
|
||||
|
@ -1747,7 +1738,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_index_smart_focus_next),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACCESS), _elm_index_smart_access),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_index_smart_focus_direction_manager_is),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_index_smart_translate),
|
||||
|
||||
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_index_smart_sizing_eval),
|
||||
|
||||
|
|
|
@ -16,10 +16,9 @@ EAPI Eo_Op ELM_OBJ_LABEL_BASE_ID = EO_NOOP;
|
|||
#define MY_CLASS_NAME_LEGACY "elm_label"
|
||||
|
||||
static const char SIG_SLIDE_END[] = "slide,end";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_SLIDE_END, ""},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
@ -344,15 +343,6 @@ _elm_label_smart_text_set(Eo *obj, void *_pd, va_list *list)
|
|||
if (ret) *ret = int_ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_label_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static char *
|
||||
_access_info_cb(void *data EINA_UNUSED, Evas_Object *obj)
|
||||
{
|
||||
|
@ -734,7 +724,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_label_smart_add),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_label_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_label_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_label_smart_focus_next_manager_is),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_label_smart_focus_direction_manager_is),
|
||||
|
||||
|
|
|
@ -15,12 +15,11 @@ EAPI Eo_Op ELM_OBJ_LAYOUT_BASE_ID = EO_NOOP;
|
|||
#define MY_CLASS_NAME_LEGACY "elm_layout"
|
||||
|
||||
static const char SIG_THEME_CHANGED[] = "theme,changed";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
|
||||
/* smart callbacks coming from elm layout objects: */
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_THEME_CHANGED, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
@ -70,14 +69,6 @@ struct _Elm_Layout_Sub_Object_Cursor
|
|||
Eina_Bool engine_only : 1;
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_layout_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_on_sub_object_size_hint_change(void *data,
|
||||
Evas *e EINA_UNUSED,
|
||||
|
@ -2263,7 +2254,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_layout_smart_on_focus),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_DISABLE), _elm_layout_smart_disable),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_layout_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_layout_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_layout_smart_focus_next_manager_is),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_layout_smart_focus_next),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_layout_smart_focus_direction_manager_is),
|
||||
|
|
|
@ -24,7 +24,6 @@ static const char SIG_EDGE_TOP[] = "edge,top";
|
|||
static const char SIG_EDGE_BOTTOM[] = "edge,bottom";
|
||||
static const char SIG_EDGE_LEFT[] = "edge,left";
|
||||
static const char SIG_EDGE_RIGHT[] = "edge,right";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
static const char SIG_SWIPE[] = "swipe";
|
||||
static const char SIG_HIGHLIGHTED[] = "highlighted";
|
||||
static const char SIG_UNHIGHLIGHTED[] = "unhighlighted";
|
||||
|
@ -38,10 +37,10 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{SIG_EDGE_BOTTOM, ""},
|
||||
{SIG_EDGE_LEFT, ""},
|
||||
{SIG_EDGE_RIGHT, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_SWIPE, ""},
|
||||
{SIG_HIGHLIGHTED, ""},
|
||||
{SIG_UNHIGHLIGHTED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
|
@ -437,7 +436,7 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
|
|||
}
|
||||
|
||||
static void
|
||||
_elm_list_smart_translate(Eo *obj, void *_pd, va_list *list)
|
||||
_elm_list_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_List_Smart_Data *sd = _pd;
|
||||
|
@ -447,8 +446,6 @@ _elm_list_smart_translate(Eo *obj, void *_pd, va_list *list)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -310,7 +310,6 @@ static const char SIG_NAME_LOADED[] = "name,loaded";
|
|||
static const char SIG_NAME_LOADED_FAIL[] = "name,loaded,fail";
|
||||
static const char SIG_OVERLAY_CLICKED[] = "overlay,clicked";
|
||||
static const char SIG_OVERLAY_DEL[] = "overlay,del";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_CLICKED, ""},
|
||||
|
@ -337,20 +336,12 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{SIG_NAME_LOADED_FAIL, ""},
|
||||
{SIG_OVERLAY_CLICKED, ""},
|
||||
{SIG_OVERLAY_DEL, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_map_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_edj_overlay_size_get(Elm_Map_Smart_Data *sd,
|
||||
Evas_Coord *w,
|
||||
|
@ -5996,7 +5987,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_map_smart_on_focus),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_map_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_map_smart_event),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_map_smart_translate),
|
||||
|
||||
EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_SET), _zoom_set),
|
||||
EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_GET), _zoom_get),
|
||||
|
|
|
@ -489,6 +489,7 @@ extern int _elm_win_deferred_free;
|
|||
extern const char *_elm_preferred_engine;
|
||||
extern const char SIG_WIDGET_FOCUSED[];
|
||||
extern const char SIG_WIDGET_UNFOCUSED[];
|
||||
extern const char SIG_WIDGET_LANG_CHANGED[];
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
/* Our gettext wrapper, used to disable translation of elm if the app
|
||||
|
|
|
@ -23,27 +23,18 @@ static const char SIG_CHANGED[] = "changed";
|
|||
static const char SIG_DRAG_START[] = "spinner,drag,start";
|
||||
static const char SIG_DRAG_STOP[] = "spinner,drag,stop";
|
||||
static const char SIG_DELAY_CHANGED[] = "delay,changed";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_CHANGED, ""},
|
||||
{SIG_DELAY_CHANGED, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_DRAG_START, ""},
|
||||
{SIG_DRAG_STOP, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_elm_spinner_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_entry_show(Elm_Spinner_Smart_Data *sd)
|
||||
{
|
||||
|
@ -1292,7 +1283,6 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_spinner_smart_del),
|
||||
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_spinner_smart_theme),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_spinner_smart_translate),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_spinner_smart_on_focus),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_spinner_smart_event),
|
||||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_spinner_smart_focus_next_manager_is),
|
||||
|
|
|
@ -25,7 +25,6 @@ static const char SIG_SCROLL_DRAG_STOP[] = "scroll,drag,stop";
|
|||
static const char SIG_CLICKED[] = "clicked";
|
||||
static const char SIG_LONGPRESSED[] = "longpressed";
|
||||
static const char SIG_CLICKED_DOUBLE[] = "clicked,double";
|
||||
static const char SIG_LANG_CHANGED[] = "language,changed";
|
||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||
{SIG_SCROLL, ""},
|
||||
{SIG_SCROLL_ANIM_START, ""},
|
||||
|
@ -35,7 +34,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{SIG_CLICKED, ""},
|
||||
{SIG_LONGPRESSED, ""},
|
||||
{SIG_CLICKED_DOUBLE, ""},
|
||||
{SIG_LANG_CHANGED, ""},
|
||||
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
||||
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
||||
{NULL, NULL}
|
||||
|
@ -1384,7 +1383,7 @@ _item_content_unset_hook(Elm_Object_Item *it,
|
|||
}
|
||||
|
||||
static void
|
||||
_elm_toolbar_smart_translate(Eo *obj, void *_pd, va_list *list)
|
||||
_elm_toolbar_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Toolbar_Smart_Data *sd = _pd;
|
||||
|
@ -1393,8 +1392,6 @@ _elm_toolbar_smart_translate(Eo *obj, void *_pd, va_list *list)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ EAPI Eo_Op ELM_WIDGET_BASE_ID = EO_NOOP;
|
|||
|
||||
const char SIG_WIDGET_FOCUSED[] = "focused";
|
||||
const char SIG_WIDGET_UNFOCUSED[] = "unfocused";
|
||||
const char SIG_WIDGET_LANG_CHANGED[] = "language,changed";
|
||||
|
||||
typedef struct _Elm_Event_Cb_Data Elm_Event_Cb_Data;
|
||||
typedef struct _Elm_Label_Data Elm_Label_Data;
|
||||
|
@ -4129,6 +4130,7 @@ _elm_widget_translate(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list
|
|||
sd->on_translate = EINA_FALSE;
|
||||
}
|
||||
#endif
|
||||
evas_object_smart_callback_call(obj, SIG_WIDGET_LANG_CHANGED, NULL);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
Loading…
Reference in New Issue