forked from enlightenment/efl
Edje: Return text defined in EDC in part_text_get
This function was returning only the text defined by part_text_set. This is a behaviour change, as part_text_get() no longer returns NULL if there is a string defined in EDC. But this now means that the actual value displayed on screen can be retrieved by a simple API call. @feature
This commit is contained in:
parent
97422856ce
commit
12146ddea6
|
@ -2278,7 +2278,17 @@ _edje_object_part_text_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
|||
{
|
||||
if (rp->part->type == EDJE_PART_TYPE_TEXT)
|
||||
{
|
||||
return rp->typedata.text->text;
|
||||
Edje_Part_Description_Text *desc;
|
||||
if (rp->typedata.text->text)
|
||||
return rp->typedata.text->text;
|
||||
else
|
||||
{
|
||||
desc = (Edje_Part_Description_Text *) rp->chosen_description;
|
||||
if (desc->text.text.translated)
|
||||
return desc->text.text.translated;
|
||||
else
|
||||
return desc->text.text.str;
|
||||
}
|
||||
}
|
||||
if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue