Rev 5804 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5804 | Rev 5883 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | enum {NOCUT, CUT}; |
5 | enum {NOCUT, CUT}; |
Line 6... | Line 6... | ||
6 | 6 | ||
Line -... | Line 7... | ||
- | 7 | Clipboard clipboard; |
|
7 | Clipboard clipboard; |
8 | |
8 | 9 | dword _copy_path_ = 0; |
|
9 | void Copy(dword pcth, char cut) |
10 | void Copy(dword pcth, char cut) |
10 | { |
11 | { |
11 | dword selected_offset2; |
12 | dword selected_offset2; |
12 | byte copy_t[4096]; |
13 | byte copy_t[4096]; |
- | 14 | dword buff_data; |
|
13 | dword buff_data; |
15 | int ind = 0; |
14 | int ind = 0; |
16 | /* |
15 | if (selected_count) |
17 | if (selected_count) |
16 | { |
18 | { |
17 | buff_data = malloc(selected_count*4096+10); |
19 | buff_data = malloc(selected_count*4096+10); |
Line 40... | Line 42... | ||
40 | clipboard.SetSlotData(4106, buff_data); |
42 | clipboard.SetSlotData(4106, buff_data); |
41 | } |
43 | } |
42 | cut_active = cut; |
44 | cut_active = cut; |
43 | free(buff_data); |
45 | free(buff_data); |
44 | } |
46 | */ |
- | 47 | _copy_path_ = strdup(#file_path); |
|
- | 48 | cut_active = cut; |
|
- | 49 | } |
|
45 | 50 | ||
Line 46... | Line 51... | ||
46 | 51 | ||
47 | void Paste() { |
52 | void Paste() { |
Line 54... | Line 59... | ||
54 | char copy_rezult; |
59 | char copy_rezult; |
55 | int j; |
60 | int j; |
56 | int cnt = 0; |
61 | int cnt = 0; |
57 | dword buf; |
62 | dword buf; |
58 | file_count_copy = 0; |
63 | dword tmp; |
- | 64 | file_count_copy = 0; |
|
59 | copy_bar.value = 0; |
65 | copy_bar.value = 0; |
60 | 66 | if(_copy_path_) |
|
- | 67 | { |
|
61 | buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1); |
68 | DisplayOperationForm(); |
- | 69 | IF(!TEMP) TEMP = malloc(4096); |
|
- | 70 | buf = _copy_path_; |
|
- | 71 | while(DSBYTE[buf]) |
|
- | 72 | { |
|
- | 73 | IF(DSBYTE[buf]=='/')tmp = buf; |
|
- | 74 | buf++; |
|
- | 75 | } |
|
- | 76 | sprintf(TEMP,"%s/%s",#path,tmp); |
|
- | 77 | IF(cut_active) fs.move(_copy_path_,TEMP); |
|
- | 78 | ELSE fs.copy(_copy_path_,TEMP); |
|
- | 79 | free(_copy_path_); |
|
- | 80 | DialogExit(); |
|
- | 81 | } |
|
- | 82 | _copy_path_ = 0; |
|
- | 83 | /* |
|
- | 84 | buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1); |
|
62 | if (DSDWORD[buf+4] != 3) return; |
85 | if (DSDWORD[buf+4] != 3) return; |
63 | cnt = ESINT[buf+8]; |
86 | cnt = ESINT[buf+8]; |
64 | for (j = 0; j < cnt; j++) { |
87 | for (j = 0; j < cnt; j++) { |
65 | strlcpy(#copy_from, j*4096+buf+10, 4096); |
88 | strlcpy(#copy_from, j*4096+buf+10, 4096); |
66 | GetFileInfo(#copy_from, #file_info_count); |
89 | GetFileInfo(#copy_from, #file_info_count); |
Line 99... | Line 122... | ||
99 | //strcpy(#file_path, #copy_from); |
122 | //strcpy(#file_path, #copy_from); |
100 | Del_File2(#copy_from, 0); |
123 | Del_File2(#copy_from, 0); |
101 | 124 | ||
Line 102... | Line 125... | ||
102 | } |
125 | } |
103 | } |
126 | }*/ |
104 | if (cut_active) |
- | |
105 | { |
- | |
106 | cut_active=false; |
127 | cut_active=false; |
107 | } |
- | |
108 | if (info_after_copy) notify(INFO_AFTER_COPY); |
128 | if (info_after_copy) notify(INFO_AFTER_COPY); |
109 | DialogExit(); |
129 | |
110 | }>> |
130 | }>> |
111 | 131 |