Rev 4861 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4861 | Rev 4864 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | Clipboard clipboard; |
15 | Clipboard clipboard; |
Line 16... | Line 16... | ||
16 | 16 | ||
17 | struct Copy_Path { |
17 | struct Copy_Path { |
18 | dword size; |
18 | dword size; |
- | 19 | dword type; |
|
19 | dword type; |
20 | int count; |
20 | path_str copy_list[MAX_HISTORY_NUM]; |
21 | path_str copy_list[MAX_HISTORY_NUM]; |
Line 21... | Line 22... | ||
21 | }; |
22 | }; |
Line 22... | Line 23... | ||
22 | 23 | ||
23 | Copy_Path copy_path; |
24 | Copy_Path copy_path; |
24 | - | ||
25 | void add_to_copy(dword pcth) |
25 | |
- | 26 | void add_to_copy(dword pcth) |
|
- | 27 | { |
|
26 | { |
28 | strlcpy(#copy_path.copy_list[id_add_to_copy].Item, pcth); |
- | 29 | if (add_to_copy_active == 1) |
|
- | 30 | { |
|
- | 31 | id_add_to_copy++; |
|
27 | add_to_copy_active=1; |
32 | copy_path.count = id_add_to_copy; |
Line 28... | Line 33... | ||
28 | strlcpy(#copy_path.copy_list[id_add_to_copy].Item, pcth); |
33 | } |
29 | id_add_to_copy++; |
34 | else copy_path.count = 1; |
30 | } |
35 | } |
31 | 36 | ||
32 | 37 | ||
33 | void Copy(dword pcth, char cut) |
38 | void Copy(dword pcth, char cut) |
34 | { |
39 | { |
35 | add_to_copy(pcth); |
40 | if (add_to_copy_active == 0) add_to_copy(pcth); |
Line 56... | Line 61... | ||
56 | 61 | ||
57 | void Paste() |
62 | void Paste() |
58 | { |
63 | { |
59 | char copy_rezult; |
64 | char copy_rezult; |
60 | byte copy_from[4096]; |
65 | byte copy_from[4096]; |
- | 66 | int tst, count; |
|
- | 67 | dword buf; |
|
- | 68 | ||
- | 69 | buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1); |
|
- | 70 | count = DSINT[buf+8]; |
|
- | 71 | debugi(count); |
|
- | 72 | ||
- | 73 | add_to_copy_active=0; |
|
Line 61... | Line 74... | ||
61 | int tst; |
74 | id_add_to_copy=0; |
62 | 75 | ||
63 | for (j = 0; j < MAX_HISTORY_NUM; j++) { |
76 | for (j = 0; j < count; j++) { |
64 | tst = j*4096; |
77 | tst = j*4096; |
65 | strlcpy(#copy_from, clipboard.GetSlotData(clipboard.GetSlotCount()-1)+8+tst, 4096); |
78 | strlcpy(#copy_from, buf+12+tst, 4096); |
66 | debug(#copy_from); |
79 | debug(#copy_from); |
67 | if (!copy_from) CopyExit(); |
80 | if (!copy_from) CopyExit(); |
68 | strcpy(#copy_to, #path); |
81 | strcpy(#copy_to, #path); |
Line 91... | Line 104... | ||
91 | { |
104 | { |
92 | strcpy(#file_path, #copy_from); |
105 | strcpy(#file_path, #copy_from); |
93 | Del_File(true); |
106 | Del_File(true); |
94 | cut_active=false; |
107 | cut_active=false; |
95 | } |
108 | } |
96 | for (j = 0; j < MAX_HISTORY_NUM; j++) strcpy(#copy_path.copy_list[j].Item, 0); |
109 | for (j = 0; j < MAX_HISTORY_NUM; j++) strcpy(#copy_path.copy_list[j].Item[0], 0); |
97 | add_to_copy_active=0; |
- | |
98 | id_add_to_copy=0; |
- | |
99 | CopyExit(); |
110 | CopyExit(); |
100 | } |
111 | } |
Line 101... | Line 112... | ||
101 | 112 | ||
102 | void CopyExit() |
113 | void CopyExit() |