edj_viewer: call the "live_view,loaded" at proper time.

previously, the signal can be called even live view is not loaded yet.

@fix
This commit is contained in:
ChunEon Park 2015-06-30 19:47:33 +09:00
parent aa962ba179
commit 796e1bffe1
2 changed files with 6 additions and 3 deletions

View File

@ -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;
}

View File

@ -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, ""},