Eolite 2.4: fix copy one file; other small fix

git-svn-id: svn://kolibrios.org@5209 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Serhii Sakhno 2014-12-01 20:11:26 +00:00
parent 0feb6fbe0b
commit 27b5fdd406
2 changed files with 36 additions and 22 deletions

View File

@ -83,8 +83,8 @@
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
#define TITLE "Eolite File Manager v2.39"
#define ABOUT_TITLE "Eolite v2.39"
#define TITLE "Eolite File Manager v2.4"
#define ABOUT_TITLE "Eolite v2.4"
dword col_padding, col_selec, col_lpanel;
int toolbar_buttons_x[7]={9,46,85,134,167,203};

View File

@ -20,23 +20,36 @@ void Copy(dword pcth, char cut)
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
if (ESBYTE[selected_offset2]) cont++;
}
buff_data = malloc(cont*4096+10);
ESDWORD[buff_data] = cont*4096+10;
ESDWORD[buff_data+4] = 3;
ESINT[buff_data+8] = cont;
for (i=0; i<files.count; i++)
{
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
if (ESBYTE[selected_offset2]) {
strcpy(#copy_t, #path);
strcat(#copy_t, file_mas[i]*304+buf+72);
strlcpy(ind*4096+buff_data+10, #copy_t, 4096);
ind++;
}
}
clipboard.SetSlotData(cont*4096+10, buff_data);
if (!cont)
{
buff_data = malloc(4106);
ESDWORD[buff_data] = 4106;
ESDWORD[buff_data+4] = 3;
ESINT[buff_data+8] = 1;
strlcpy(buff_data+10, #file_path, 4096);;
clipboard.SetSlotData(4106, buff_data);
}
else
{
buff_data = malloc(cont*4096+10);
ESDWORD[buff_data] = cont*4096+10;
ESDWORD[buff_data+4] = 3;
ESINT[buff_data+8] = cont;
for (i=0; i<files.count; i++)
{
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
if (ESBYTE[selected_offset2]) {
strcpy(#copy_t, #path);
strcat(#copy_t, file_mas[i]*304+buf+72);
strlcpy(ind*4096+buff_data+10, #copy_t, 4096);;
ind++;
}
}
clipboard.SetSlotData(cont*4096+10, buff_data);
}
cut_active = cut;
free(buff_data);
}
void copyf_Draw_Progress(dword filename) {
@ -58,14 +71,16 @@ void Paste()
char copy_rezult;
byte copy_from[4096];
int j;
int cnt = 0;
int cnt = 0;
dword buf;
buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1);
if (DSDWORD[buf+4] != 3) return;
if (DSDWORD[buf+4] != 3) return;
cnt = ESINT[buf+8];
for (j = 0; j < cnt; j++) {
for (j = 0; j < cnt; j++) {
debugi(j);
strlcpy(#copy_from, j*4096+buf+10, 4096);
debugln(#copy_from);
if (!copy_from) CopyExit();
strcpy(#copy_to, #path);
strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));
@ -96,7 +111,6 @@ void Paste()
{
cut_active=false;
}
//mark_default();
CopyExit();
}