forked from enlightenment/efl
Elm layout: fix broken text part name resolving
This adds a few workaround to overcome the efl_part port. Quite a few layouts got broken in some specific cases.
This commit is contained in:
parent
944a4065e8
commit
c0e4a218dd
|
@ -1523,7 +1523,7 @@ _elm_multibuttonentry_text_set(Eo *obj, Elm_Multibuttonentry_Data *sd EINA_UNUSE
|
||||||
{
|
{
|
||||||
Eina_Bool int_ret = EINA_TRUE;
|
Eina_Bool int_ret = EINA_TRUE;
|
||||||
|
|
||||||
if (!part || !strcmp(part, "default"))
|
if (!part || !strcmp(part, "default") || !strcmp(part, "elm.text"))
|
||||||
{
|
{
|
||||||
if (label) _label_set(obj, label);
|
if (label) _label_set(obj, label);
|
||||||
int_ret = EINA_TRUE;
|
int_ret = EINA_TRUE;
|
||||||
|
|
|
@ -1062,7 +1062,7 @@ _elm_popup_text_set(Eo *obj, Elm_Popup_Data *_pd, const char *part, const char *
|
||||||
{
|
{
|
||||||
Eina_Bool int_ret = EINA_FALSE;
|
Eina_Bool int_ret = EINA_FALSE;
|
||||||
|
|
||||||
if (!part || !strcmp(part, "default"))
|
if (!part || !strcmp(part, "default") || !strcmp(part, "elm.text"))
|
||||||
int_ret = _content_text_set(obj, label);
|
int_ret = _content_text_set(obj, label);
|
||||||
else if (!strcmp(part, "title,text"))
|
else if (!strcmp(part, "title,text"))
|
||||||
int_ret = _title_text_set(obj, label);
|
int_ret = _title_text_set(obj, label);
|
||||||
|
|
|
@ -457,6 +457,8 @@ _elm_actionslider_text_set(Eo *obj, Elm_Actionslider_Data *_pd EINA_UNUSED, cons
|
||||||
Eina_Bool int_ret = EINA_TRUE;
|
Eina_Bool int_ret = EINA_TRUE;
|
||||||
|
|
||||||
_mirrored_part_fix(obj, &part);
|
_mirrored_part_fix(obj, &part);
|
||||||
|
|
||||||
|
if (!part || !strcmp(part, "elm.text")) part = _text_aliases[0].real_part;
|
||||||
efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), text);
|
efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), text);
|
||||||
|
|
||||||
return int_ret;
|
return int_ret;
|
||||||
|
@ -469,6 +471,7 @@ _elm_actionslider_text_get(Eo *obj, Elm_Actionslider_Data *_pd EINA_UNUSED, cons
|
||||||
|
|
||||||
_mirrored_part_fix(obj, &part);
|
_mirrored_part_fix(obj, &part);
|
||||||
|
|
||||||
|
if (!part) part = _text_aliases[0].real_part;
|
||||||
text = efl_text_get(efl_part(efl_super(obj, MY_CLASS), part));
|
text = efl_text_get(efl_part(efl_super(obj, MY_CLASS), part));
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
|
|
|
@ -121,6 +121,7 @@ _elm_bubble_text_set(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, const char *part
|
||||||
{
|
{
|
||||||
Eina_Bool int_ret = EINA_TRUE;
|
Eina_Bool int_ret = EINA_TRUE;
|
||||||
|
|
||||||
|
if (!part) part = _text_aliases[0].real_part;
|
||||||
efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), label);
|
efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), label);
|
||||||
if (!int_ret) return EINA_FALSE;
|
if (!int_ret) return EINA_FALSE;
|
||||||
|
|
||||||
|
|
|
@ -348,6 +348,7 @@ _elm_label_text_set(Eo *obj, Elm_Label_Data *sd, const char *part, const char *l
|
||||||
if (!label) label = "";
|
if (!label) label = "";
|
||||||
_label_format_set(wd->resize_obj, sd->format);
|
_label_format_set(wd->resize_obj, sd->format);
|
||||||
|
|
||||||
|
if (!part) part = _text_aliases[0].real_part;
|
||||||
efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), label);
|
efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), label);
|
||||||
|
|
||||||
if (int_ret)
|
if (int_ret)
|
||||||
|
|
|
@ -2325,10 +2325,7 @@ elm_layout_table_clear(Elm_Layout *obj, const char *part, Eina_Bool clear)
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_layout_text_set(Elm_Layout *obj, const char *part, const char *text)
|
elm_layout_text_set(Elm_Layout *obj, const char *part, const char *text)
|
||||||
{
|
{
|
||||||
if (!part || (*part == '\0'))
|
if (!part) part = "elm.text";
|
||||||
{
|
|
||||||
part = "elm.text";
|
|
||||||
}
|
|
||||||
efl_text_set(efl_part(obj, part), text);
|
efl_text_set(efl_part(obj, part), text);
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue