Subversion Repositories Kolibri OS

Rev

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

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