summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-04-18 16:17:05 -0700
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-21 11:36:47 +0200
commit44fb906c4ffcc5aa6a198d54ab2f9e05133d2a32 (patch)
treee639251686dd782d24c8cb6b90947ef0c906b476
parent3b0261d5524ab8edb870a6c48549a4afd38757d4 (diff)
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
-rw-r--r--src/lib/elementary/elc_fileselector.c2
-rw-r--r--src/lib/elementary/elc_fileselector_button.c3
-rw-r--r--src/lib/elementary/elc_fileselector_entry.c2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c
index 59ce7b1321..9283dc3190 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -2115,6 +2115,8 @@ _elm_fileselector_path_set_internal(Evas_Object *obj, const char *_path)
2115EOLIAN static void 2115EOLIAN static void
2116_elm_fileselector_efl_ui_view_model_set(Eo *obj, Elm_Fileselector_Data *sd EINA_UNUSED, Efl_Model *model) 2116_elm_fileselector_efl_ui_view_model_set(Eo *obj, Elm_Fileselector_Data *sd EINA_UNUSED, Efl_Model *model)
2117{ 2117{
2118 if (!efl_isa(model, EFL_IO_MODEL_CLASS))
2119 return ;
2118 _populate(obj, model, NULL, NULL); 2120 _populate(obj, model, NULL, NULL);
2119} 2121}
2120 2122
diff --git a/src/lib/elementary/elc_fileselector_button.c b/src/lib/elementary/elc_fileselector_button.c
index 1a644534f1..30aa8b225f 100644
--- a/src/lib/elementary/elc_fileselector_button.c
+++ b/src/lib/elementary/elc_fileselector_button.c
@@ -351,6 +351,9 @@ _elm_fileselector_button_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Elm_Filesele
351{ 351{
352 char *file = NULL; 352 char *file = NULL;
353 353
354 if (!efl_isa(model, EFL_IO_MODEL_CLASS))
355 return ;
356
354 efl_replace(&sd->fsd.model, model); 357 efl_replace(&sd->fsd.model, model);
355 358
356 if (model) 359 if (model)
diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c
index df9ac79d2c..eee488267b 100644
--- a/src/lib/elementary/elc_fileselector_entry.c
+++ b/src/lib/elementary/elc_fileselector_entry.c
@@ -406,6 +406,8 @@ _elm_fileselector_entry_path_set_internal(Evas_Object *obj, const char *path)
406EOLIAN static void 406EOLIAN static void
407_elm_fileselector_entry_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Efl_Model *model) 407_elm_fileselector_entry_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Efl_Model *model)
408{ 408{
409 if (!efl_isa(model, EFL_IO_MODEL_CLASS))
410 return ;
409 efl_ui_view_model_set(sd->button, model); 411 efl_ui_view_model_set(sd->button, model);
410 efl_ui_view_model_set(sd->entry, model); 412 efl_ui_view_model_set(sd->entry, model);
411 efl_ui_property_bind(sd->entry, "default", "path"); 413 efl_ui_property_bind(sd->entry, "default", "path");