diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index d83a5b7cfe..899ddbafac 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -11,9 +11,9 @@ TODO: http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334 */ -#define ABOUT_TITLE "EOLITE 5.17" -#define TITLE_EOLITE "Eolite File Manager 5.17" -#define TITLE_KFM "Kolibri File Manager 2.17"; +#define ABOUT_TITLE "EOLITE 5.18" +#define TITLE_EOLITE "Eolite File Manager 5.18" +#define TITLE_KFM "Kolibri File Manager 2.18"; #define MEMSIZE 1024 * 250 #include "../lib/clipboard.h" diff --git a/programs/cmm/eolite/include/copy_and_delete.h b/programs/cmm/eolite/include/copy_and_delete.h index 1be55cdbd4..5b4081a2ba 100644 --- a/programs/cmm/eolite/include/copy_and_delete.h +++ b/programs/cmm/eolite/include/copy_and_delete.h @@ -124,6 +124,7 @@ void PasteThread() int paste_elements_count = 0; dword clipbuf; dword path_offset; + dword copy_state_ex = 0; clipbuf = Clipboard__GetSlotData(Clipboard__GetSlotCount()-1); if (DSDWORD[clipbuf+4] != 3) return; @@ -160,6 +161,8 @@ _DIFFERENT_DRIVES: } path_offset = clipbuf + 10; + copy_state = FILE_DEFAULT; + saved_state = FILE_DEFAULT; for (j = 0; j < paste_elements_count; j++) { strcpy(#copy_from, path_offset); if (!copy_from) DialogExit(); diff --git a/programs/cmm/eolite/include/progress_dialog.h b/programs/cmm/eolite/include/progress_dialog.h index 0b5296847d..eacd462cd7 100644 --- a/programs/cmm/eolite/include/progress_dialog.h +++ b/programs/cmm/eolite/include/progress_dialog.h @@ -46,8 +46,9 @@ void DisplayOperationForm(int operation_flag) copy_bar.max = 0; } copy_bar.frame_color = sc.work_graph; - if (copy_state == FILE_DEFAULT) event_mode = #CheckEvent; + if (copy_state == FILE_EXISTS) event_mode = #WaitEvent; + else event_mode = #CheckEvent; event_mode(); switch(EAX) { @@ -59,15 +60,22 @@ void DisplayOperationForm(int operation_flag) DialogExit(); break; case BTN_REPLACE: + if (is_remember == true) { + saved_state = FILE_REPLACE; + } copy_state = FILE_REPLACE; break; case BTN_SKIP: + if (is_remember == true) { + saved_state = FILE_SKIP; + } copy_state = FILE_SKIP; break; default: if (remember_choice.click(EAX+1)) { - notify(itoa(remember_choice.checked)); + is_remember = remember_choice.checked; } + break; } break; case evReDraw: diff --git a/programs/cmm/lib/copyf.h b/programs/cmm/lib/copyf.h index 035e466bd8..26d5352e3a 100644 --- a/programs/cmm/lib/copyf.h +++ b/programs/cmm/lib/copyf.h @@ -14,17 +14,23 @@ enum { FILE_SKIP, }; +enum { + MODE_NORMAL, + MODE_FORCE +}; + #define WRITE_ERROR_DEBUG 0 #define WRITE_ERROR_NOTIFY 1 :int writing_error_channel = WRITE_ERROR_DEBUG; int copy_state = FILE_DEFAULT; +int saved_state = FILE_DEFAULT; +bool is_remember = false; :int copyf(dword from1, in1) { dword error; BDVK CopyFile_atr1; - copy_state = FILE_DEFAULT; if (!from1) || (!in1) { @@ -53,6 +59,7 @@ int copy_state = FILE_DEFAULT; } if (copy_state == FILE_SKIP) { + error = 0; return 0; } } @@ -72,7 +79,11 @@ int copy_state = FILE_DEFAULT; { if (file_exists(copy_in3)) && (copy_state != FILE_REPLACE) { - copy_state = FILE_EXISTS; + if (saved_state == FILE_DEFAULT) { + copy_state = FILE_EXISTS; + } else { + copy_state = saved_state; + } return 222; } if (GetFreeRAM()-1024*1024 < CopyFile_atr.sizelo) //GetFreeRam-1Mb and convert to bytes @@ -142,7 +153,7 @@ int copy_state = FILE_DEFAULT; } if (copy_state == FILE_SKIP) { - copy_state = FILE_DEFAULT; + error = 0; break; } }