Rev 6635 | Rev 6646 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6635 | Rev 6641 | ||
---|---|---|---|
1 | #ifdef LANG_RUS |
1 | #ifdef LANG_RUS |
2 | ?define WINDOW_TITLE_PROPERTIES "¢®©á⢠" |
2 | ?define WINDOW_TITLE_PROPERTIES "¢®©á⢠" |
3 | ?define BTN_CLOSE " ªàëâì" |
3 | ?define BTN_CLOSE " ªàëâì" |
4 | ?define BTN_APPLY "ਬ¥¨âì" |
4 | ?define BTN_APPLY "ਬ¥¨âì" |
5 | ?define QUEST_1 "ਬ¥¨âì ª® ¢á¥¬ ¢«®¦¥ë¬" |
5 | ?define QUEST_1 "ਬ¥¨âì ª® ¢á¥¬ ¢«®¦¥ë¬" |
6 | ?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬?" |
6 | ?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬?" |
7 | ?define PR_T_NAME "•:" |
7 | ?define PR_T_NAME "•:" |
8 | ?define PR_T_DEST " ᯮ«®¦¥¨¥:" |
8 | ?define PR_T_DEST " ᯮ«®¦¥¨¥:" |
9 | ?define PR_T_SIZE " §¬¥à:" |
9 | ?define PR_T_SIZE " §¬¥à:" |
10 | ?define CREATED_OPENED_MODIFIED "®§¤ :\nâªàëâ:\n§¬¥¥:" |
10 | ?define CREATED_OPENED_MODIFIED "®§¤ :\nâªàëâ:\n§¬¥¥:" |
11 | ?define SET_6 " ©«®¢: " |
11 | ?define SET_6 " ©«®¢: " |
12 | ?define SET_7 " ¯®ª: " |
12 | ?define SET_7 " ¯®ª: " |
13 | ?define PR_T_CONTAINS "®¤¥à¦¨â: " |
13 | ?define PR_T_CONTAINS "®¤¥à¦¨â: " |
14 | ?define FLAGS " ââਡãâë " |
14 | ?define FLAGS " ââਡãâë " |
15 | ?define PR_T_HIDDEN "ªàëâë©" |
15 | ?define PR_T_HIDDEN "ªàëâë©" |
16 | ?define PR_T_SYSTEM "¨á⥬ë©" |
16 | ?define PR_T_SYSTEM "¨á⥬ë©" |
17 | ?define PR_T_ONLY_READ "®«ìª® ç⥨¥" |
17 | ?define PR_T_ONLY_READ "®«ìª® ç⥨¥" |
18 | ?define SET_BYTE_LANG "¡ ©â" |
18 | ?define SET_BYTE_LANG "¡ ©â" |
19 | ?define TAB_T_BASIC "¡é¨¥" |
19 | ?define TAB_T_BASIC "¡é¨¥" |
20 | ?define TAB_T_DETAILS "®¤à®¡¥¥" |
20 | ?define TAB_T_DETAILS "®¤à®¡¥¥" |
21 | #else // Apply to all subfolders |
21 | #else // Apply to all subfolders |
22 | ?define WINDOW_TITLE_PROPERTIES "Properties" |
22 | ?define WINDOW_TITLE_PROPERTIES "Properties" |
23 | ?define BTN_CLOSE "Close" |
23 | ?define BTN_CLOSE "Close" |
24 | ?define BTN_APPLY "Apply" |
24 | ?define BTN_APPLY "Apply" |
25 | ?define QUEST_1 "Apply to all subfolders" |
25 | ?define QUEST_1 "Apply to all subfolders" |
26 | ?define QUEST_2 "files and Folders?" |
26 | ?define QUEST_2 "files and Folders?" |
27 | ?define PR_T_NAME "Name:" |
27 | ?define PR_T_NAME "Name:" |
28 | ?define PR_T_DEST "Destination:" |
28 | ?define PR_T_DEST "Destination:" |
29 | ?define PR_T_SIZE "Size:" |
29 | ?define PR_T_SIZE "Size:" |
30 | ?define CREATED_OPENED_MODIFIED "Created:\nOpened:\nModified:" |
30 | ?define CREATED_OPENED_MODIFIED "Created:\nOpened:\nModified:" |
31 | ?define SET_6 "Files: " |
31 | ?define SET_6 "Files: " |
32 | ?define SET_7 " Folders: " |
32 | ?define SET_7 " Folders: " |
33 | ?define PR_T_CONTAINS "Contains: " |
33 | ?define PR_T_CONTAINS "Contains: " |
34 | ?define FLAGS " Attributes " |
34 | ?define FLAGS " Attributes " |
35 | ?define PR_T_HIDDEN "Hidden" |
35 | ?define PR_T_HIDDEN "Hidden" |
36 | ?define PR_T_SYSTEM "System" |
36 | ?define PR_T_SYSTEM "System" |
37 | ?define PR_T_ONLY_READ "Read-only" |
37 | ?define PR_T_ONLY_READ "Read-only" |
38 | ?define SET_BYTE_LANG "byte" |
38 | ?define SET_BYTE_LANG "byte" |
39 | ?define TAB_T_BASIC "Basic" |
39 | ?define TAB_T_BASIC "Basic" |
40 | ?define TAB_T_DETAILS "Details" |
40 | ?define TAB_T_DETAILS "Details" |
41 | #endif |
41 | #endif |
42 | 42 | ||
43 | dword mouse_ddd2; |
43 | dword mouse_ddd2; |
44 | char path_to_file[4096]="\0"; |
44 | char path_to_file[4096]="\0"; |
45 | char file_name2[4096]="\0"; |
45 | char file_name2[4096]="\0"; |
46 | edit_box file_name_ed = {230,50,57,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,4098,#file_name2,#mouse_ddd2, 1000000000000000b,2,2}; |
46 | edit_box file_name_ed = {230,50,57,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,4098,#file_name2,#mouse_ddd2, 1000000000000000b,2,2}; |
47 | edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,4098,#path_to_file,#mouse_ddd2, 1000000000000000b,2,2}; |
47 | edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,4098,#path_to_file,#mouse_ddd2, 1000000000000000b,2,2}; |
48 | frame flags_frame = { 0, NULL, 10, 92, 212, 0x000111, 0xFFFfff, 1, FLAGS, 0, 1, 12, 0x000111, 0xFFFFFF }; |
48 | frame flags_frame = { 0, NULL, 10, 92, 212, 0x000111, 0xFFFfff, 1, FLAGS, 0, 1, 12, 0x000111, 0xFFFFFF }; |
49 | 49 | ||
50 | //NewElement options |
50 | //NewElement options |
51 | enum { |
51 | enum { |
52 | TAB_BASIC, |
52 | TAB_BASIC, |
53 | TAB_DETAILS, |
53 | TAB_DETAILS, |
54 | }; |
54 | }; |
55 | 55 | ||
56 | byte active_tab; |
56 | byte active_tab; |
57 | int file_count, dir_count, size_dir; |
57 | int file_count, dir_count, size_dir; |
58 | char folder_info[200]; |
58 | char folder_info[200]; |
59 | dword element_size; |
59 | dword element_size; |
60 | char element_size_label[32]; |
60 | char element_size_label[32]; |
61 | BDVK file_info_general; |
61 | BDVK file_info_general; |
62 | BDVK file_info_dirsize; |
62 | BDVK file_info_dirsize; |
63 | 63 | ||
64 | proc_info settings_form; |
64 | proc_info settings_form; |
65 | bool quest_active, atr_readonly, atr_hidden, atr_system; |
65 | bool quest_active, atr_readonly, atr_hidden, atr_system; |
66 | 66 | ||
67 | void SetPropertiesDir(dword way) |
67 | void SetPropertiesDir(dword way) |
68 | { |
68 | { |
69 | dword dirbuf, fcount, i, filename; |
69 | dword dirbuf, fcount, i, filename; |
70 | dword cur_file; |
70 | dword cur_file; |
71 | if (dir_exists(way)) |
71 | if (dir_exists(way)) |
72 | { |
72 | { |
73 | cur_file = malloc(4096); |
73 | cur_file = malloc(4096); |
74 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
74 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
75 | for (i=0; i |
75 | for (i=0; i |
76 | { |
76 | { |
77 | filename = i*304+dirbuf+72; |
77 | filename = i*304+dirbuf+72; |
78 | strcpy(cur_file, way); |
78 | strcpy(cur_file, way); |
79 | chrcat(cur_file, '/'); |
79 | chrcat(cur_file, '/'); |
80 | strcat(cur_file, filename); |
80 | strcat(cur_file, filename); |
81 | if ( TestBit(ESDWORD[filename-40], 4) ) |
81 | if ( TestBit(ESDWORD[filename-40], 4) ) |
82 | { |
82 | { |
83 | SetPropertiesDir(cur_file); |
83 | SetPropertiesDir(cur_file); |
84 | } |
84 | } |
85 | GetFileInfo(cur_file, #file_info_dirsize); |
85 | GetFileInfo(cur_file, #file_info_dirsize); |
86 | file_info_dirsize.readonly = atr_readonly; |
86 | file_info_dirsize.readonly = atr_readonly; |
87 | file_info_dirsize.hidden = atr_hidden; |
87 | file_info_dirsize.hidden = atr_hidden; |
88 | file_info_dirsize.system = atr_system; |
88 | file_info_dirsize.system = atr_system; |
89 | SetFileInfo(cur_file, #file_info_dirsize); |
89 | SetFileInfo(cur_file, #file_info_dirsize); |
90 | } |
90 | } |
91 | free(cur_file); |
91 | free(cur_file); |
92 | } |
92 | } |
93 | } |
93 | } |
94 | 94 | ||
95 | void SetProperties(byte prop) |
95 | void SetProperties(byte prop) |
96 | { |
96 | { |
97 | dword cur_file; |
97 | dword cur_file; |
98 | dword selected_offset2; |
98 | dword selected_offset2; |
99 | 99 | ||
100 | if (prop==1) || (prop==2) |
100 | if (prop==1) || (prop==2) |
101 | { |
101 | { |
102 | if (selected_count) |
102 | if (selected_count) |
103 | { |
103 | { |
104 | cur_file = malloc(4096); |
104 | cur_file = malloc(4096); |
105 | for (i=0; i |
105 | for (i=0; i |
106 | { |
106 | { |
107 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
107 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
108 | if (ESBYTE[selected_offset2]) |
108 | if (ESBYTE[selected_offset2]) |
109 | { |
109 | { |
110 | strcpy(cur_file, #path); |
110 | strcpy(cur_file, #path); |
111 | strcat(cur_file, file_mas[i]*304+buf+72); |
111 | strcat(cur_file, file_mas[i]*304+buf+72); |
112 | GetFileInfo(cur_file, #file_info_general); |
112 | GetFileInfo(cur_file, #file_info_general); |
113 | file_info_general.readonly = atr_readonly; |
113 | file_info_general.readonly = atr_readonly; |
114 | file_info_general.hidden = atr_hidden; |
114 | file_info_general.hidden = atr_hidden; |
115 | file_info_general.system = atr_system; |
115 | file_info_general.system = atr_system; |
116 | SetFileInfo(cur_file, #file_info_general); |
116 | SetFileInfo(cur_file, #file_info_general); |
117 | if (prop==2) |
117 | if (prop==2) |
118 | { |
118 | { |
119 | if (dir_exists(cur_file)) |
119 | if (dir_exists(cur_file)) |
120 | { |
120 | { |
121 | SetPropertiesDir(cur_file); |
121 | SetPropertiesDir(cur_file); |
122 | } |
122 | } |
123 | } |
123 | } |
124 | } |
124 | } |
125 | } |
125 | } |
126 | free(cur_file); |
126 | free(cur_file); |
127 | } |
127 | } |
128 | else |
128 | else |
129 | { |
129 | { |
130 | GetFileInfo(#file_path, #file_info_general); |
130 | GetFileInfo(#file_path, #file_info_general); |
131 | file_info_general.readonly = atr_readonly; |
131 | file_info_general.readonly = atr_readonly; |
132 | file_info_general.hidden = atr_hidden; |
132 | file_info_general.hidden = atr_hidden; |
133 | file_info_general.system = atr_system; |
133 | file_info_general.system = atr_system; |
134 | SetFileInfo(#file_path, #file_info_general); |
134 | SetFileInfo(#file_path, #file_info_general); |
135 | if (prop==2) SetPropertiesDir(#file_path); |
135 | if (prop==2) SetPropertiesDir(#file_path); |
136 | } |
136 | } |
137 | quest_active = 0; |
137 | quest_active = 0; |
138 | DrawPropertiesWindow(); |
138 | DrawPropertiesWindow(); |
139 | } |
139 | } |
140 | else |
140 | else |
141 | { |
141 | { |
142 | GetFileInfo(#file_path, #file_info_general); |
142 | GetFileInfo(#file_path, #file_info_general); |
143 | file_info_general.readonly = atr_readonly; |
143 | file_info_general.readonly = atr_readonly; |
144 | file_info_general.hidden = atr_hidden; |
144 | file_info_general.hidden = atr_hidden; |
145 | file_info_general.system = atr_system; |
145 | file_info_general.system = atr_system; |
146 | SetFileInfo(#file_path, #file_info_general); |
146 | SetFileInfo(#file_path, #file_info_general); |
147 | } |
147 | } |
148 | cmd_free=3; |
148 | cmd_free=3; |
149 | _not_draw = true; |
149 | _not_draw = true; |
150 | Open_Dir(#path,WITH_REDRAW); |
150 | Open_Dir(#path,WITH_REDRAW); |
151 | _not_draw = false; |
151 | _not_draw = false; |
152 | EventRedrawWindow(Form.left,Form.top); |
152 | EventRedrawWindow(Form.left,Form.top); |
153 | ExitProcess(); |
153 | ExitProcess(); |
154 | } |
154 | } |
155 | 155 | ||
156 | void ShowConfirmQuestionPopin() |
156 | void ShowConfirmQuestionPopin() |
157 | { |
157 | { |
158 | quest_active = 1; |
158 | quest_active = 1; |
159 | DrawPopup(15,80,250,90,1,system.color.work, system.color.work_graph); |
159 | DrawPopup(15,80,250,90,1,system.color.work, system.color.work_graph); |
160 | WriteText(35, 102, 0x90, 0x000000, QUEST_1); |
160 | WriteText(35, 102, 0x90, 0x000000, QUEST_1); |
161 | WriteText(65, 117, 0x90, 0x000000, QUEST_2); |
161 | WriteText(65, 117, 0x90, 0x000000, QUEST_2); |
162 | DrawFlatButton(62,138,70,20,301,T_YES); |
162 | DrawFlatButton(62,138,70,20,301,T_YES); |
163 | DrawFlatButton(155,138,70,20,302,T_NO); |
163 | DrawFlatButton(155,138,70,20,302,T_NO); |
164 | } |
164 | } |
165 | 165 | ||
166 | void GetSizeDir(dword way) |
166 | void GetSizeDir(dword way) |
167 | { |
167 | { |
168 | dword dirbuf, fcount, i, filename; |
168 | dword dirbuf, fcount, i, filename; |
169 | dword cur_file; |
169 | dword cur_file; |
170 | if (dir_exists(way)) |
170 | if (dir_exists(way)) |
171 | { |
171 | { |
172 | cur_file = malloc(4096); |
172 | cur_file = malloc(4096); |
173 | // In the process of recursive descent, memory must be allocated dynamically, |
173 | // In the process of recursive descent, memory must be allocated dynamically, |
174 | // because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed. |
174 | // because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed. |
175 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
175 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
176 | for (i=0; i |
176 | for (i=0; i |
177 | { |
177 | { |
178 | filename = i*304+dirbuf+72; |
178 | filename = i*304+dirbuf+72; |
179 | sprintf(cur_file,"%s/%s",way,filename); |
179 | sprintf(cur_file,"%s/%s",way,filename); |
180 | 180 | ||
181 | if (TestBit(ESDWORD[filename-40], 4) ) |
181 | if (TestBit(ESDWORD[filename-40], 4) ) |
182 | { |
182 | { |
183 | dir_count++; |
183 | dir_count++; |
184 | GetSizeDir(cur_file); |
184 | GetSizeDir(cur_file); |
185 | } |
185 | } |
186 | else |
186 | else |
187 | { |
187 | { |
188 | GetFileInfo(cur_file, #file_info_dirsize); |
188 | GetFileInfo(cur_file, #file_info_dirsize); |
189 | size_dir += file_info_dirsize.sizelo; |
189 | size_dir += file_info_dirsize.sizelo; |
190 | file_count++; |
190 | file_count++; |
191 | } |
191 | } |
192 | } |
192 | } |
193 | free(cur_file); |
193 | free(cur_file); |
194 | } |
194 | } |
195 | } |
195 | } |
196 | 196 | ||
197 | void GetSizeMoreFiles(dword way) |
197 | void GetSizeMoreFiles(dword way) |
198 | { |
198 | { |
199 | char cur_file[4096]; |
199 | char cur_file[4096]; |
200 | dword selected_offset2; |
200 | dword selected_offset2; |
201 | 201 | ||
202 | for (i=0; i |
202 | for (i=0; i |
203 | { |
203 | { |
204 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
204 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
205 | if (ESBYTE[selected_offset2]) { |
205 | if (ESBYTE[selected_offset2]) { |
206 | sprintf(#cur_file,"%s/%s",way,file_mas[i]*304+buf+72); |
206 | sprintf(#cur_file,"%s/%s",way,file_mas[i]*304+buf+72); |
207 | if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) ) |
207 | if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) ) |
208 | { |
208 | { |
209 | GetSizeDir(#cur_file); |
209 | GetSizeDir(#cur_file); |
210 | dir_count++; |
210 | dir_count++; |
211 | } |
211 | } |
212 | else |
212 | else |
213 | { |
213 | { |
214 | GetFileInfo(#cur_file, #file_info_dirsize); |
214 | GetFileInfo(#cur_file, #file_info_dirsize); |
215 | size_dir += file_info_dirsize.sizelo; |
215 | size_dir += file_info_dirsize.sizelo; |
216 | file_count++; |
216 | file_count++; |
217 | } |
217 | } |
218 | } |
218 | } |
219 | } |
219 | } |
220 | } |
220 | } |
221 | 221 | ||
222 | void properties_dialog() |
222 | void properties_dialog() |
223 | { |
223 | { |
224 | byte id; |
224 | byte id; |
225 | dword file_name_off; |
225 | dword file_name_off; |
226 | dword selected_offset2; |
226 | dword selected_offset2; |
227 | 227 | ||
228 | DSBYTE[#folder_info]=0; |
228 | DSBYTE[#folder_info]=0; |
229 | file_count = 0; |
229 | file_count = 0; |
230 | dir_count = 0; |
230 | dir_count = 0; |
231 | size_dir = 0; |
231 | size_dir = 0; |
232 | 232 | ||
233 | if (selected_count) |
233 | if (selected_count) |
234 | { |
234 | { |
235 | GetSizeMoreFiles(#path); |
235 | GetSizeMoreFiles(#path); |
236 | atr_readonly = 0; |
236 | atr_readonly = 0; |
237 | atr_hidden = 0; |
237 | atr_hidden = 0; |
238 | atr_system = 0; |
238 | atr_system = 0; |
239 | } |
239 | } |
240 | else |
240 | else |
241 | { |
241 | { |
242 | GetFileInfo(#file_path, #file_info_general); |
242 | GetFileInfo(#file_path, #file_info_general); |
243 | strcpy(#file_name2, #file_name); |
243 | strcpy(#file_name2, #file_name); |
244 | file_name_ed.size = strlen(#file_name2); |
244 | file_name_ed.size = strlen(#file_name2); |
245 | if(itdir) GetSizeDir(#file_path); |
245 | if(itdir) GetSizeDir(#file_path); |
246 | atr_readonly = file_info_general.readonly; |
246 | atr_readonly = file_info_general.readonly; |
247 | atr_hidden = file_info_general.hidden; |
247 | atr_hidden = file_info_general.hidden; |
248 | atr_system = file_info_general.system; |
248 | atr_system = file_info_general.system; |
249 | } |
249 | } |
250 | strcpy(#path_to_file, #path); |
250 | strcpy(#path_to_file, #path); |
251 | path_to_file_ed.size = strlen(#path_to_file); |
251 | path_to_file_ed.size = strlen(#path_to_file); |
252 | 252 | ||
253 | SetEventMask(0x27); |
253 | SetEventMask(0x27); |
254 | loop() switch(WaitEvent()) |
254 | loop() switch(WaitEvent()) |
255 | { |
255 | { |
256 | case evButton: |
256 | case evButton: |
257 | id=GetButtonID(); |
257 | id=GetButtonID(); |
258 | if (quest_active) |
258 | if (quest_active) |
259 | { |
259 | { |
260 | IF (id==301) SetProperties(2); |
260 | IF (id==301) SetProperties(2); |
261 | IF (id==302) SetProperties(1); |
261 | IF (id==302) SetProperties(1); |
262 | quest_active=false; |
262 | quest_active=false; |
263 | break; |
263 | break; |
264 | } |
264 | } |
265 | if (id==1) || (id==10) |
265 | if (id==1) || (id==10) |
266 | { |
266 | { |
267 | cmd_free=3; |
267 | cmd_free=3; |
268 | ExitProcess(); |
268 | ExitProcess(); |
269 | } |
269 | } |
270 | IF (id==11) |
270 | IF (id==11) |
271 | { |
271 | { |
272 | if (selected_count) || (itdir) |
272 | if (selected_count) || (itdir) |
273 | { |
273 | { |
274 | ShowConfirmQuestionPopin(); |
274 | ShowConfirmQuestionPopin(); |
275 | } |
275 | } |
276 | else |
276 | else |
277 | { |
277 | { |
278 | SetProperties(0); |
278 | SetProperties(0); |
279 | } |
279 | } |
280 | break; |
280 | break; |
281 | } |
281 | } |
282 | if (id==12) |
282 | if (id==12) |
283 | { |
283 | { |
284 | active_tab = TAB_BASIC; |
284 | active_tab = TAB_BASIC; |
285 | DrawPropertiesWindow(); |
285 | DrawPropertiesWindow(); |
286 | } |
286 | } |
287 | if (id==13) |
287 | if (id==13) |
288 | { |
288 | { |
289 | active_tab = TAB_DETAILS; |
289 | active_tab = TAB_DETAILS; |
290 | DrawPropertiesWindow(); |
290 | DrawPropertiesWindow(); |
291 | } |
291 | } |
292 | if (id==20) |
292 | if (id==20) |
293 | { |
293 | { |
294 | atr_readonly ^= 1; |
294 | atr_readonly ^= 1; |
295 | DrawPropertiesCheckBoxes(); |
295 | DrawPropertiesCheckBoxes(); |
296 | } |
296 | } |
297 | if (id==21) |
297 | if (id==21) |
298 | { |
298 | { |
299 | atr_hidden ^= 1; |
299 | atr_hidden ^= 1; |
300 | DrawPropertiesCheckBoxes(); |
300 | DrawPropertiesCheckBoxes(); |
301 | } |
301 | } |
302 | if (id==22) |
302 | if (id==22) |
303 | { |
303 | { |
304 | atr_system ^= 1; |
304 | atr_system ^= 1; |
305 | DrawPropertiesCheckBoxes(); |
305 | DrawPropertiesCheckBoxes(); |
306 | } |
306 | } |
307 | break; |
307 | break; |
308 | 308 | ||
309 | case evMouse: |
309 | case evMouse: |
310 | edit_box_mouse stdcall (#file_name_ed); |
310 | edit_box_mouse stdcall (#file_name_ed); |
311 | edit_box_mouse stdcall (#path_to_file_ed); |
311 | edit_box_mouse stdcall (#path_to_file_ed); |
312 | break; |
312 | break; |
313 | 313 | ||
314 | case evKey: |
314 | case evKey: |
315 | GetKeys(); |
315 | GetKeys(); |
316 | 316 | ||
317 | if (quest_active) |
317 | if (quest_active) |
318 | { |
318 | { |
319 | IF (key_scancode==SCAN_CODE_ENTER) SetProperties(2); |
319 | IF (key_scancode==SCAN_CODE_ENTER) SetProperties(2); |
320 | IF (key_scancode==SCAN_CODE_ESC) SetProperties(1); |
320 | IF (key_scancode==SCAN_CODE_ESC) SetProperties(1); |
321 | quest_active=false; |
321 | quest_active=false; |
322 | break; |
322 | break; |
323 | } |
323 | } |
324 | if (key_scancode==SCAN_CODE_ESC) |
324 | if (key_scancode==SCAN_CODE_ESC) |
325 | { |
325 | { |
326 | cmd_free=3; |
326 | cmd_free=3; |
327 | ExitProcess(); |
327 | ExitProcess(); |
328 | } |
328 | } |
329 | if (key_scancode==SCAN_CODE_ENTER) |
329 | if (key_scancode==SCAN_CODE_ENTER) |
330 | { |
330 | { |
331 | if (selected_count) || (itdir) |
331 | if (selected_count) || (itdir) |
332 | { |
332 | { |
333 | ShowConfirmQuestionPopin(); |
333 | ShowConfirmQuestionPopin(); |
334 | } |
334 | } |
335 | else |
335 | else |
336 | { |
336 | { |
337 | SetProperties(0); |
337 | SetProperties(0); |
338 | } |
338 | } |
339 | break; |
339 | break; |
340 | } |
340 | } |
341 | EAX = key_ascii << 8; |
341 | EAX = key_editbox; |
342 | edit_box_key stdcall(#file_name_ed); |
342 | edit_box_key stdcall(#file_name_ed); |
343 | edit_box_key stdcall(#path_to_file_ed); |
343 | edit_box_key stdcall(#path_to_file_ed); |
344 | break; |
344 | break; |
345 | 345 | ||
346 | case evReDraw: |
346 | case evReDraw: |
347 | DrawPropertiesWindow(); |
347 | DrawPropertiesWindow(); |
348 | } |
348 | } |
349 | } |
349 | } |
350 | 350 | ||
351 | void DrawPropertiesWindow() |
351 | void DrawPropertiesWindow() |
352 | { |
352 | { |
353 | DefineAndDrawWindow(Form.left + 150,150,305,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES); |
353 | DefineAndDrawWindow(Form.left + 150,150,305,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES); |
354 | if ( !asm test path_to_file_ed.flags, 2) |
354 | if ( !asm test path_to_file_ed.flags, 2) |
355 | { |
355 | { |
356 | path_to_file_ed.blur_border_color = system.color.work; |
356 | path_to_file_ed.blur_border_color = system.color.work; |
357 | path_to_file_ed.color = system.color.work; |
357 | path_to_file_ed.color = system.color.work; |
358 | } |
358 | } |
359 | else |
359 | else |
360 | { |
360 | { |
361 | path_to_file_ed.blur_border_color = 0x000000; |
361 | path_to_file_ed.blur_border_color = 0x000000; |
362 | path_to_file_ed.color = 0xffffff; |
362 | path_to_file_ed.color = 0xffffff; |
363 | } |
363 | } |
364 | if ( !asm test path_to_file_ed.flags, 2) |
364 | if ( !asm test path_to_file_ed.flags, 2) |
365 | { |
365 | { |
366 | file_name_ed.blur_border_color = system.color.work; |
366 | file_name_ed.blur_border_color = system.color.work; |
367 | file_name_ed.color = system.color.work; |
367 | file_name_ed.color = system.color.work; |
368 | } |
368 | } |
369 | else |
369 | else |
370 | { |
370 | { |
371 | file_name_ed.blur_border_color = 0x000000; |
371 | file_name_ed.blur_border_color = 0x000000; |
372 | file_name_ed.color = 0xffffff; |
372 | file_name_ed.color = 0xffffff; |
373 | } |
373 | } |
374 | GetProcessInfo(#settings_form, SelfInfo); |
374 | GetProcessInfo(#settings_form, SelfInfo); |
375 | DrawFlatButton(10, 5, 80, 24, 12, TAB_T_BASIC); |
375 | DrawFlatButton(10, 5, 80, 24, 12, TAB_T_BASIC); |
376 | if (exif_load==1) DrawFlatButton(92, 5, 80, 24, 13, TAB_T_DETAILS); |
376 | if (exif_load==1) DrawFlatButton(92, 5, 80, 24, 13, TAB_T_DETAILS); |
377 | DrawFlatButton(settings_form.cwidth - 93, settings_form.cheight-34, 80, 24, 10, BTN_CLOSE); |
377 | DrawFlatButton(settings_form.cwidth - 93, settings_form.cheight-34, 80, 24, 10, BTN_CLOSE); |
378 | DrawFlatButton(settings_form.cwidth -183, settings_form.cheight-34, 80, 24, 11, BTN_APPLY); |
378 | DrawFlatButton(settings_form.cwidth -183, settings_form.cheight-34, 80, 24, 11, BTN_APPLY); |
379 | 379 | ||
380 | if (active_tab == TAB_BASIC) |
380 | if (active_tab == TAB_BASIC) |
381 | { |
381 | { |
382 | WriteText(10, 78, 0x90, 0x000000, PR_T_DEST); |
382 | WriteText(10, 78, 0x90, 0x000000, PR_T_DEST); |
383 | edit_box_draw stdcall (#path_to_file_ed); |
383 | edit_box_draw stdcall (#path_to_file_ed); |
384 | 384 | ||
385 | WriteText(10, 97, 0x90, 0x000000, PR_T_SIZE); |
385 | WriteText(10, 97, 0x90, 0x000000, PR_T_SIZE); |
386 | 386 | ||
387 | if (selected_count) |
387 | if (selected_count) |
388 | { |
388 | { |
389 | DrawIconByExtension(NULL, 18, 19, system.color.work); |
389 | DrawIconByExtension(NULL, 18, 19, system.color.work); |
390 | sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); |
390 | sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); |
391 | WriteText(50, 49, 0x90, 0x000000, #folder_info); |
391 | WriteText(50, 49, 0x90, 0x000000, #folder_info); |
392 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize(size_dir),size_dir,SET_BYTE_LANG); |
392 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize(size_dir),size_dir,SET_BYTE_LANG); |
393 | WriteText(120, 97, 0x90, 0x000000, #element_size_label); |
393 | WriteText(120, 97, 0x90, 0x000000, #element_size_label); |
394 | } |
394 | } |
395 | else |
395 | else |
396 | { |
396 | { |
397 | if ( file_info_general.isfolder ) |
397 | if ( file_info_general.isfolder ) |
398 | DrawIconByExtension(" |
398 | DrawIconByExtension(" |
399 | else |
399 | else |
400 | DrawIconByExtension(#file_name2+strrchr(#file_name2,'.'), 18, 49, system.color.work); |
400 | DrawIconByExtension(#file_name2+strrchr(#file_name2,'.'), 18, 49, system.color.work); |
401 | 401 | ||
402 | WriteText(50, 40, 0x90, 0x000000, PR_T_NAME); |
402 | WriteText(50, 40, 0x90, 0x000000, PR_T_NAME); |
403 | edit_box_draw stdcall (#file_name_ed); |
403 | edit_box_draw stdcall (#file_name_ed); |
404 | 404 | ||
405 | if (!itdir) element_size = file_info_general.sizelo; |
405 | if (!itdir) element_size = file_info_general.sizelo; |
406 | else |
406 | else |
407 | { |
407 | { |
408 | WriteText(10,116, 0x90, 0x000000, PR_T_CONTAINS); |
408 | WriteText(10,116, 0x90, 0x000000, PR_T_CONTAINS); |
409 | sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); |
409 | sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); |
410 | WriteText(120, 116, 0x90, 0x000000, #folder_info); |
410 | WriteText(120, 116, 0x90, 0x000000, #folder_info); |
411 | element_size = size_dir; |
411 | element_size = size_dir; |
412 | } |
412 | } |
413 | WriteTextLines(10, 136, 0x90, 0x000000, CREATED_OPENED_MODIFIED, 20); |
413 | WriteTextLines(10, 136, 0x90, 0x000000, CREATED_OPENED_MODIFIED, 20); |
414 | DrawDate(120, 136, 0, #file_info_general.datecreate); |
414 | DrawDate(120, 136, 0, #file_info_general.datecreate); |
415 | DrawDate(120, 156, 0, #file_info_general.datelastaccess); |
415 | DrawDate(120, 156, 0, #file_info_general.datelastaccess); |
416 | DrawDate(120, 176, 0, #file_info_general.datelastedit); |
416 | DrawDate(120, 176, 0, #file_info_general.datelastedit); |
417 | 417 | ||
418 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize(element_size),element_size,SET_BYTE_LANG); |
418 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize(element_size),element_size,SET_BYTE_LANG); |
419 | WriteText(120, 99, 0x90, 0x000000, #element_size_label); |
419 | WriteText(120, 99, 0x90, 0x000000, #element_size_label); |
420 | } |
420 | } |
421 | flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; |
421 | flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; |
422 | flags_frame.font_color = system.color.work_text; |
422 | flags_frame.font_color = system.color.work_text; |
423 | flags_frame.ext_col = system.color.work_graph; |
423 | flags_frame.ext_col = system.color.work_graph; |
424 | flags_frame.font_backgr_color = system.color.work; |
424 | flags_frame.font_backgr_color = system.color.work; |
425 | frame_draw stdcall (#flags_frame); |
425 | frame_draw stdcall (#flags_frame); |
426 | DrawPropertiesCheckBoxes(); |
426 | DrawPropertiesCheckBoxes(); |
427 | } |
427 | } |
428 | else |
428 | else |
429 | { |
429 | { |
430 | WriteText(10, 78, 0x90, 0x000000, "EXIF"); |
430 | WriteText(10, 78, 0x90, 0x000000, "EXIF"); |
431 | } |
431 | } |
432 | } |
432 | } |
433 | 433 | ||
434 | void DrawPropertiesCheckBoxes() |
434 | void DrawPropertiesCheckBoxes() |
435 | { |
435 | { |
436 | incn y; |
436 | incn y; |
437 | y.n = flags_frame.start_y; |
437 | y.n = flags_frame.start_y; |
438 | CheckBox(24, y.inc(18), 20, PR_T_ONLY_READ, atr_readonly); |
438 | CheckBox(24, y.inc(18), 20, PR_T_ONLY_READ, atr_readonly); |
439 | CheckBox(24, y.inc(24), 21, PR_T_HIDDEN, atr_hidden); |
439 | CheckBox(24, y.inc(24), 21, PR_T_HIDDEN, atr_hidden); |
440 | CheckBox(24, y.inc(24), 22, PR_T_SYSTEM, atr_system); |
440 | CheckBox(24, y.inc(24), 22, PR_T_SYSTEM, atr_system); |
441 | }><> |
441 | } |