jaehyun pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=b488c57a9cecc1a0fb6ca14084c3da3b3bca41de
commit b488c57a9cecc1a0fb6ca14084c3da3b3bca41de Author: Jaehyun Cho <jae_hyun....@samsung.com> Date: Wed Mar 2 21:25:59 2016 +0900 edc_editor: Fix to call "edc,modified" callback when edc is modified. Previously, "edc,modified" callback is called only if enventor_object_save() is called. To call "edc,modified" callback when edc is modified, "edc,modified" callback is called in edit_save(). --- src/lib/edc_editor.c | 4 ++++ src/lib/enventor_smart.c | 17 +---------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c index 059d350..931b190 100644 --- a/src/lib/edc_editor.c +++ b/src/lib/edc_editor.c @@ -1270,6 +1270,10 @@ edit_save(edit_data *ed, const char *file) edit_changed_set(ed, EINA_FALSE); edit_saved_set(ed, EINA_TRUE); + Enventor_EDC_Modified modified; + modified.self_changed = EINA_TRUE; + evas_object_smart_callback_call(ed->enventor, SIG_EDC_MODIFIED, &modified); + return EINA_TRUE; } diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c index 584c53c..48109c4 100644 --- a/src/lib/enventor_smart.c +++ b/src/lib/enventor_smart.c @@ -678,26 +678,11 @@ EOLIAN static Eina_Bool _enventor_object_save(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd, const char *file) { - Eina_Bool edc_modified = EINA_FALSE; - //Update edc file and try to save if the edc path is different. if (build_edc_path_get() != file) edit_changed_set(pd->ed, EINA_TRUE); - //Build edc file and call modified smart callback if edc file is modified. - if (edit_changed_get(pd->ed)) edc_modified = EINA_TRUE; - Eina_Bool saved = edit_save(pd->ed, file); - //EDC file is newly generated, we need to reload as the input. - if (saved && edc_modified) - { - Enventor_EDC_Modified modified; - - build_edc(); - edit_saved_set(pd->ed, EINA_FALSE); - - modified.self_changed = EINA_TRUE; - evas_object_smart_callback_call(pd->obj, SIG_EDC_MODIFIED, &modified); - } + if (saved) build_edc(); return saved; } --