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