Rev 5513 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5513 | Rev 5514 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | //Leency 2008-2014 |
- | |
2 | - | ||
3 | #ifdef LANG_RUS |
- | |
4 | ?define INFO_AFTER_COPY "®¯¨à®¢ ¨¥ § ¢¥à襮" |
- | |
5 | #elif LANG_EST |
- | |
6 | ?define INFO_AFTER_COPY "Copy finished" |
- | |
7 | #else |
- | |
8 | ?define INFO_AFTER_COPY "Copy finished" |
- | |
9 | #endif |
- | |
Line 10... | Line 1... | ||
10 | 1 | byte copy_to[4096]; |
|
- | 2 | byte copy_from[4096]; |
|
11 | byte copy_to[4096]; |
3 | byte cut_active=0; |
Line 12... | Line 4... | ||
12 | byte cut_active=0; |
4 | |
Line 13... | Line 5... | ||
13 | 5 | enum {NOCUT, CUT, COPY_PASTE_END}; |
|
Line 51... | Line 43... | ||
51 | } |
43 | cut_active = cut; |
52 | cut_active = cut; |
44 | free(buff_data); |
53 | free(buff_data); |
45 | } |
54 | } |
46 | |
Line 55... | Line -... | ||
55 | - | ||
56 | void copyf_Draw_Progress(dword filename) { |
- | |
57 | DrawRectangle(0,0,WIN_COPY_W-5, 15,sc.work); |
- | |
58 | WriteText(5,8, 0x80, sc.work_text, T_PASTE_WINDOW_TEXT); |
- | |
59 | DrawBar(5, 26, WIN_COPY_W-10, 10, sc.work); |
- | |
60 | WriteText(5,26, 0x80, sc.work_text, filename); |
- | |
Line 61... | Line 47... | ||
61 | } |
47 | |
62 | 48 | void Paste() |
|
63 | void Paste() |
49 | { |
64 | { |
- | |
65 | char copy_rezult; |
50 | char copy_rezult; |
66 | byte copy_from[4096]; |
51 | int j; |
67 | int j; |
52 | int cnt = 0; |
Line 68... | Line 53... | ||
68 | int cnt = 0; |
53 | dword buf; |
Line 85... | Line 70... | ||
85 | if (strstr(#copy_to, #copy_from)) |
70 | { |
86 | { |
71 | notify("Copy directory into itself is a bad idea..."); |
87 | notify("Copy directory into itself is a bad idea..."); |
72 | CopyExit(); |
88 | CopyExit(); |
73 | } |
89 | } |
74 | |
- | 75 | DisplayCopyfForm(); |
|
- | 76 | ||
- | 77 | if (copy_rezult = copyf(#copy_from,#copy_to)) |
|
90 | if (copy_rezult = copyf(#copy_from,#copy_to)) |
78 | { |
91 | { |
79 | Write_Error(copy_rezult); |
92 | Write_Error(copy_rezult); |
80 | } |
93 | } |
81 | else if (cut_active) |
94 | - | ||
95 | else if (cut_active) |
82 | { |
96 | { |
83 | strcpy(#file_path, #copy_from); |
97 | strcpy(#file_path, #copy_from); |
84 | Del_File(true); |
98 | Del_File(true); |
85 | |
Line 105... | Line 92... | ||
105 | } |
92 | if (info_after_copy) notify(INFO_AFTER_COPY); |
106 | if (info_after_copy) notify(INFO_AFTER_COPY); |
93 | CopyExit(); |
107 | CopyExit(); |
94 | } |
108 | } |
95 | |
Line -... | Line 96... | ||
- | 96 | #define WIN_COPY_W 345 |
|
- | 97 | #define WIN_COPY_H 80 |
|
- | 98 | proc_info Copy_Form; |
|
- | 99 | ||
109 | 100 | void DisplayCopyfForm() |
|
- | 101 | { |
|
- | 102 | switch(CheckEvent()) |
|
110 | void CopyExit() |
103 | { |
- | 104 | case evButton: |
|
- | 105 | notify(T_CANCEL_PASTE); |
|
- | 106 | CopyExit(); |
|
- | 107 | break; |
|
- | 108 | ||
- | 109 | case evReDraw: |
|
- | 110 | DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_COPY_W,GetSkinHeight()+WIN_COPY_H,0x34,sc.work,T_PASTE_WINDOW_TITLE); |
|
- | 111 | GetProcessInfo(#Copy_Form, SelfInfo); |
|
- | 112 | WriteText(45, 11, 0x80, sc.work_text, T_PASTE_WINDOW_TEXT); |
|
- | 113 | DrawFlatButton(Copy_Form.cwidth - 90, Copy_Form.cheight - 32, 80, 22, 10, sc.work_button, T_PASTE_WINDOW_BUTTON); |
|
- | 114 | DrawBar(8, 10, 32, 32, 0xFFFfff); |
|
- | 115 | break; |
|
- | 116 | } |
|
- | 117 | } |
|
- | 118 | ||
- | 119 | void CopyExit() { |
|
111 | { |
120 | action_buf = COPY_PASTE_END; |
112 | action_buf = COPY_PASTE_END; |
121 | ActivateWindow(GetProcessSlot(Form.ID)); |
113 | ActivateWindow(GetProcessSlot(Form.ID)); |
122 | ExitProcess(); |
114 | ExitProcess(); |
123 | } |
115 | }> |
124 | |
- | 125 | ||
- | 126 | void copyf_Draw_Progress(dword copying_filename) { |
|
- | 127 | if (Copy_Form.cwidth==0) return; |
|
- | 128 | DisplayCopyfForm(); |
|
- | 129 | Put_icon(copying_filename+strrchr(copying_filename,'.'), 16, 19, 0xFFFfff, 0); |
|
- | 130 | DrawBar(45, 29, Copy_Form.cwidth-40, 10, sc.work); |
|
- | 131 | WriteText(45, 29, 0x80, sc.work_text, copying_filename); |
|
- | 132 | }> |
|
- | 133 | ||
116 | 134 |