forked from enlightenment/efl
widget: Fix translation of default text parts
Note: fileselector uses this translation API Ref T5363
This commit is contained in:
parent
5f96c6fb4b
commit
c9f51e450b
|
@ -1,5 +1,5 @@
|
|||
class Efl.Ui.Button (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Ui.Autorepeat, Efl.Text,
|
||||
Elm.Interface.Atspi_Widget_Action)
|
||||
Elm.Interface.Atspi_Widget_Action, Efl.Ui.Translatable)
|
||||
{
|
||||
[[Push-button widget
|
||||
|
||||
|
@ -25,5 +25,6 @@ class Efl.Ui.Button (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Ui.Autorepeat, Efl.Tex
|
|||
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
||||
Efl.Part.part;
|
||||
Efl.Text.text { get; set; }
|
||||
Efl.Ui.Translatable.translatable_text { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class Efl.Ui.Frame (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Text)
|
||||
class Efl.Ui.Frame (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Text,
|
||||
Efl.Ui.Translatable)
|
||||
{
|
||||
[[Frame widget
|
||||
|
||||
|
@ -61,5 +62,6 @@ class Efl.Ui.Frame (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Text)
|
|||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Efl.Text.text { get; set; }
|
||||
Efl.Ui.Translatable.translatable_text { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ type slider_func_type: __undefined_type; [[Elementary slider function type]]
|
|||
type slider_freefunc_type: __undefined_type; [[Elementary slider free function type]]
|
||||
|
||||
class Efl.Ui.Slider (Efl.Ui.Layout, Efl.Ui.Range, Efl.Ui.Direction,
|
||||
Efl.Access.Value, Efl.Text,
|
||||
Efl.Access.Value, Efl.Text, Efl.Ui.Translatable,
|
||||
Elm.Interface.Atspi_Widget_Action)
|
||||
{
|
||||
[[Elementary slider class]]
|
||||
|
@ -130,6 +130,7 @@ class Efl.Ui.Slider (Efl.Ui.Layout, Efl.Ui.Range, Efl.Ui.Direction,
|
|||
Efl.Access.Value.increment { get; }
|
||||
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
||||
Efl.Text.text { get; set; }
|
||||
Efl.Ui.Translatable.translatable_text { get; set; }
|
||||
}
|
||||
events {
|
||||
changed; [[Called when slider changed]]
|
||||
|
|
|
@ -747,6 +747,21 @@ ELM_PART_OVERRIDE_CONTENT_SET(elm_notify, ELM_NOTIFY, Elm_Notify_Data)
|
|||
ELM_PART_OVERRIDE_CONTENT_GET(elm_notify, ELM_NOTIFY, Elm_Notify_Data)
|
||||
ELM_PART_OVERRIDE_CONTENT_UNSET(elm_notify, ELM_NOTIFY, Elm_Notify_Data)
|
||||
ELM_PART_CONTENT_DEFAULT_SET(elm_notify, "default")
|
||||
|
||||
EOLIAN static const char *
|
||||
_elm_notify_part_efl_ui_translatable_translatable_text_get(Eo *obj, void *_pd EINA_UNUSED, const char **domain)
|
||||
{
|
||||
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
|
||||
return elm_widget_part_translatable_text_get(pd->obj, pd->part, domain);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_notify_part_efl_ui_translatable_translatable_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *label, const char *domain)
|
||||
{
|
||||
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
|
||||
elm_widget_part_translatable_text_set(pd->obj, pd->part, label, domain);
|
||||
}
|
||||
|
||||
#include "elm_notify_part.eo.c"
|
||||
|
||||
/* Efl.Part end */
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
class Elm.Notify.Part (Efl.Ui.Widget.Part, Efl.Container, Efl.Text)
|
||||
class Elm.Notify.Part (Efl.Ui.Widget.Part, Efl.Container, Efl.Text,
|
||||
Efl.Ui.Translatable)
|
||||
{
|
||||
[[Elementary notification internel part class]]
|
||||
data: null;
|
||||
implements {
|
||||
Efl.Text.text { get; set; }
|
||||
Efl.Ui.Translatable.translatable_text { get; set; }
|
||||
Efl.Container.content { get; set; }
|
||||
Efl.Container.content_unset;
|
||||
}
|
||||
|
|
|
@ -150,6 +150,16 @@ EOLIAN static const char * \
|
|||
_ ## type ## _efl_text_text_get(Eo *obj, Type *pd EINA_UNUSED) \
|
||||
{ \
|
||||
return efl_text_get(efl_part(efl_super(obj, MY_CLASS), "elm.text")); \
|
||||
} \
|
||||
EOLIAN static void \
|
||||
_ ## type ## _efl_ui_translatable_translatable_text_set(Eo *obj, Type *pd EINA_UNUSED, const char *label, const char *domain) \
|
||||
{ \
|
||||
efl_ui_translatable_text_set(efl_part(efl_super(obj, MY_CLASS), "elm.text"), label, domain); \
|
||||
} \
|
||||
EOLIAN static const char * \
|
||||
_ ## type ## _efl_ui_translatable_translatable_text_get(Eo *obj, Type *pd EINA_UNUSED, const char **domain) \
|
||||
{ \
|
||||
return efl_ui_translatable_text_get(efl_part(efl_super(obj, MY_CLASS), "elm.text"), domain); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue