change Enventor_Path_Type interface.

changed names for enum value consistency.
This commit is contained in:
ChunEon Park 2015-07-01 12:04:48 +09:00
parent 1285140af4
commit fe2ad1f07b
7 changed files with 23 additions and 22 deletions

View File

@ -58,16 +58,16 @@ enventor_common_setup(Evas_Object *enventor)
enventor_object_auto_complete_set(enventor, config_auto_complete_get()); enventor_object_auto_complete_set(enventor, config_auto_complete_get());
Eina_List *list = eina_list_append(NULL, config_edj_path_get()); Eina_List *list = eina_list_append(NULL, config_edj_path_get());
enventor_object_path_set(enventor, ENVENTOR_OUT_EDJ, list); enventor_object_path_set(enventor, ENVENTOR_PATH_TYPE_EDJ, list);
eina_list_free(list); eina_list_free(list);
enventor_object_path_set(enventor, ENVENTOR_RES_IMAGE, enventor_object_path_set(enventor, ENVENTOR_PATH_TYPE_IMAGE,
config_edc_img_path_list_get()); config_edc_img_path_list_get());
enventor_object_path_set(enventor, ENVENTOR_RES_SOUND, enventor_object_path_set(enventor, ENVENTOR_PATH_TYPE_SOUND,
config_edc_snd_path_list_get()); config_edc_snd_path_list_get());
enventor_object_path_set(enventor, ENVENTOR_RES_FONT, enventor_object_path_set(enventor, ENVENTOR_PATH_TYPE_FONT,
config_edc_fnt_path_list_get()); config_edc_fnt_path_list_get());
enventor_object_path_set(enventor, ENVENTOR_RES_DATA, enventor_object_path_set(enventor, ENVENTOR_PATH_TYPE_DATA,
config_edc_dat_path_list_get()); config_edc_dat_path_list_get());
} }

View File

@ -428,7 +428,7 @@ fileselector_save_done_cb(void *data, Evas_Object *obj, void *event_info)
{ {
config_edc_path_set(selected); config_edc_path_set(selected);
Eina_List *list = eina_list_append(NULL, config_edj_path_get()); Eina_List *list = eina_list_append(NULL, config_edj_path_get());
enventor_object_path_set(md->enventor, ENVENTOR_OUT_EDJ, list); enventor_object_path_set(md->enventor, ENVENTOR_PATH_TYPE_EDJ, list);
eina_list_free(list); eina_list_free(list);
if (!enventor_object_save(md->enventor, selected)) if (!enventor_object_save(md->enventor, selected))
{ {
@ -448,7 +448,8 @@ fileselector_save_done_cb(void *data, Evas_Object *obj, void *event_info)
{ {
Eina_List *edj_pathes = NULL; Eina_List *edj_pathes = NULL;
edj_pathes = eina_list_append(edj_pathes, selected); edj_pathes = eina_list_append(edj_pathes, selected);
enventor_object_path_set(md->enventor, ENVENTOR_OUT_EDJ, edj_pathes); enventor_object_path_set(md->enventor, ENVENTOR_PATH_TYPE_EDJ,
edj_pathes);
enventor_object_modified_set(md->enventor, EINA_TRUE); enventor_object_modified_set(md->enventor, EINA_TRUE);
enventor_object_save(md->enventor, config_edc_path_get()); enventor_object_save(md->enventor, config_edc_path_get());
eina_list_free(edj_pathes); eina_list_free(edj_pathes);

View File

@ -46,7 +46,7 @@ newfile_set(Evas_Object *enventor, Eina_Bool template_new)
config_edc_path_set(path); config_edc_path_set(path);
Eina_List *list = eina_list_append(NULL, config_edj_path_get()); Eina_List *list = eina_list_append(NULL, config_edj_path_get());
enventor_object_path_set(enventor, ENVENTOR_OUT_EDJ, list); enventor_object_path_set(enventor, ENVENTOR_PATH_TYPE_EDJ, list);
eina_list_free(list); eina_list_free(list);
} }
success = eina_file_copy(buf, path, success = eina_file_copy(buf, path,

View File

@ -18,11 +18,11 @@
typedef enum typedef enum
{ {
ENVENTOR_OUT_EDJ = 0, ENVENTOR_PATH_TYPE_EDJ = 0,
ENVENTOR_RES_IMAGE, ENVENTOR_PATH_TYPE_IMAGE,
ENVENTOR_RES_SOUND, ENVENTOR_PATH_TYPE_SOUND,
ENVENTOR_RES_FONT, ENVENTOR_PATH_TYPE_FONT,
ENVENTOR_RES_DATA, ENVENTOR_PATH_TYPE_DATA,
ENVENTOR_PATH_TYPE_LAST ENVENTOR_PATH_TYPE_LAST
} Enventor_Path_Type; } Enventor_Path_Type;

View File

@ -79,16 +79,16 @@ build_cmd_set(build_data *bd)
Eina_Strbuf *strbuf_dat = NULL; Eina_Strbuf *strbuf_dat = NULL;
Eina_Strbuf *strbuf = NULL; Eina_Strbuf *strbuf = NULL;
//Image //Image
strbuf_img = strbuf_path_get(bd, ENVENTOR_RES_IMAGE, " -id "); strbuf_img = strbuf_path_get(bd, ENVENTOR_PATH_TYPE_IMAGE, " -id ");
if (!strbuf_img) goto err; if (!strbuf_img) goto err;
strbuf_snd = strbuf_path_get(bd, ENVENTOR_RES_SOUND, " -sd "); strbuf_snd = strbuf_path_get(bd, ENVENTOR_PATH_TYPE_SOUND, " -sd ");
if (!strbuf_snd) goto err; if (!strbuf_snd) goto err;
strbuf_fnt = strbuf_path_get(bd, ENVENTOR_RES_FONT, " -fd "); strbuf_fnt = strbuf_path_get(bd, ENVENTOR_PATH_TYPE_FONT, " -fd ");
if (!strbuf_fnt) goto err; if (!strbuf_fnt) goto err;
strbuf_dat = strbuf_path_get(bd, ENVENTOR_RES_DATA, " -dd "); strbuf_dat = strbuf_path_get(bd, ENVENTOR_PATH_TYPE_DATA, " -dd ");
if (!strbuf_dat) goto err; if (!strbuf_dat) goto err;
strbuf = eina_strbuf_new(); strbuf = eina_strbuf_new();
@ -101,7 +101,7 @@ build_cmd_set(build_data *bd)
eina_strbuf_append_printf(strbuf, eina_strbuf_append_printf(strbuf,
"edje_cc -fastcomp %s %s -id %s/images -sd %s/sounds -fd %s/fonts -dd %s/data %s %s %s %s", "edje_cc -fastcomp %s %s -id %s/images -sd %s/sounds -fd %s/fonts -dd %s/data %s %s %s %s",
bd->edc_path, bd->edc_path,
(char *) eina_list_data_get(bd->pathes_list[ENVENTOR_OUT_EDJ]), (char *) eina_list_data_get(bd->pathes_list[ENVENTOR_PATH_TYPE_EDJ]),
elm_app_data_dir_get(), elm_app_data_dir_get(),
elm_app_data_dir_get(), elm_app_data_dir_get(),
elm_app_data_dir_get(), elm_app_data_dir_get(),
@ -211,7 +211,7 @@ build_path_set(Enventor_Path_Type type, const Eina_List *pathes)
Eina_List *l; Eina_List *l;
//don't allow null edj path //don't allow null edj path
if (!pathes && (type == ENVENTOR_OUT_EDJ)) return EINA_FALSE; if (!pathes && (type == ENVENTOR_PATH_TYPE_EDJ)) return EINA_FALSE;
EINA_LIST_FREE(bd->pathes_list[type], path) EINA_LIST_FREE(bd->pathes_list[type], path)
eina_stringshare_del(path); eina_stringshare_del(path);
@ -228,7 +228,7 @@ const char *
build_edj_path_get(void) build_edj_path_get(void)
{ {
build_data *bd = g_bd; build_data *bd = g_bd;
return eina_list_data_get(bd->pathes_list[ENVENTOR_OUT_EDJ]); return eina_list_data_get(bd->pathes_list[ENVENTOR_PATH_TYPE_EDJ]);
} }
const char * const char *

View File

@ -438,7 +438,7 @@ image_preview_show(edit_data *ed, char *cur, Evas_Coord x, Evas_Coord y)
char fullpath[PATH_MAX]; char fullpath[PATH_MAX];
//1.Find the image path. //1.Find the image path.
Eina_List *list = build_path_get(ENVENTOR_RES_IMAGE); Eina_List *list = build_path_get(ENVENTOR_PATH_TYPE_IMAGE);
Eina_List *l; Eina_List *l;
char *path; char *path;
Eina_Bool found = EINA_FALSE; Eina_Bool found = EINA_FALSE;

View File

@ -326,7 +326,7 @@ _enventor_object_path_set(Eo *obj EINA_UNUSED,
Enventor_Path_Type type, const Eina_List *pathes) Enventor_Path_Type type, const Eina_List *pathes)
{ {
//edj file is changed //edj file is changed
if (type == ENVENTOR_OUT_EDJ) if (type == ENVENTOR_PATH_TYPE_EDJ)
{ {
const char *path = eina_list_data_get(pathes); const char *path = eina_list_data_get(pathes);
const char *ppath = build_edj_path_get(); const char *ppath = build_edj_path_get();