From e78b42e74ac0542e54ec5a813d710c20f540ba6e Mon Sep 17 00:00:00 2001 From: Serhii Sakhno Date: Fri, 25 Apr 2014 16:20:33 +0000 Subject: [PATCH] Eolite 2.3: fixed bugs and small changed in copy function git-svn-id: svn://kolibrios.org@4894 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 6 +++--- programs/cmm/eolite/include/copy.h | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 1882c336b5..f0d224416b 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -82,8 +82,8 @@ enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir -#define TITLE "Eolite File Manager v2.25" -#define ABOUT_TITLE "Eolite v2.25" +#define TITLE "Eolite File Manager v2.3" +#define ABOUT_TITLE "Eolite v2.3" dword col_padding, col_selec, col_lpanel; int toolbar_buttons_x[7]={9,46,85,134,167,203}; @@ -430,7 +430,7 @@ void main() case 185: //ins add_to_copy_active=1; add_to_copy(#file_path); - //notify("'Eolite\nFile was added to copy queue' -tI"); + notify("'Eolite\nFile was added to copy queue' -tI"); break; case 050...059: //F1-F10 FnProcess(key-49); diff --git a/programs/cmm/eolite/include/copy.h b/programs/cmm/eolite/include/copy.h index 26acec1d78..4ee49300af 100644 --- a/programs/cmm/eolite/include/copy.h +++ b/programs/cmm/eolite/include/copy.h @@ -63,11 +63,12 @@ void Paste() { char copy_rezult; byte copy_from[4096]; - int tst, count; + int tst, count, j; dword buf; buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1); count = DSINT[buf+8]; + if (DSDWORD[buf+4] != 3) return; debugi(count); add_to_copy_active=0; @@ -76,7 +77,6 @@ void Paste() for (j = 0; j < count; j++) { tst = j*4096; strlcpy(#copy_from, buf+12+tst, 4096); - debug(#copy_from); if (!copy_from) CopyExit(); strcpy(#copy_to, #path); strcat(#copy_to, #copy_from+strrchr(#copy_from,'/')); @@ -95,18 +95,19 @@ void Paste() { Write_Error(copy_rezult); } + + else if (cut_active) + { + strcpy(#file_path, #copy_from); + Del_File(true); + + } } - if (copy_rezult = copyf(#copy_from,#copy_to)) + if (cut_active) { - Write_Error(copy_rezult); - } - else if (cut_active) - { - strcpy(#file_path, #copy_from); - Del_File(true); cut_active=false; } - for (j = 0; j < MAX_HISTORY_NUM; j++) strcpy(#copy_path.copy_list[j].Item[0], 0); + for (j = 0; j < count; j++) strcpy(#copy_path.copy_list[j].Item[0], 0); CopyExit(); }