what correct event is necessary for a file choice?
evas_object_smart_callback_add(file_select, "chosen", clicked_select_file, ad->navi);
the selected file isn't written through fprintf. Only path.
void
clicked_select_file(void *data, Evas_Object *obj, void *event_info)
{
/* узнать расположение файла */
const char *tmp = elm_fileselector_path_get(obj);
/* добавить строку в буфер */
int len = strlen (tmp);
if ( log_file == NULL ){
log_file = calloc(len + 1, 1);
strncpy(log_file, tmp, len);
}
else{
free(log_file);
log_file = calloc(len + 1, 1);
strncpy(log_file, tmp, len);
}
FILE *log_list = fopen("/opt/home/app/log","w");
fprintf(log_list,"%s\n",log_file);
fclose(log_list);
}