Eolite 3.22: fixed bugs

git-svn-id: svn://kolibrios.org@5931 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Serhii Sakhno 2015-11-25 21:10:21 +00:00
parent 4e1cd333e9
commit 5bc505c7a3
3 changed files with 22 additions and 65 deletions

View File

@ -14,7 +14,7 @@ void Copy(dword pcth, char cut)
byte copy_t[4096];
dword buff_data;
int ind = 0;
/*
if (selected_count)
{
buff_data = malloc(selected_count*4096+10);
@ -44,9 +44,6 @@ void Copy(dword pcth, char cut)
}
cut_active = cut;
free(buff_data);
*/
_copy_path_ = strdup(#file_path);
cut_active = cut;
}
@ -64,69 +61,27 @@ void PasteThread()
dword tmp;
file_count_copy = 0;
copy_bar.value = 0;
if(_copy_path_)
{
DisplayOperationForm();
IF(!TEMP) TEMP = malloc(4096);
buf = _copy_path_;
while(DSBYTE[buf])
{
IF(DSBYTE[buf]=='/')tmp = buf;
buf++;
}
tmp++;
sprintf(TEMP,"%s%s",#path,tmp);
IF(cut_active) fs.move(_copy_path_,TEMP);
ELSE fs.copy(_copy_path_,TEMP);
free(_copy_path_);
DialogExit();
}
_copy_path_ = 0;
/*
buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1);
if (DSDWORD[buf+4] != 3) return;
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++) {
strlcpy(#copy_from, j*4096+buf+10, 4096);
if (!copy_from) DialogExit();
strcpy(#copy_to, #path);
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))
{
cut_active=false;
notify("Copy directory into itself is a bad idea...");
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);
}
}*/
cut_active=false;
if (info_after_copy) notify(INFO_AFTER_COPY);
DialogExit();
}

View File

@ -199,19 +199,19 @@ void GetSizeMoreFiles(dword way)
{
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) )
{
debugln(#cur_file);
GetSizeDir(#cur_file);
//debugln(#cur_file);
fs.get_size(#cur_file);
dir_count = dir_count + ECX;
dir_count++;
file_count = file_count + EDX;
}
else
{
size_dir += fs.get_size(#cur_file);
file_count++;
}
*/
}
}
}
@ -240,8 +240,11 @@ void properties_dialog()
GetFileInfo(#file_path, #file_info_general);
strcpy(#file_name2, #file_name);
file_name_ed.size = strlen(#file_name2);
//if(itdir) GetSizeDir(#file_path);
size_dir = fs.get_size(#file_path);
fs.get_size(#file_path);
element_size = EAX;
file_count = EDX;
dir_count =ECX;
debugi(dir_count);
atr_readonly = file_info_general.readonly;
atr_hidden = file_info_general.hidden;
atr_system = file_info_general.system;
@ -357,13 +360,12 @@ void DrawPropertiesWindow()
WriteText(50, 13, 0x80, 0x000000, PR_T_NAME);
edit_box_draw stdcall (#file_name_ed);
if (!itdir) element_size = file_info_general.sizelo;
else
if (itdir)
{
WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS);
sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
WriteText(100, 80, 0x80, 0x000000, #folder_info);
element_size = size_dir;
//element_size = size_dir;
}
WriteText(10, 95, 0x80, 0x000000, SET_3);
WriteText(10, 110, 0x80, 0x000000, SET_4);

View File

@ -1,5 +1,5 @@
#define TITLE "Eolite File Manager v3.21"
#define ABOUT_TITLE "Eolite 3.21"
#define TITLE "Eolite File Manager v3.22"
#define ABOUT_TITLE "Eolite 3.22"
#ifdef LANG_RUS
?define T_FILE "” ©«"