Compare commits
7 Commits
master
...
devs/capta
Author | SHA1 | Date |
---|---|---|
michelle legrand | 30bf8bbe52 | |
michelle legrand | c7d840f154 | |
michelle legrand | aaada3f32f | |
michelle legrand | b0cafcefe2 | |
michelle legrand | 174a2579b8 | |
michelle legrand | d56137c6dc | |
michelle legrand | b4cb205ce7 |
|
@ -46,18 +46,7 @@ config_edj_path_update(config_data *cd)
|
|||
char buf[PATH_MAX];
|
||||
Eina_Tmpstr *tmp_path;
|
||||
|
||||
char *ext = strstr(cd->edc_path, ".edc");
|
||||
const char *file = ecore_file_file_get(cd->edc_path);
|
||||
if (ext && file)
|
||||
{
|
||||
char filename[PATH_MAX];
|
||||
snprintf(filename, (ext - file) + 1, "%s", file);
|
||||
snprintf(buf, sizeof(buf), "%s.edj", filename);
|
||||
}
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s.edj", file);
|
||||
|
||||
if (!eina_file_mkstemp(buf, &tmp_path))
|
||||
if (!eina_file_mkstemp(DEFAULT_EDC_FORMAT, &tmp_path))
|
||||
{
|
||||
EINA_LOG_ERR("Failed to generate tmp folder!");
|
||||
return;
|
||||
|
|
|
@ -605,7 +605,19 @@ ctrl_func(app_data *ad, const char *key)
|
|||
//Save
|
||||
if (!strcmp(key, "s") || !strcmp(key, "S"))
|
||||
{
|
||||
file_mgr_edc_save();
|
||||
config_edc_path_set(config_edc_path_get());
|
||||
|
||||
Eina_List *list = eina_list_append(NULL, config_edj_path_get());
|
||||
enventor_object_path_set(ad->enventor, ENVENTOR_OUT_EDJ, list);
|
||||
eina_list_free(list);
|
||||
|
||||
if (!enventor_object_save(ad->enventor, config_edc_path_get()))
|
||||
{
|
||||
EINA_LOG_ERR("Could not save the file.");
|
||||
}
|
||||
enventor_object_file_set(ad->enventor, config_edc_path_get());
|
||||
file_mgr_reset();
|
||||
//file_mgr_edc_save();
|
||||
return ECORE_CALLBACK_DONE;
|
||||
}
|
||||
//Delete Line
|
||||
|
@ -856,9 +868,6 @@ live_edit_set(Evas_Object *enventor, Evas_Object *tools)
|
|||
static Eina_Bool
|
||||
init(app_data *ad, int argc, char **argv)
|
||||
{
|
||||
ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, main_key_down_cb, ad);
|
||||
ecore_event_handler_add(ECORE_EVENT_KEY_UP, main_key_up_cb, ad);
|
||||
ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, main_mouse_wheel_cb, ad);
|
||||
|
||||
elm_setup();
|
||||
|
||||
|
@ -867,6 +876,9 @@ init(app_data *ad, int argc, char **argv)
|
|||
Eina_Bool default_edc = config_data_set(ad, argc, argv);
|
||||
newfile_default_set(default_edc);
|
||||
base_gui_init();
|
||||
ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, main_key_down_cb, ad);
|
||||
ecore_event_handler_add(ECORE_EVENT_KEY_UP, main_key_up_cb, ad);
|
||||
ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, main_mouse_wheel_cb, ad);
|
||||
statusbar_set();
|
||||
enventor_setup(ad);
|
||||
file_mgr_init(ad->enventor);
|
||||
|
|
|
@ -503,6 +503,11 @@ fileselector_load_done_cb(void *data, Evas_Object *obj, void *event_info)
|
|||
return;
|
||||
}
|
||||
config_edc_path_set(selected);
|
||||
|
||||
Eina_List *list = eina_list_append(NULL, config_edj_path_get());
|
||||
enventor_object_path_set(md->enventor, ENVENTOR_OUT_EDJ, list);
|
||||
eina_list_free(list);
|
||||
|
||||
enventor_object_file_set(md->enventor, selected);
|
||||
base_title_set(selected);
|
||||
fileselector_close(md);
|
||||
|
|
|
@ -56,6 +56,12 @@ newfile_set(Evas_Object *enventor, Eina_Bool template_new)
|
|||
EINA_LOG_ERR("Cannot find file! \"%s\"", buf);
|
||||
return;
|
||||
}
|
||||
|
||||
config_edc_path_set(path);
|
||||
Eina_List *list = eina_list_append(NULL, config_edj_path_get());
|
||||
enventor_object_path_set(enventor, ENVENTOR_OUT_EDJ, list);
|
||||
eina_list_free(list);
|
||||
|
||||
enventor_object_file_set(enventor, path);
|
||||
base_title_set(path);
|
||||
file_mgr_reset();
|
||||
|
|
|
@ -49,7 +49,7 @@ libenventor_la_SOURCES = \
|
|||
libenventor_la_CFLAGS = @ENVENTOR_CFLAGS@
|
||||
libenventor_la_LIBADD = @ENVENTOR_LIBS@
|
||||
|
||||
libenventor_la_LDFLAGS = $(LTLIBINTL) -version-info @version_info@
|
||||
libenventor_la_LDFLAGS = $(LTLIBINTL) -version-info @version_info@ -no-undefined
|
||||
|
||||
BUILT_SOURCES = \
|
||||
enventor_object.eo.c \
|
||||
|
|
|
@ -133,10 +133,17 @@ build_edc(void)
|
|||
EINA_LOG_ERR("Build Command is not set!");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
int ret = system(bd->build_cmd);
|
||||
if (ret == -1)
|
||||
EINA_LOG_ERR("error running %s command.", bd->build_cmd);
|
||||
#else
|
||||
Ecore_Exe_Flags flags =
|
||||
(ECORE_EXE_PIPE_READ_LINE_BUFFERED | ECORE_EXE_PIPE_READ |
|
||||
ECORE_EXE_PIPE_ERROR_LINE_BUFFERED | ECORE_EXE_PIPE_ERROR);
|
||||
ecore_exe_pipe_run(bd->build_cmd, flags, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -190,12 +190,25 @@ edj_changed_cb(void *data, int type EINA_UNUSED, void *event)
|
|||
if (vd->edj_monitor != ev->monitor) return ECORE_CALLBACK_PASS_ON;
|
||||
|
||||
//FIXME: why it need to add monitor again??
|
||||
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!");
|
||||
|
||||
// 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!");
|
||||
vd->edj_reload_need = EINA_TRUE;
|
||||
|
||||
if (!edje_object_file_set(vd->layout, build_edj_path_get(), vd->group_name))
|
||||
{
|
||||
vd->del_cb(vd->data);
|
||||
view_term(vd);
|
||||
EINA_LOG_ERR("Failed to load edj file \"%s\"", build_edj_path_get());
|
||||
return ECORE_CALLBACK_DONE;
|
||||
}
|
||||
|
||||
view_obj_min_update(vd);
|
||||
view_part_highlight_set(vd, vd->part_name);
|
||||
dummy_obj_update(vd->layout);
|
||||
|
||||
vd->edj_reload_need = EINA_FALSE;
|
||||
|
||||
return ECORE_CALLBACK_DONE;
|
||||
}
|
||||
|
||||
|
@ -346,7 +359,7 @@ view_init(Evas_Object *enventor, const char *group,
|
|||
view_part_highlight_set(vd, NULL);
|
||||
|
||||
vd->monitor_event =
|
||||
ecore_event_handler_add(EIO_MONITOR_FILE_MODIFIED, edj_changed_cb, vd);
|
||||
ecore_event_handler_add(EIO_MONITOR_FILE_CREATED, edj_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
|
||||
|
|
Loading…
Reference in New Issue