edj_viewer: fix failure at loading edj file when enventor is starting up.

If ECORE_EXE_EVENT_DEL were firslty called than normal edj file load function,
enventor won't set up the edj viewer since logic is corrupted.

Now, fixed the calls order by moving the ECORE_EXE_EVENT_DEL onto later to the normal edj file load func.

@fix T2993
This commit is contained in:
Hermet Park 2016-01-01 14:50:16 +09:00
parent 8159192a47
commit 82d6b6604a
1 changed files with 7 additions and 8 deletions

View File

@ -44,6 +44,10 @@ struct viewer_s
const char *PART_NAME = "part_name";
static Eina_Bool
exe_del_event_cb(void *data, int type, void *even);
/*****************************************************************************/
/* Internal method implementation */
/*****************************************************************************/
@ -133,6 +137,9 @@ view_images_monitor_set(view_data *vd)
static void
view_obj_create_post_job(view_data *vd)
{
vd->exe_del_event =
ecore_event_handler_add(ECORE_EXE_EVENT_DEL, exe_del_event_cb, vd);
eio_monitor_del(vd->edj_monitor);
vd->edj_monitor = eio_monitor_add(build_edj_path_get());
if (!vd->edj_monitor) EINA_LOG_ERR("Failed to add Eio_Monitor");
@ -435,7 +442,6 @@ view_obj_create(view_data *vd)
dummy_clicked_cb, vd);
view_obj_parts_callbacks_set(vd);
}
static void
@ -523,13 +529,6 @@ view_init(Evas_Object *enventor, const char *group,
vd->img_monitor_event =
ecore_event_handler_add(EIO_MONITOR_FILE_MODIFIED, img_changed_cb, vd);
/* Is this required?? Suddenly, something is changed and
it won't successful with EIO_MONITOR_FILE_MODIFIED to reload the edj file
since the file couldn't be accessed at the moment. To fix this problem,
we check the ECORE_EXE_EVENT_DEL additionally. */
vd->exe_del_event =
ecore_event_handler_add(ECORE_EXE_EVENT_DEL, exe_del_event_cb, vd);
vd->view_config_size.w = 0;
vd->view_config_size.h = 0;