//===================================================// // // // MASS ACTIONS // // // //===================================================// void setElementSelectedFlag(dword n, int state) { dword selected_offset = items.get(n)*304 + buf+32 + 7; ESBYTE[selected_offset] = state; if (n==0) && (strncmp(items.get(n)*304+buf+72,"..",2)==0) { ESBYTE[selected_offset] = false; //do not selec ".." directory return; } if (state==true) selected_count++; if (state==false) selected_count--; if (selected_count<0) selected_count=0; } int getElementSelectedFlag(dword n) { dword selected_offset = items.get(n)*304 + buf+32 + 7; return ESBYTE[selected_offset]; } dword GetFilesCount(dword _in_path) { BDVK file_info_count; DIR_SIZE paste_dir_size; GetFileInfo(_in_path, #file_info_count); if ( file_info_count.isfolder ) { return paste_dir_size.get(_in_path); } else { return 1; } } //===================================================// // // // COPY AND PASTE // // // //===================================================// byte copy_to[4096]; byte copy_from[4096]; bool cut_active = false; enum {COPY, CUT, DELETE}; void CopyFilesListToClipboard(bool _cut_active) { byte copy_t[4096]; dword buff_data; dword path_len = 0; dword size_buf = 0; dword copy_buf_offset = 0; dword i; if (files.count<=0) return; //no files if (_cut_active!=DELETE) cut_active = _cut_active; //if no element selected by "Insert" key, then we copy current element if (!selected_count) { setElementSelectedFlag(files.cur_y, true); } if (!selected_count) return; size_buf = 4; for (i=0; i=files.first) && (i