forked from KolibriOS/kolibrios
Eolite 3.25: don't used fs.obj
git-svn-id: svn://kolibrios.org@5957 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1441191163
commit
59fbf0d81e
@ -18,7 +18,6 @@
|
|||||||
//obj
|
//obj
|
||||||
#include "..\lib\obj\libini.h"
|
#include "..\lib\obj\libini.h"
|
||||||
#include "..\lib\obj\box_lib.h"
|
#include "..\lib\obj\box_lib.h"
|
||||||
#include "..\lib\obj\fs.h"
|
|
||||||
|
|
||||||
byte CMD_ENABLE_SAVE_IMG = false;
|
byte CMD_ENABLE_SAVE_IMG = false;
|
||||||
|
|
||||||
@ -125,9 +124,6 @@ void main()
|
|||||||
|
|
||||||
load_dll(boxlib, #box_lib_init,0);
|
load_dll(boxlib, #box_lib_init,0);
|
||||||
load_dll(libini, #lib_init,1);
|
load_dll(libini, #lib_init,1);
|
||||||
|
|
||||||
lib_init_fs();
|
|
||||||
|
|
||||||
eolite_ini_path = abspath("Eolite.ini");
|
eolite_ini_path = abspath("Eolite.ini");
|
||||||
|
|
||||||
fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini";
|
fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini";
|
||||||
@ -879,7 +875,7 @@ void Del_Form()
|
|||||||
int del_error;
|
int del_error;
|
||||||
int Del_File2(dword way, sh_progr)
|
int Del_File2(dword way, sh_progr)
|
||||||
{
|
{
|
||||||
/*dword dirbuf, fcount, i, filename;
|
dword dirbuf, fcount, i, filename;
|
||||||
int error;
|
int error;
|
||||||
char del_from[4096];
|
char del_from[4096];
|
||||||
if (isdir(way))
|
if (isdir(way))
|
||||||
@ -901,8 +897,7 @@ int Del_File2(dword way, sh_progr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (error = DeleteFile(way)) del_error = error;*/
|
if (error = DeleteFile(way)) del_error = error;
|
||||||
fs.remove(way);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Del_File_Thread()
|
void Del_File_Thread()
|
||||||
|
@ -7,14 +7,12 @@ enum {NOCUT, CUT};
|
|||||||
|
|
||||||
Clipboard clipboard;
|
Clipboard clipboard;
|
||||||
|
|
||||||
dword _copy_path_ = 0;
|
|
||||||
void Copy(dword pcth, char cut)
|
void Copy(dword pcth, char cut)
|
||||||
{
|
{
|
||||||
dword selected_offset2;
|
dword selected_offset2;
|
||||||
byte copy_t[4096];
|
byte copy_t[4096];
|
||||||
dword buff_data;
|
dword buff_data;
|
||||||
int ind = 0;
|
int ind = 0;
|
||||||
|
|
||||||
if (selected_count)
|
if (selected_count)
|
||||||
{
|
{
|
||||||
buff_data = malloc(selected_count*4096+10);
|
buff_data = malloc(selected_count*4096+10);
|
||||||
@ -58,30 +56,56 @@ void PasteThread()
|
|||||||
int j;
|
int j;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
dword buf;
|
dword buf;
|
||||||
dword tmp;
|
|
||||||
file_count_copy = 0;
|
file_count_copy = 0;
|
||||||
copy_bar.value = 0;
|
copy_bar.value = 0;
|
||||||
|
|
||||||
buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1);
|
buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1);
|
||||||
if (DSDWORD[buf+4] != 3) return;
|
if (DSDWORD[buf+4] != 3) return;
|
||||||
cnt = ESINT[buf+8];
|
cnt = ESINT[buf+8];
|
||||||
|
for (j = 0; j < cnt; j++) {
|
||||||
|
strlcpy(#copy_from, j*4096+buf+10, 4096);
|
||||||
|
GetFileInfo(#copy_from, #file_info_count);
|
||||||
|
if ( file_info_count.isfolder ) DirFileCount(#copy_from);
|
||||||
|
else file_count_copy++;
|
||||||
|
}
|
||||||
|
copy_bar.max = file_count_copy;
|
||||||
|
|
||||||
|
if (cut_active) operation_flag = MOVE_FLAG;
|
||||||
|
else operation_flag = COPY_FLAG;
|
||||||
|
|
||||||
|
DisplayOperationForm();
|
||||||
for (j = 0; j < cnt; j++) {
|
for (j = 0; j < cnt; j++) {
|
||||||
strlcpy(#copy_from, j*4096+buf+10, 4096);
|
strlcpy(#copy_from, j*4096+buf+10, 4096);
|
||||||
if (!copy_from) DialogExit();
|
if (!copy_from) DialogExit();
|
||||||
strcpy(#copy_to, #path);
|
strcpy(#copy_to, #path);
|
||||||
strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));
|
strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));
|
||||||
|
if (!strcmp(#copy_from,#copy_to))
|
||||||
|
{
|
||||||
|
strcpy(#copy_to, #path);
|
||||||
|
strcat(#copy_to, "new_");
|
||||||
|
strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));
|
||||||
|
}
|
||||||
if (strstr(#copy_to, #copy_from))
|
if (strstr(#copy_to, #copy_from))
|
||||||
{
|
{
|
||||||
cut_active=false;
|
|
||||||
notify("Copy directory into itself is a bad idea...");
|
notify("Copy directory into itself is a bad idea...");
|
||||||
DialogExit();
|
DialogExit();
|
||||||
}
|
}
|
||||||
IF (cut_active) fs.move(#copy_from, #copy_to);
|
|
||||||
ELSE fs.copy(#copy_from, #copy_to);
|
if (copy_rezult = copyf(#copy_from,#copy_to))
|
||||||
|
{
|
||||||
|
Write_Error(copy_rezult);
|
||||||
|
}
|
||||||
|
else if (cut_active)
|
||||||
|
{
|
||||||
|
//strcpy(#file_path, #copy_from);
|
||||||
|
Del_File2(#copy_from, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (cut_active)
|
||||||
|
{
|
||||||
|
cut_active=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cut_active=false;
|
|
||||||
if (info_after_copy) notify(INFO_AFTER_COPY);
|
if (info_after_copy) notify(INFO_AFTER_COPY);
|
||||||
DialogExit();
|
DialogExit();
|
||||||
}
|
}
|
@ -155,7 +155,6 @@ void Quest()
|
|||||||
DrawFlatButton(145,138,70,20,302,0xC6DFC6,T_NO);
|
DrawFlatButton(145,138,70,20,302,0xC6DFC6,T_NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void GetSizeDir(dword way)
|
void GetSizeDir(dword way)
|
||||||
{
|
{
|
||||||
dword dirbuf, fcount, i, filename;
|
dword dirbuf, fcount, i, filename;
|
||||||
@ -185,31 +184,27 @@ void GetSizeDir(dword way)
|
|||||||
free(cur_file);
|
free(cur_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
void GetSizeMoreFiles(dword way)
|
void GetSizeMoreFiles(dword way)
|
||||||
{
|
{
|
||||||
char cur_file[4096];
|
char cur_file[4096];
|
||||||
dword selected_offset2;
|
dword selected_offset2;
|
||||||
size_dir = 0;
|
|
||||||
for (i=0; i<files.count; i++)
|
for (i=0; i<files.count; i++)
|
||||||
{
|
{
|
||||||
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
|
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
|
||||||
if(ESBYTE[selected_offset2])
|
if (ESBYTE[selected_offset2]) {
|
||||||
{
|
|
||||||
sprintf(#cur_file,"%s%s",way,file_mas[i]*304+buf+72);
|
sprintf(#cur_file,"%s%s",way,file_mas[i]*304+buf+72);
|
||||||
size_dir += fs.get_size(#cur_file);
|
|
||||||
if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) )
|
if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) )
|
||||||
{
|
{
|
||||||
//debugln(#cur_file);
|
debugln(#cur_file);
|
||||||
fs.get_size(#cur_file);
|
GetSizeDir(#cur_file);
|
||||||
dir_count = dir_count + ECX;
|
|
||||||
dir_count++;
|
dir_count++;
|
||||||
file_count = file_count + EDX;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_dir += fs.get_size(#cur_file);
|
GetFileInfo(#cur_file, #file_info_dirsize);
|
||||||
|
size_dir += file_info_dirsize.sizelo;
|
||||||
file_count++;
|
file_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -240,11 +235,7 @@ void properties_dialog()
|
|||||||
GetFileInfo(#file_path, #file_info_general);
|
GetFileInfo(#file_path, #file_info_general);
|
||||||
strcpy(#file_name2, #file_name);
|
strcpy(#file_name2, #file_name);
|
||||||
file_name_ed.size = strlen(#file_name2);
|
file_name_ed.size = strlen(#file_name2);
|
||||||
fs.get_size(#file_path);
|
if(itdir) GetSizeDir(#file_path);
|
||||||
element_size = EAX;
|
|
||||||
file_count = EDX;
|
|
||||||
dir_count =ECX;
|
|
||||||
debugi(dir_count);
|
|
||||||
atr_readonly = file_info_general.readonly;
|
atr_readonly = file_info_general.readonly;
|
||||||
atr_hidden = file_info_general.hidden;
|
atr_hidden = file_info_general.hidden;
|
||||||
atr_system = file_info_general.system;
|
atr_system = file_info_general.system;
|
||||||
@ -360,12 +351,13 @@ void DrawPropertiesWindow()
|
|||||||
WriteText(50, 13, 0x80, 0x000000, PR_T_NAME);
|
WriteText(50, 13, 0x80, 0x000000, PR_T_NAME);
|
||||||
edit_box_draw stdcall (#file_name_ed);
|
edit_box_draw stdcall (#file_name_ed);
|
||||||
|
|
||||||
if (itdir)
|
if (!itdir) element_size = file_info_general.sizelo;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS);
|
WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS);
|
||||||
sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
|
sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
|
||||||
WriteText(100, 80, 0x80, 0x000000, #folder_info);
|
WriteText(100, 80, 0x80, 0x000000, #folder_info);
|
||||||
//element_size = size_dir;
|
element_size = size_dir;
|
||||||
}
|
}
|
||||||
WriteText(10, 95, 0x80, 0x000000, SET_3);
|
WriteText(10, 95, 0x80, 0x000000, SET_3);
|
||||||
WriteText(10, 110, 0x80, 0x000000, SET_4);
|
WriteText(10, 110, 0x80, 0x000000, SET_4);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define TITLE "Eolite File Manager v3.23"
|
#define TITLE "Eolite File Manager v3.25"
|
||||||
#define ABOUT_TITLE "Eolite 3.23"
|
#define ABOUT_TITLE "Eolite 3.25"
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
?define T_FILE "” ©«"
|
?define T_FILE "” ©«"
|
||||||
|
Loading…
Reference in New Issue
Block a user