Rev 7244 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7244 | Rev 7278 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | 6 | ||
Line 7... | Line 7... | ||
7 | void setElementSelectedFlag(dword n, int state) { |
7 | void setElementSelectedFlag(dword n, int state) { |
8 | dword selected_offset = file_mas[n]*304 + buf+32 + 7; |
8 | dword selected_offset = file_mas[n]*304 + buf+32 + 7; |
9 | ESBYTE[selected_offset] = state; |
9 | ESBYTE[selected_offset] = state; |
- | 10 | if (n==0) && (strncmp(file_mas[n]*304+buf+72,"..",2)==0) { |
|
10 | if (n==0) && (strncmp(file_mas[n]*304+buf+72,"..",2)==0) ESBYTE[selected_offset] = false; //do not selec ".." directory |
11 | ESBYTE[selected_offset] = false; //do not selec ".." directory |
- | 12 | return; |
|
- | 13 | } |
|
11 | if (state==true) selected_count++; |
14 | if (state==true) selected_count++; |
12 | if (state==false) selected_count--; |
15 | if (state==false) selected_count--; |
13 | } |
16 | } |
Line 14... | Line 17... | ||
14 | 17 | ||
Line 25... | Line 28... | ||
25 | dword size_buf = 0; |
28 | dword size_buf = 0; |
26 | dword copy_buf_offset = 0; |
29 | dword copy_buf_offset = 0; |
27 | 30 | ||
Line 28... | Line 31... | ||
28 | if (files.count<=0) return; //no files |
31 | if (files.count<=0) return; //no files |
- | 32 | ||
29 | if (selected_count==0) setElementSelectedFlag(files.cur_y, true); //no element selected by "insert", so we copy current element |
33 | //if no element selected by "Insert" key, then we copy current element |
- | 34 | if (!selected_count) |
|
- | 35 | setElementSelectedFlag(files.cur_y, true); |
|
- | 36 | ||
- | 37 | if (!selected_count) return; |
|
- | 38 | ||
30 | size_buf = 4; |
39 | size_buf = 4; |
31 | for (i=0; i |
40 | for (i=0; i |
32 | { |
41 | { |
33 | if (getElementSelectedFlag(i) == true) { |
42 | if (getElementSelectedFlag(i) == true) { |
34 | sprintf(#copy_t,"%s/%s",#path,file_mas[i]*304+buf+72); |
43 | sprintf(#copy_t,"%s/%s",#path,file_mas[i]*304+buf+72); |