From e2f65d925ebc1dcfcdd60d240451321a7580393c Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Tue, 19 Mar 2019 09:37:57 -0400 Subject: [PATCH] efl_ui_zoomable: fix widget Summary: before the efl_file_set operations have been safed, and then applied on the internal evas_image. With the refactor 6326e18b3fb2a4757f8ffa22be5d55a75da23049, this was broken, and the file_set was applied to the super object which is a layout here. fix T7748 Reviewers: zmike, segfaultxavi, cedric, devilhorns Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7748 Differential Revision: https://phab.enlightenment.org/D8394 --- src/lib/elementary/efl_ui_image_zoomable.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index 5522a08..8440738 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -2043,10 +2043,7 @@ _img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd, ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); double tz; int w, h; - Eina_Error err; - - err = efl_file_load(efl_super(obj, MY_CLASS)); - if (err) return err; + Eina_Error err = 0; sd->zoom = 1.0; evas_object_image_smooth_scale_set(sd->img, (sd->no_smooth == 0)); @@ -2124,12 +2121,9 @@ _internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Load_Error *ret ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_GFX_IMAGE_LOAD_ERROR_GENERIC); int w, h; double tz; - Eina_Error err; + Eina_Error err = 0; const char *file; - err = efl_file_load(efl_super(obj, MY_CLASS)); - if (err) return err; - file = efl_file_get(obj); if (eina_str_has_extension(file, ".edj")) @@ -2350,8 +2344,9 @@ static const Eina_Slice remote_uri[] = { static inline Eina_Bool _efl_ui_image_zoomable_is_remote(const char *file) { - Eina_Slice s = EINA_SLICE_STR(file); const Eina_Slice *itr; + if (!file) return EINA_FALSE; + Eina_Slice s = EINA_SLICE_STR(file);; for (itr = remote_uri; itr->mem; itr++) if (eina_slice_startswith(s, *itr)) @@ -2420,10 +2415,10 @@ _efl_ui_image_zoomable_efl_file_load(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd) } EOLIAN static Eina_Error -_efl_ui_image_zoomable_efl_file_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, const char *file) +_efl_ui_image_zoomable_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, const char *file) { eina_stringshare_replace(&sd->file, file); - return efl_file_set(efl_super(obj, MY_CLASS), file); + return 0; } EOLIAN static const char * -- 2.7.4