hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=796e1bffe1e55056927136964df9db65457a2da0

commit 796e1bffe1e55056927136964df9db65457a2da0
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Tue Jun 30 19:47:33 2015 +0900

    edj_viewer: call the "live_view,loaded" at proper time.
    
    previously, the signal can be called even live view is not loaded yet.
    
    @fix
---
 src/lib/edj_viewer.c     | 8 +++++---
 src/lib/enventor_smart.c | 1 +
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/lib/edj_viewer.c b/src/lib/edj_viewer.c
index 37db9b3..9a28da5 100644
--- a/src/lib/edj_viewer.c
+++ b/src/lib/edj_viewer.c
@@ -69,10 +69,12 @@ file_set_animator_cb(void *data)
         vd->edj_monitor = eio_monitor_add(build_edj_path_get());
         if (!vd->edj_monitor) EINA_LOG_ERR("Failed to add Eio_Monitor");
         vd->animator = NULL;
+        view_obj_min_update(vd);
+        evas_object_smart_callback_call(vd->enventor, SIG_LIVE_VIEW_LOADED,
+                                        (void*)edj_mgr_obj_get());
         return ECORE_CALLBACK_CANCEL;
      }
 
-   view_obj_min_update(vd);
    edj_mgr_reload_need_set(EINA_TRUE);
 
    return ECORE_CALLBACK_RENEW;
@@ -285,6 +287,8 @@ view_obj_create(view_data *vd, const char *file_path, const 
char *group)
         eio_monitor_del(vd->edj_monitor);
         vd->edj_monitor = eio_monitor_add(file_path);
         if (!vd->edj_monitor) EINA_LOG_ERR("Failed to add Eio_Monitor");
+        evas_object_smart_callback_call(vd->enventor, SIG_LIVE_VIEW_LOADED,
+                                        (void*)edj_mgr_obj_get());
      }
 
    evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
@@ -340,8 +344,6 @@ view_obj_idler_cb(void *data)
    vd->idler = NULL;
    if (vd->part_name) view_part_highlight_set(vd, vd->part_name);
 
-   evas_object_smart_callback_call(vd->enventor, SIG_LIVE_VIEW_LOADED,
-                                   (void*)edj_mgr_obj_get());
    return ECORE_CALLBACK_CANCEL;
 }
 
diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c
index 6a08915..81e775c 100644
--- a/src/lib/enventor_smart.c
+++ b/src/lib/enventor_smart.c
@@ -35,6 +35,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
    {SIG_CURSOR_GROUP_CHANGED, ""},
    {SIG_LIVE_VIEW_CURSOR_MOVED, ""},
    {SIG_LIVE_VIEW_RESIZED, ""},
+   {SIG_LIVE_VIEW_LOADED, ""},
    {SIG_MAX_LINE_CHANGED, ""},
    {SIG_COMPILE_ERROR, ""},
    {SIG_PROGRAM_RUN, ""},

-- 


Reply via email to