elementary: add support for default property on item being created by Efl.Ui.Widget_Factory.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10129
This commit is contained in:
Cedric Bail 2019-09-24 17:13:49 -07:00
parent a4597c8326
commit 78ee2ca6b0
1 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,8 @@ struct _Efl_Ui_Widget_Factory_Data
Eina_Hash *parts;
Eina_Stringshare *default_property;
Eina_Stringshare *style;
};
@ -182,6 +184,9 @@ _efl_ui_widget_factory_releasing(void *data, const Efl_Event *ev)
efl_key_data_set(ui_view, "efl.ui.widget.factory.size_check", NULL);
if (efl_isa(ui_view, EFL_UI_ITEM_CLASS)) efl_ui_item_calc_locked_set(ui_view, EINA_TRUE);
// Bind default property
if (pd->default_property) efl_ui_property_bind(ui_view, NULL, pd->default_property);
// Bind all property before the object is finalize
it = eina_hash_iterator_data_new(pd->parts);
EINA_ITERATOR_FOREACH(it, bpd)
@ -405,6 +410,12 @@ _efl_ui_property_bind_part_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSE
return ENOENT;
}
if (!key)
{
eina_stringshare_replace(&pd->pd->default_property, property);
return;
}
if (!pd->pd->parts)
pd->pd->parts = eina_hash_stringshared_new(NULL);