forked from enlightenment/efl
Elm layout: fix a few objects after move to efl_part
Fixes elm_layout_text_set/get bugs that were introduced in
3eb649b180
.
This commit is contained in:
parent
08db4a6caf
commit
ca8a8b712c
|
@ -3192,7 +3192,7 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
if (!entry) entry = "";
|
if (!entry) entry = "";
|
||||||
if (part)
|
if (part && strcmp(part, "elm.text"))
|
||||||
{
|
{
|
||||||
if (!strcmp(part, "guide"))
|
if (!strcmp(part, "guide"))
|
||||||
edje_object_part_text_set(sd->entry_edje, "elm.guide", entry);
|
edje_object_part_text_set(sd->entry_edje, "elm.guide", entry);
|
||||||
|
@ -3244,7 +3244,7 @@ _elm_entry_text_get(Eo *obj, Elm_Entry_Data *sd, const char *item)
|
||||||
|
|
||||||
if (item)
|
if (item)
|
||||||
{
|
{
|
||||||
if (!strcmp(item, "default")) goto proceed;
|
if (!strcmp(item, "default") || strcmp(item, "elm.text")) goto proceed;
|
||||||
else if (!strcmp(item, "guide"))
|
else if (!strcmp(item, "guide"))
|
||||||
{
|
{
|
||||||
return edje_object_part_text_get(sd->entry_edje, "elm.guide");
|
return edje_object_part_text_get(sd->entry_edje, "elm.guide");
|
||||||
|
@ -4147,7 +4147,7 @@ elm_entry_entry_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
ELM_ENTRY_CHECK(obj) NULL;
|
ELM_ENTRY_CHECK(obj) NULL;
|
||||||
const char *text = NULL;
|
const char *text = NULL;
|
||||||
text = efl_text_get(efl_part(efl_super(obj, MY_CLASS), "elm.text"));
|
text = efl_text_get(efl_part(obj, "elm.text"));
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2318,6 +2318,10 @@ 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'))
|
||||||
|
{
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
@ -2325,6 +2329,10 @@ elm_layout_text_set(Elm_Layout *obj, const char *part, const char *text)
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
elm_layout_text_get(const Elm_Layout *obj, const char *part)
|
elm_layout_text_get(const Elm_Layout *obj, const char *part)
|
||||||
{
|
{
|
||||||
|
if (!part || (*part == '\0'))
|
||||||
|
{
|
||||||
|
part = "elm.text";
|
||||||
|
}
|
||||||
return efl_text_get(efl_part(obj, part));
|
return efl_text_get(efl_part(obj, part));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue