forked from enlightenment/efl
elementary: enforce Efl.IoModel as a base type for fileselector.
On the long run, we might just want to have an Efl.Model dedicated to be used by fileselector and inherit Efl.IoModel from it. At the moment, we don't, but I think it is still best to rely on this assumption to make the fileselector code simpler. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8654
This commit is contained in:
parent
3701a57dc4
commit
f836dd0c22
|
@ -2115,6 +2115,8 @@ _elm_fileselector_path_set_internal(Evas_Object *obj, const char *_path)
|
|||
EOLIAN static void
|
||||
_elm_fileselector_efl_ui_view_model_set(Eo *obj, Elm_Fileselector_Data *sd EINA_UNUSED, Efl_Model *model)
|
||||
{
|
||||
if (!efl_isa(model, EFL_IO_MODEL_CLASS))
|
||||
return ;
|
||||
_populate(obj, model, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -351,6 +351,9 @@ _elm_fileselector_button_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Elm_Filesele
|
|||
{
|
||||
char *file = NULL;
|
||||
|
||||
if (!efl_isa(model, EFL_IO_MODEL_CLASS))
|
||||
return ;
|
||||
|
||||
efl_replace(&sd->fsd.model, model);
|
||||
|
||||
if (model)
|
||||
|
|
|
@ -406,6 +406,8 @@ _elm_fileselector_entry_path_set_internal(Evas_Object *obj, const char *path)
|
|||
EOLIAN static void
|
||||
_elm_fileselector_entry_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Efl_Model *model)
|
||||
{
|
||||
if (!efl_isa(model, EFL_IO_MODEL_CLASS))
|
||||
return ;
|
||||
efl_ui_view_model_set(sd->button, model);
|
||||
efl_ui_view_model_set(sd->entry, model);
|
||||
efl_ui_property_bind(sd->entry, "default", "path");
|
||||
|
|
Loading…
Reference in New Issue