Subversion Repositories Kolibri OS

Rev

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

Rev 7244 Rev 7278
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,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2),#file_name2,#mouse_2, 1000000000000000b,2,2};
42
edit_box file_name_ed = {230,59,32,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
 
44
 
45
int file_count, dir_count, size_dir;
45
int file_count, dir_count, size_dir;
46
char folder_info[200];
46
char folder_info[200];
47
dword element_size;
47
dword element_size;
48
char element_size_label[32];
48
char element_size_label[32];
49
BDVK file_info_general;
49
BDVK file_info_general;
50
BDVK file_info_dirsize;
50
BDVK file_info_dirsize;
51
 
51
 
52
proc_info settings_form;
52
proc_info settings_form;
53
bool quest_active;
53
bool quest_active;
54
 
54
 
55
checkbox ch_read_only = { PR_T_ONLY_READ, NULL };
55
checkbox ch_read_only = { PR_T_ONLY_READ, NULL };
56
checkbox ch_hidden = { PR_T_HIDDEN, NULL };
56
checkbox ch_hidden = { PR_T_HIDDEN, NULL };
57
checkbox ch_system = { PR_T_SYSTEM, NULL };
57
checkbox ch_system = { PR_T_SYSTEM, NULL };
58
 
58
 
59
void SetPropertiesFile(dword cur_file, bdvk_pointer)
59
void SetPropertiesFile(dword cur_file, bdvk_pointer)
60
{
60
{
61
	GetFileInfo(cur_file, bdvk_pointer);
61
	GetFileInfo(cur_file, bdvk_pointer);
62
	ESI = bdvk_pointer;
62
	ESI = bdvk_pointer;
63
	ESI.BDVK.readonly = ch_read_only.checked;
63
	ESI.BDVK.readonly = ch_read_only.checked;
64
	ESI.BDVK.hidden = ch_hidden.checked;
64
	ESI.BDVK.hidden = ch_hidden.checked;
65
	ESI.BDVK.system = ch_system.checked;
65
	ESI.BDVK.system = ch_system.checked;
66
	SetFileInfo(cur_file, bdvk_pointer);
66
	SetFileInfo(cur_file, bdvk_pointer);
67
}
67
}
68
 
68
 
69
void SetPropertiesDir(dword way)
69
void SetPropertiesDir(dword way)
70
{
70
{
71
	dword dirbuf, fcount, i, filename;
71
	dword dirbuf, fcount, i, filename;
72
	dword cur_file;
72
	dword cur_file;
73
	if (dir_exists(way))
73
	if (dir_exists(way))
74
	{
74
	{
75
		cur_file = malloc(4096);
75
		cur_file = malloc(4096);
76
		GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
76
		GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
77
		for (i=0; i
77
		for (i=0; i
78
		{
78
		{
79
			filename = i*304+dirbuf+72;
79
			filename = i*304+dirbuf+72;
80
			strcpy(cur_file, way);
80
			strcpy(cur_file, way);
81
			chrcat(cur_file, '/');
81
			chrcat(cur_file, '/');
82
			strcat(cur_file, filename);
82
			strcat(cur_file, filename);
83
			if ( TestBit(ESDWORD[filename-40], 4) )
83
			if ( TestBit(ESDWORD[filename-40], 4) )
84
			{
84
			{
85
				SetPropertiesDir(cur_file);
85
				SetPropertiesDir(cur_file);
86
			}
86
			}
87
			SetPropertiesFile(cur_file, #file_info_dirsize);
87
			SetPropertiesFile(cur_file, #file_info_dirsize);
88
		}
88
		}
89
		free(cur_file);
89
		free(cur_file);
90
	}
90
	}
91
}
91
}
92
 
92
 
93
void SetProperties(byte prop)
93
void SetProperties(byte prop)
94
{
94
{
95
	dword cur_file;
95
	dword cur_file;
96
 
96
 
97
	if (prop==1) || (prop==2)
97
	if (prop==1) || (prop==2)
98
	{
98
	{
99
		if (selected_count)
99
		if (selected_count)
100
		{
100
		{
101
			cur_file = malloc(4096);
101
			cur_file = malloc(4096);
102
			for (i=0; i
102
			for (i=0; i
103
			{
103
			{
104
				if (getElementSelectedFlag(i) == true) 
104
				if (getElementSelectedFlag(i) == true) 
105
				{
105
				{
106
					strcpy(cur_file, #path);
106
					strcpy(cur_file, #path);
107
					strcat(cur_file, file_mas[i]*304+buf+72);
107
					strcat(cur_file, file_mas[i]*304+buf+72);
108
					SetPropertiesDir(cur_file);
108
					SetPropertiesDir(cur_file);
109
					if (prop==2)
109
					if (prop==2)
110
					{
110
					{
111
						if (dir_exists(cur_file))
111
						if (dir_exists(cur_file))
112
						{
112
						{
113
							SetPropertiesDir(cur_file);
113
							SetPropertiesDir(cur_file);
114
						}
114
						}
115
					}
115
					}
116
				}
116
				}
117
			}
117
			}
118
			free(cur_file);
118
			free(cur_file);
119
		}
119
		}
120
		else
120
		else
121
		{
121
		{
122
			SetPropertiesFile(#file_path, #file_info_general);
122
			SetPropertiesFile(#file_path, #file_info_general);
123
			if (prop==2) SetPropertiesDir(#file_path);
123
			if (prop==2) SetPropertiesDir(#file_path);
124
		}
124
		}
125
		quest_active = 0;
125
		quest_active = 0;
126
		DrawPropertiesWindow();
126
		DrawPropertiesWindow();
127
	}
127
	}
128
	else
128
	else
129
	{
129
	{
130
		SetPropertiesFile(#file_path, #file_info_general);
130
		SetPropertiesFile(#file_path, #file_info_general);
131
	}
131
	}
132
	cmd_free=3;
132
	cmd_free=3;
133
	_not_draw = true;
133
	_not_draw = true;
134
	Open_Dir(#path,WITH_REDRAW);
134
	Open_Dir(#path,WITH_REDRAW);
135
	_not_draw = false;
135
	_not_draw = false;
136
	EventRedrawWindow(Form.left,Form.top);
136
	EventRedrawWindow(Form.left,Form.top);
137
	ExitProcess();
137
	ExitProcess();
138
}
138
}
139
 
139
 
140
void ShowConfirmQuestionPopin()
140
void ShowConfirmQuestionPopin()
141
{
141
{
142
	quest_active = 1;
142
	quest_active = 1;
143
	DrawPopup(15,80,250,90,1,system.color.work, system.color.work_graph);
143
	DrawPopup(15,80,250,90,1,system.color.work, system.color.work_graph);
144
	WriteText(35, 102, 0x90, 0x000000, QUEST_1);
144
	WriteText(35, 102, 0x90, 0x000000, QUEST_1);
145
	WriteText(65, 117, 0x90, 0x000000, QUEST_2);
145
	WriteText(65, 117, 0x90, 0x000000, QUEST_2);
146
	DrawFlatButton(62,138,301,T_YES);
146
	DrawStandartCaptButton(62,138,301,T_YES);
147
	DrawFlatButton(155,138,302,T_NO);
147
	DrawStandartCaptButton(155,138,302,T_NO);
148
}
148
}
149
 
149
 
150
void GetSizeDir(dword way)
150
void GetSizeDir(dword way)
151
{
151
{
152
	dword dirbuf, fcount, i, filename;
152
	dword dirbuf, fcount, i, filename;
153
	dword cur_file;
153
	dword cur_file;
154
	if (dir_exists(way))
154
	if (dir_exists(way))
155
	{
155
	{
156
		cur_file = malloc(4096);
156
		cur_file = malloc(4096);
157
		// In the process of recursive descent, memory must be allocated dynamically, 
157
		// In the process of recursive descent, memory must be allocated dynamically, 
158
		// because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed.
158
		// because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed.
159
		GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
159
		GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
160
		for (i=0; i
160
		for (i=0; i
161
		{
161
		{
162
			filename = i*304+dirbuf+72;
162
			filename = i*304+dirbuf+72;
163
			sprintf(cur_file,"%s/%s",way,filename);
163
			sprintf(cur_file,"%s/%s",way,filename);
164
			
164
			
165
			if (TestBit(ESDWORD[filename-40], 4) )
165
			if (TestBit(ESDWORD[filename-40], 4) )
166
			{
166
			{
167
				dir_count++;
167
				dir_count++;
168
				GetSizeDir(cur_file);
168
				GetSizeDir(cur_file);
169
			}
169
			}
170
			else
170
			else
171
			{
171
			{
172
				GetFileInfo(cur_file, #file_info_dirsize);
172
				GetFileInfo(cur_file, #file_info_dirsize);
173
				size_dir += file_info_dirsize.sizelo;
173
				size_dir += file_info_dirsize.sizelo;
174
				file_count++;
174
				file_count++;
175
			}
175
			}
176
		}
176
		}
177
		free(cur_file);
177
		free(cur_file);
178
	}
178
	}
179
}
179
}
180
 
180
 
181
void GetSizeMoreFiles(dword way)
181
void GetSizeMoreFiles(dword way)
182
{
182
{
183
	char cur_file[4096];
183
	char cur_file[4096];
184
	
184
	
185
	for (i=0; i
185
	for (i=0; i
186
	{
186
	{
187
		if (getElementSelectedFlag(i) == true) 
187
		if (getElementSelectedFlag(i) == true) 
188
		{
188
		{
189
			sprintf(#cur_file,"%s/%s",way,file_mas[i]*304+buf+72);
189
			sprintf(#cur_file,"%s/%s",way,file_mas[i]*304+buf+72);
190
			if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) )
190
			if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) )
191
			{
191
			{
192
				GetSizeDir(#cur_file);
192
				GetSizeDir(#cur_file);
193
				dir_count++;
193
				dir_count++;
194
			}
194
			}
195
			else
195
			else
196
			{
196
			{
197
				GetFileInfo(#cur_file, #file_info_dirsize);
197
				GetFileInfo(#cur_file, #file_info_dirsize);
198
				size_dir += file_info_dirsize.sizelo;
198
				size_dir += file_info_dirsize.sizelo;
199
				file_count++;
199
				file_count++;
200
			}
200
			}
201
		}
201
		}
202
	}  
202
	}  
203
}
203
}
204
 
204
 
205
void properties_dialog()
205
void properties_dialog()
206
{
206
{
207
	int id;
207
	int id;
208
	
208
	
209
	DSBYTE[#folder_info]=0;
209
	DSBYTE[#folder_info]=0;
210
	file_count = 0;
210
	file_count = 0;
211
	dir_count = 0;	
211
	dir_count = 0;	
212
	size_dir = 0;
212
	size_dir = 0;
213
			
213
			
214
	if (selected_count)
214
	if (selected_count)
215
	{
215
	{
216
		GetSizeMoreFiles(#path);
216
		GetSizeMoreFiles(#path);
217
		ch_read_only.checked = 0;
217
		ch_read_only.checked = 0;
218
		ch_hidden.checked = 0;
218
		ch_hidden.checked = 0;
219
		ch_system.checked = 0;
219
		ch_system.checked = 0;
220
	}
220
	}
221
	else
221
	else
222
	{
222
	{
223
		GetFileInfo(#file_path, #file_info_general);
223
		GetFileInfo(#file_path, #file_info_general);
224
		strcpy(#file_name2, #file_name);
224
		strcpy(#file_name2, #file_name);
225
		file_name_ed.size = strlen(#file_name2);   
225
		file_name_ed.size = strlen(#file_name2);   
226
		if(itdir) GetSizeDir(#file_path);
226
		if(itdir) GetSizeDir(#file_path);
227
		ch_read_only.checked = file_info_general.readonly;
227
		ch_read_only.checked = file_info_general.readonly;
228
		ch_hidden.checked = file_info_general.hidden;
228
		ch_hidden.checked = file_info_general.hidden;
229
		ch_system.checked = file_info_general.system;
229
		ch_system.checked = file_info_general.system;
230
	}
230
	}
231
	strcpy(#path_to_file, #path);
231
	strcpy(#path_to_file, #path);
232
	path_to_file_ed.size = strlen(#path_to_file);
232
	path_to_file_ed.size = strlen(#path_to_file);
233
	
233
	
234
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
234
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
235
	loop() switch(WaitEvent())
235
	loop() switch(WaitEvent())
236
	{
236
	{
237
		case evButton: 
237
		case evButton: 
238
				id=GetButtonID();
238
				id=GetButtonID();
239
				ch_read_only.click(id);
239
				ch_read_only.click(id);
240
				ch_hidden.click(id);
240
				ch_hidden.click(id);
241
				ch_system.click(id);
241
				ch_system.click(id);
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
				break;
266
				break;
267
				
267
				
268
		case evMouse:
268
		case evMouse:
269
				edit_box_mouse stdcall (#file_name_ed);
269
				edit_box_mouse stdcall (#file_name_ed);
270
				edit_box_mouse stdcall (#path_to_file_ed);
270
				edit_box_mouse stdcall (#path_to_file_ed);
271
				break;
271
				break;
272
			
272
			
273
		case evKey:
273
		case evKey:
274
				GetKeys();
274
				GetKeys();
275
				
275
				
276
				if (quest_active)
276
				if (quest_active)
277
				{
277
				{
278
					IF (key_scancode==SCAN_CODE_ENTER) SetProperties(2);
278
					IF (key_scancode==SCAN_CODE_ENTER) SetProperties(2);
279
					IF (key_scancode==SCAN_CODE_ESC) SetProperties(1);
279
					IF (key_scancode==SCAN_CODE_ESC) SetProperties(1);
280
					quest_active=false;
280
					quest_active=false;
281
					break;
281
					break;
282
				}
282
				}
283
				if (key_scancode==SCAN_CODE_ESC)
283
				if (key_scancode==SCAN_CODE_ESC)
284
				{
284
				{
285
					cmd_free=3;
285
					cmd_free=3;
286
					ExitProcess();
286
					ExitProcess();
287
				}
287
				}
288
				if (key_scancode==SCAN_CODE_ENTER)
288
				if (key_scancode==SCAN_CODE_ENTER)
289
				{
289
				{
290
					if (selected_count) || (itdir)
290
					if (selected_count) || (itdir)
291
					{
291
					{
292
						ShowConfirmQuestionPopin();
292
						ShowConfirmQuestionPopin();
293
					}
293
					}
294
					else 
294
					else 
295
					{
295
					{
296
						SetProperties(0);
296
						SetProperties(0);
297
					}
297
					}
298
					break;
298
					break;
299
				}
299
				}
300
				edit_box_key stdcall(#file_name_ed);
300
				edit_box_key stdcall(#file_name_ed);
301
				edit_box_key stdcall(#path_to_file_ed);
301
				edit_box_key stdcall(#path_to_file_ed);
302
				break;
302
				break;
303
				
303
				
304
		case evReDraw:
304
		case evReDraw:
305
				DrawPropertiesWindow();
305
				DrawPropertiesWindow();
306
	}
306
	}
307
}
307
}
308
 
308
 
309
void DrawPropertiesWindow()
309
void DrawPropertiesWindow()
310
{
310
{
311
	dword ext1;
311
	dword ext1;
312
	incn y;
312
	incn y;
313
	char temp_path[sizeof(file_path)];
313
	char temp_path[sizeof(file_path)];
314
	DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0);
314
	DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0);
315
	GetProcessInfo(#settings_form, SelfInfo);
315
	GetProcessInfo(#settings_form, SelfInfo);
316
 
316
 
317
	DrawFlatButton(settings_form.cwidth - 96, settings_form.cheight-34, 10, BTN_CLOSE);
317
	DrawStandartCaptButton(settings_form.cwidth - 96, settings_form.cheight-34, 10, BTN_CLOSE);
318
	DrawFlatButton(settings_form.cwidth -208, settings_form.cheight-34, 11, BTN_APPLY);
318
	DrawStandartCaptButton(settings_form.cwidth -208, settings_form.cheight-34, 11, BTN_APPLY);
319
	
319
	
320
	WriteText(10, 78, 0x90, system.color.work_text, PR_T_DEST);
320
	WriteText(10, 78, 0x90, system.color.work_text, PR_T_DEST);
321
	edit_box_draw stdcall (#path_to_file_ed);
321
	edit_box_draw stdcall (#path_to_file_ed);
322
 
322
 
323
	WriteText(10, 97, 0x90, system.color.work_text, PR_T_SIZE);
323
	WriteText(10, 97, 0x90, system.color.work_text, PR_T_SIZE);
324
	
324
	
325
	if (selected_count)
325
	if (selected_count)
326
	{
326
	{
327
		PropertiesDrawIcon(NULL, "");
327
		PropertiesDrawIcon(NULL, "");
328
		sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
328
		sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
329
		WriteText(file_name_ed.left+4, 30, 0x90, system.color.work_text, #folder_info);
329
		WriteText(file_name_ed.left+4, 30, 0x90, system.color.work_text, #folder_info);
330
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(size_dir, NULL),size_dir,SET_BYTE_LANG);
330
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(size_dir, NULL),size_dir,SET_BYTE_LANG);
331
		WriteText(120, 97, 0x90, system.color.work_text, #element_size_label);
331
		WriteText(120, 97, 0x90, system.color.work_text, #element_size_label);
332
	}
332
	}
333
	else
333
	else
334
	{
334
	{
335
		if ( file_info_general.isfolder )
335
		if ( file_info_general.isfolder )
336
				PropertiesDrawIcon(NULL, "");
336
				PropertiesDrawIcon(NULL, "");
337
		else {
337
		else {
338
			sprintf(#temp_path,"%s/%s",#path,#file_name2);
338
			sprintf(#temp_path,"%s/%s",#path,#file_name2);
339
			ext1 = strrchr(#file_name2,'.');
339
			ext1 = strrchr(#file_name2,'.');
340
			if (ext1) ext1 += #file_name2;
340
			if (ext1) ext1 += #file_name2;
341
			PropertiesDrawIcon(#temp_path, ext1);
341
			PropertiesDrawIcon(#temp_path, ext1);
342
		}
342
		}
343
		WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, system.color.work_text, PR_T_NAME);
343
		WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, system.color.work_text, PR_T_NAME);
344
		DrawEditBox(#file_name_ed);
344
		DrawEditBox(#file_name_ed);
345
		
345
		
346
		if (!itdir) element_size = file_info_general.sizelo;
346
		if (!itdir) element_size = file_info_general.sizelo;
347
		else
347
		else
348
		{
348
		{
349
			WriteText(10,116, 0x90, system.color.work_text, PR_T_CONTAINS);                              
349
			WriteText(10,116, 0x90, system.color.work_text, PR_T_CONTAINS);                              
350
			sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
350
			sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
351
			WriteText(120, 116, 0x90, system.color.work_text, #folder_info);
351
			WriteText(120, 116, 0x90, system.color.work_text, #folder_info);
352
			element_size = size_dir;
352
			element_size = size_dir;
353
		}
353
		}
354
		WriteTextLines(10,  136, 0x90, system.color.work_text, CREATED_OPENED_MODIFIED, 20);
354
		WriteTextLines(10,  136, 0x90, system.color.work_text, CREATED_OPENED_MODIFIED, 20);
355
		DrawDate(120,  136, system.color.work_text, #file_info_general.datecreate);
355
		DrawDate(120,  136, system.color.work_text, #file_info_general.datecreate);
356
		DrawDate(120, 156, system.color.work_text, #file_info_general.datelastaccess);
356
		DrawDate(120, 156, system.color.work_text, #file_info_general.datelastaccess);
357
		DrawDate(120, 176, system.color.work_text, #file_info_general.datelastedit);
357
		DrawDate(120, 176, system.color.work_text, #file_info_general.datelastedit);
358
 
358
 
359
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG);
359
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG);
360
		WriteText(120, 99, 0x90, system.color.work_text, #element_size_label);
360
		WriteText(120, 99, 0x90, system.color.work_text, #element_size_label);
361
	}
361
	}
362
	DrawFrame(10, 212, -10*2 + settings_form.cwidth - 2, 92, FLAGS);
362
	DrawFrame(10, 212, -10*2 + settings_form.cwidth - 2, 92, FLAGS);
363
	y.n = 212; //212 => attributes_frame.y
363
	y.n = 212; //212 => attributes_frame.y
364
	ch_read_only.draw(24, y.inc(18));
364
	ch_read_only.draw(24, y.inc(18));
365
	ch_hidden.draw(24, y.inc(24));
365
	ch_hidden.draw(24, y.inc(24));
366
	ch_system.draw(24, y.inc(24));
366
	ch_system.draw(24, y.inc(24));
367
}
367
}
368
 
368
 
369
void PropertiesDrawIcon(dword file_path, extension)
369
void PropertiesDrawIcon(dword file_path, extension)
370
{
370
{
371
	#define ICON_PADDING 11
371
	#define ICON_PADDING 11
372
	DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff);
372
	DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff);
373
	DrawIconByExtension(file_path, extension, 20, 30, system.color.work_light);
373
	DrawIconByExtension(file_path, extension, 20, 30, system.color.work_light);
374
}
374
}