Subversion Repositories Kolibri OS

Rev

Rev 7086 | Rev 7227 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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