Subversion Repositories Kolibri OS

Rev

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

Rev 8947 Rev 8949
1
#ifdef LANG_RUS
1
#ifdef LANG_RUS
2
	?define WINDOW_TITLE_PROPERTIES "‘¢®©á⢠"
2
	?define WINDOW_TITLE_PROPERTIES "‘¢®©á⢠"
3
	?define T_CLOSE "‡ ªàëâì"
3
	?define T_CLOSE "‡ ªàëâì"
4
	?define T_APPLY "à¨¬¥­¨âì"
4
	?define T_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 T_CLOSE "Close"
21
	?define T_CLOSE "Close"
22
	?define T_APPLY "Apply"
22
	?define T_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
#define B_SETINGS_APPLY_SUBFOLDER 301
39
#define B_SETINGS_APPLY_SUBFOLDER 301
40
#define B_SETINGS_APPLY_NO_SUBFOLDER 302
40
#define B_SETINGS_APPLY_NO_SUBFOLDER 302
41
#define B_APPLY 11
41
#define B_APPLY 11
42
#define B_CLOSE 12
42
#define B_CLOSE 12
43
 
43
 
44
char path_to_file[4096];
44
char path_to_file[4096];
45
char file_name2[4096];
45
char file_name2[4096];
46
edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2)-2,#file_name2,NULL, 0b,2,2};
46
edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2)-2,#file_name2,NULL, 0b,2,2};
47
edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file)-2,#path_to_file,NULL, 0b,2,2};
47
edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file)-2,#path_to_file,NULL, 0b,2,2};
48
 
48
 
49
BDVK file_info_general;
49
BDVK file_info_general;
50
BDVK file_info_dirsize;
50
BDVK file_info_dirsize;
51
 
51
 
52
bool apply_question_active;
52
bool apply_question_active;
53
 
53
 
54
DIR_SIZE more_files_count;
54
DIR_SIZE more_files_count;
55
DIR_SIZE dir_size;
55
DIR_SIZE dir_size;
56
 
56
 
57
checkbox ch_read_only = { PR_T_ONLY_READ, NULL };
57
checkbox ch_read_only = { PR_T_ONLY_READ, NULL };
58
checkbox ch_hidden = { PR_T_HIDDEN, NULL };
58
checkbox ch_hidden = { PR_T_HIDDEN, NULL };
59
checkbox ch_system = { PR_T_SYSTEM, NULL };
59
checkbox ch_system = { PR_T_SYSTEM, NULL };
60
 
60
 
61
void SetPropertiesFile(dword cur_file, bdvk_pointer)
61
void SetPropertiesFile(dword cur_file, bdvk_pointer)
62
{
62
{
63
	GetFileInfo(cur_file, bdvk_pointer);
63
	GetFileInfo(cur_file, bdvk_pointer);
64
	ESI = bdvk_pointer;
64
	ESI = bdvk_pointer;
65
	ESI.BDVK.readonly = ch_read_only.checked;
65
	ESI.BDVK.readonly = ch_read_only.checked;
66
	ESI.BDVK.hidden = ch_hidden.checked;
66
	ESI.BDVK.hidden = ch_hidden.checked;
67
	ESI.BDVK.system = ch_system.checked;
67
	ESI.BDVK.system = ch_system.checked;
68
	SetFileInfo(cur_file, bdvk_pointer);
68
	SetFileInfo(cur_file, bdvk_pointer);
69
}
69
}
70
 
70
 
71
void SetPropertiesDir(dword way)
71
void SetPropertiesDir(dword way)
72
{
72
{
73
	dword dirbuf, fcount, i, filename;
73
	dword dirbuf, fcount, i, filename;
74
	dword cur_file;
74
	dword cur_file;
75
	if (dir_exists(way))
75
	if (dir_exists(way))
76
	{
76
	{
77
		cur_file = malloc(4096);
77
		cur_file = malloc(4096);
78
		GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
78
		GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
79
		for (i=0; i
79
		for (i=0; i
80
		{
80
		{
81
			filename = i*304+dirbuf+72;
81
			filename = i*304+dirbuf+72;
82
			strcpy(cur_file, way);
82
			strcpy(cur_file, way);
83
			chrcat(cur_file, '/');
83
			chrcat(cur_file, '/');
84
			strcat(cur_file, filename);
84
			strcat(cur_file, filename);
85
			if ( ESDWORD[filename-40] & ATR_FOLDER )
85
			if ( ESDWORD[filename-40] & ATR_FOLDER )
86
			{
86
			{
87
				SetPropertiesDir(cur_file);
87
				SetPropertiesDir(cur_file);
88
			}
88
			}
89
			SetPropertiesFile(cur_file, #file_info_dirsize);
89
			SetPropertiesFile(cur_file, #file_info_dirsize);
90
		}
90
		}
91
		free(cur_file);
91
		free(cur_file);
92
	}
92
	}
93
}
93
}
94
 
94
 
95
#define SET_PROPERTIES_SINGLE_FILE 0
95
#define SET_PROPERTIES_SINGLE_FILE 0
96
#define SET_PROPERTIES_NO_SUBFOLDER 1
96
#define SET_PROPERTIES_NO_SUBFOLDER 1
97
#define SET_PROPERTIES_ALL_SUBFOLDER 2
97
#define SET_PROPERTIES_ALL_SUBFOLDER 2
98
void SetProperties(int mode)
98
void SetProperties(int mode)
99
{
99
{
100
	char pcur_file[4096];
100
	char pcur_file[4096];
101
	dword i;
101
	dword i;
102
 
102
 
103
	apply_question_active=false;
103
	apply_question_active=false;
104
 
104
 
105
	if (SET_PROPERTIES_SINGLE_FILE == mode) {
105
	if (SET_PROPERTIES_SINGLE_FILE == mode) {
106
		SetPropertiesFile(#file_path, #file_info_general);
106
		SetPropertiesFile(#file_path, #file_info_general);
107
	}
107
	}
108
 
108
 
109
	if (SET_PROPERTIES_ALL_SUBFOLDER == mode)
109
	if (SET_PROPERTIES_ALL_SUBFOLDER == mode)
110
	|| (SET_PROPERTIES_NO_SUBFOLDER == mode)
110
	|| (SET_PROPERTIES_NO_SUBFOLDER == mode)
111
	{
111
	{
112
		if (selected_count)
112
		if (selected_count)
113
		{
113
		{
114
			for (i=0; i
114
			for (i=0; i
115
			{
115
			{
116
				if (getElementSelectedFlag(i) == true) 
116
				if (getElementSelectedFlag(i) == true) 
117
				{
117
				{
118
					sprintf(#pcur_file,"%s/%s",#path,items.get(i)*304+buf+72);
118
					sprintf(#pcur_file,"%s/%s",path,items.get(i)*304+buf+72);
119
					SetPropertiesFile(#pcur_file, #file_info_general);
119
					SetPropertiesFile(#pcur_file, #file_info_general);
120
					if (SET_PROPERTIES_ALL_SUBFOLDER == mode) {
120
					if (SET_PROPERTIES_ALL_SUBFOLDER == mode) {
121
						if (dir_exists(#pcur_file)) SetPropertiesDir(#pcur_file);
121
						if (dir_exists(#pcur_file)) SetPropertiesDir(#pcur_file);
122
					}
122
					}
123
				}
123
				}
124
			}
124
			}
125
		}
125
		}
126
		else
126
		else
127
		{
127
		{
128
			SetPropertiesFile(#file_path, #file_info_general);
128
			SetPropertiesFile(#file_path, #file_info_general);
129
			if (SET_PROPERTIES_ALL_SUBFOLDER == mode) SetPropertiesDir(#file_path);
129
			if (SET_PROPERTIES_ALL_SUBFOLDER == mode) SetPropertiesDir(#file_path);
130
		}
130
		}
131
	}
131
	}
132
 
132
 
133
	cmd_free=3;
133
	cmd_free=3;
134
	Open_Dir(#path,ONLY_OPEN);
134
	Open_Dir(path,ONLY_OPEN);
135
	ExitProcess();
135
	ExitProcess();
136
}
136
}
137
 
137
 
138
void ShowConfirmQuestionPopin()
138
void ShowConfirmQuestionPopin()
139
{
139
{
140
	apply_question_active = 1;
140
	apply_question_active = 1;
141
	DrawPopup(15,80,250,90,1,sc.work, sc.work_graph);
141
	DrawPopup(15,80,250,90,1,sc.work, sc.work_graph);
142
	WriteText(35, 102, 0x90, 0x000000, QUEST_1);
142
	WriteText(35, 102, 0x90, 0x000000, QUEST_1);
143
	WriteText(65, 117, 0x90, 0x000000, QUEST_2);
143
	WriteText(65, 117, 0x90, 0x000000, QUEST_2);
144
	DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES);
144
	DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES);
145
	DrawStandartCaptButton(155,138,B_SETINGS_APPLY_NO_SUBFOLDER,T_NO);
145
	DrawStandartCaptButton(155,138,B_SETINGS_APPLY_NO_SUBFOLDER,T_NO);
146
}
146
}
147
 
147
 
148
void GetSizeMoreFiles(dword way)
148
void GetSizeMoreFiles(dword way)
149
{
149
{
150
	char cur_file[4096];
150
	char cur_file[4096];
151
	dword i;
151
	dword i;
152
	
152
	
153
	for (i=0; i
153
	for (i=0; i
154
	{
154
	{
155
		if (getElementSelectedFlag(i) == true) 
155
		if (getElementSelectedFlag(i) == true) 
156
		{
156
		{
157
			sprintf(#cur_file,"%s/%s",way,items.get(i)*304+buf+72);
157
			sprintf(#cur_file,"%s/%s",way,items.get(i)*304+buf+72);
158
			if (ESDWORD[items.get(i)*304+buf+32] & ATR_FOLDER )
158
			if (ESDWORD[items.get(i)*304+buf+32] & ATR_FOLDER )
159
			{
159
			{
160
				more_files_count.calculate_loop(#cur_file);
160
				more_files_count.calculate_loop(#cur_file);
161
				more_files_count.folders++;
161
				more_files_count.folders++;
162
			}
162
			}
163
			else
163
			else
164
			{
164
			{
165
				GetFileInfo(#cur_file, #file_info_dirsize);
165
				GetFileInfo(#cur_file, #file_info_dirsize);
166
				more_files_count.bytes += file_info_dirsize.sizelo;
166
				more_files_count.bytes += file_info_dirsize.sizelo;
167
				more_files_count.files++;
167
				more_files_count.files++;
168
			}
168
			}
169
		}
169
		}
170
	}  
170
	}  
171
}
171
}
172
 
172
 
173
void properties_dialog()
173
void properties_dialog()
174
{
174
{
175
	int id;
175
	int id;
176
	
176
	
177
	if (selected_count)
177
	if (selected_count)
178
	{
178
	{
179
		more_files_count.get(NULL);
179
		more_files_count.get(NULL);
180
		GetSizeMoreFiles(#path);
180
		GetSizeMoreFiles(path);
181
		ch_read_only.checked = 0;
181
		ch_read_only.checked = 0;
182
		ch_hidden.checked = 0;
182
		ch_hidden.checked = 0;
183
		ch_system.checked = 0;
183
		ch_system.checked = 0;
184
	}
184
	}
185
	else
185
	else
186
	{
186
	{
187
		GetFileInfo(#file_path, #file_info_general);
187
		GetFileInfo(#file_path, #file_info_general);
188
		edit_box_set_text stdcall (#file_name_ed, #file_name);
188
		edit_box_set_text stdcall (#file_name_ed, #file_name);
189
		if(itdir) dir_size.get(#file_path);
189
		if(itdir) dir_size.get(#file_path);
190
		ch_read_only.checked = file_info_general.readonly;
190
		ch_read_only.checked = file_info_general.readonly;
191
		ch_hidden.checked = file_info_general.hidden;
191
		ch_hidden.checked = file_info_general.hidden;
192
		ch_system.checked = file_info_general.system;
192
		ch_system.checked = file_info_general.system;
193
	}
193
	}
194
	edit_box_set_text stdcall (#path_to_file_ed, #path);
194
	edit_box_set_text stdcall (#path_to_file_ed, path);
195
	
195
	
196
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
196
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
197
	loop() switch(WaitEvent())
197
	loop() switch(WaitEvent())
198
	{
198
	{
199
		case evButton: 
199
		case evButton: 
200
				id=GetButtonID();
200
				id=GetButtonID();
201
				ch_read_only.click(id);
201
				ch_read_only.click(id);
202
				ch_hidden.click(id);
202
				ch_hidden.click(id);
203
				ch_system.click(id);
203
				ch_system.click(id);
204
				if (apply_question_active)
204
				if (apply_question_active)
205
				{
205
				{
206
					IF (id==B_SETINGS_APPLY_SUBFOLDER) 
206
					IF (id==B_SETINGS_APPLY_SUBFOLDER) 
207
						SetProperties(SET_PROPERTIES_ALL_SUBFOLDER);
207
						SetProperties(SET_PROPERTIES_ALL_SUBFOLDER);
208
					IF (id==B_SETINGS_APPLY_NO_SUBFOLDER) 
208
					IF (id==B_SETINGS_APPLY_NO_SUBFOLDER) 
209
						SetProperties(SET_PROPERTIES_NO_SUBFOLDER);
209
						SetProperties(SET_PROPERTIES_NO_SUBFOLDER);
210
					break;
210
					break;
211
				}
211
				}
212
				if (id==1) || (id==B_CLOSE)
212
				if (id==1) || (id==B_CLOSE)
213
				{
213
				{
214
					cmd_free=3;
214
					cmd_free=3;
215
					ExitProcess();
215
					ExitProcess();
216
				}
216
				}
217
				if (id==B_APPLY) EventApplyProperties();
217
				if (id==B_APPLY) EventApplyProperties();
218
				break;
218
				break;
219
				
219
				
220
		case evMouse:
220
		case evMouse:
221
				edit_box_mouse stdcall (#file_name_ed);
221
				edit_box_mouse stdcall (#file_name_ed);
222
				edit_box_mouse stdcall (#path_to_file_ed);
222
				edit_box_mouse stdcall (#path_to_file_ed);
223
				break;
223
				break;
224
			
224
			
225
		case evKey:
225
		case evKey:
226
				GetKeys();
226
				GetKeys();
227
 
227
 
228
				if (apply_question_active)
228
				if (apply_question_active)
229
				{
229
				{
230
					IF (key_scancode==SCAN_CODE_ENTER) 
230
					IF (key_scancode==SCAN_CODE_ENTER) 
231
						SetProperties(SET_PROPERTIES_ALL_SUBFOLDER);
231
						SetProperties(SET_PROPERTIES_ALL_SUBFOLDER);
232
					IF (key_scancode==SCAN_CODE_ESC) 
232
					IF (key_scancode==SCAN_CODE_ESC) 
233
						SetProperties(SET_PROPERTIES_NO_SUBFOLDER);
233
						SetProperties(SET_PROPERTIES_NO_SUBFOLDER);
234
					break;
234
					break;
235
				}
235
				}
236
 
236
 
237
				switch(key_scancode)
237
				switch(key_scancode)
238
				{
238
				{
239
					case SCAN_CODE_ESC:
239
					case SCAN_CODE_ESC:
240
						cmd_free=3;
240
						cmd_free=3;
241
						ExitProcess();
241
						ExitProcess();
242
						break;
242
						break;
243
 
243
 
244
					case SCAN_CODE_ENTER:
244
					case SCAN_CODE_ENTER:
245
						EventApplyProperties();
245
						EventApplyProperties();
246
						break;
246
						break;
247
 
247
 
248
					case SCAN_CODE_KEY_A:
248
					case SCAN_CODE_KEY_A:
249
					case SCAN_CODE_KEY_C:
249
					case SCAN_CODE_KEY_C:
250
						if (key_modifier & KEY_LCTRL) || (key_modifier & KEY_RCTRL) {
250
						if (key_modifier & KEY_LCTRL) || (key_modifier & KEY_RCTRL) {
251
							EAX = key_editbox; 
251
							EAX = key_editbox; 
252
							edit_box_key stdcall(#file_name_ed);
252
							edit_box_key stdcall(#file_name_ed);
253
							edit_box_key stdcall(#path_to_file_ed);
253
							edit_box_key stdcall(#path_to_file_ed);
254
						}
254
						}
255
				}
255
				}
256
				break;
256
				break;
257
				
257
				
258
		case evReDraw:
258
		case evReDraw:
259
				DrawPropertiesWindow();
259
				DrawPropertiesWindow();
260
	}
260
	}
261
}
261
}
262
 
262
 
263
void DrawPropertiesWindow()
263
void DrawPropertiesWindow()
264
{
264
{
265
	proc_info pform;
265
	proc_info pform;
266
	char element_size_label[32];
266
	char element_size_label[32];
267
	char folder_info[200];
267
	char folder_info[200];
268
	dword ext1;
268
	dword ext1;
269
	dword element_size;
269
	dword element_size;
270
	incn y;
270
	incn y;
271
	char temp_path[sizeof(file_path)];
271
	char temp_path[sizeof(file_path)];
272
	DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0);
272
	DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0);
273
	GetProcessInfo(#pform, SelfInfo);
273
	GetProcessInfo(#pform, SelfInfo);
274
 
274
 
275
	DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE);
275
	DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE);
276
	DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY);
276
	DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY);
277
	
277
	
278
	WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST);
278
	WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST);
279
	edit_box_draw stdcall (#path_to_file_ed);
279
	edit_box_draw stdcall (#path_to_file_ed);
280
 
280
 
281
	WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE);
281
	WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE);
282
	
282
	
283
	if (selected_count)
283
	if (selected_count)
284
	{
284
	{
285
		PropertiesDrawIcon(NULL, "");
285
		PropertiesDrawIcon(NULL, "");
286
		sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders);
286
		sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders);
287
		WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info);
287
		WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info);
288
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG);
288
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG);
289
		WriteText(120, 97, 0x90, sc.work_text, #element_size_label);
289
		WriteText(120, 97, 0x90, sc.work_text, #element_size_label);
290
	}
290
	}
291
	else
291
	else
292
	{
292
	{
293
		if ( file_info_general.isfolder )
293
		if ( file_info_general.isfolder )
294
				PropertiesDrawIcon(NULL, "");
294
				PropertiesDrawIcon(NULL, "");
295
		else {
295
		else {
296
			sprintf(#temp_path,"%s/%s",#path,#file_name2);
296
			sprintf(#temp_path,"%s/%s",path,#file_name2);
297
			ext1 = strrchr(#file_name2,'.');
297
			ext1 = strrchr(#file_name2,'.');
298
			if (ext1) ext1 += #file_name2;
298
			if (ext1) ext1 += #file_name2;
299
			PropertiesDrawIcon(#temp_path, ext1);
299
			PropertiesDrawIcon(#temp_path, ext1);
300
		}
300
		}
301
		WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME);
301
		WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME);
302
		DrawEditBox(#file_name_ed);
302
		DrawEditBox(#file_name_ed);
303
		
303
		
304
		if (!itdir) element_size = file_info_general.sizelo;
304
		if (!itdir) element_size = file_info_general.sizelo;
305
		else
305
		else
306
		{
306
		{
307
			WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS);                              
307
			WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS);                              
308
			sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders);
308
			sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders);
309
			WriteText(120, 116, 0x90, sc.work_text, #folder_info);
309
			WriteText(120, 116, 0x90, sc.work_text, #folder_info);
310
			element_size = dir_size.bytes;
310
			element_size = dir_size.bytes;
311
		}
311
		}
312
		WriteTextLines(10,  136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20);
312
		WriteTextLines(10,  136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20);
313
		DrawDate(120,  136, sc.work_text, #file_info_general.datecreate);
313
		DrawDate(120,  136, sc.work_text, #file_info_general.datecreate);
314
		DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess);
314
		DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess);
315
		DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit);
315
		DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit);
316
 
316
 
317
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG);
317
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG);
318
		WriteText(120, 99, 0x90, sc.work_text, #element_size_label);
318
		WriteText(120, 99, 0x90, sc.work_text, #element_size_label);
319
	}
319
	}
320
	DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS);
320
	DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS);
321
	y.n = 212; //212 => attributes_frame.y
321
	y.n = 212; //212 => attributes_frame.y
322
	ch_read_only.draw(24, y.inc(18));
322
	ch_read_only.draw(24, y.inc(18));
323
	ch_hidden.draw(24, y.inc(24));
323
	ch_hidden.draw(24, y.inc(24));
324
	ch_system.draw(24, y.inc(24));
324
	ch_system.draw(24, y.inc(24));
325
	if (apply_question_active) ShowConfirmQuestionPopin();
325
	if (apply_question_active) ShowConfirmQuestionPopin();
326
}
326
}
327
 
327
 
328
void PropertiesDrawIcon(dword file_path, extension)
328
void PropertiesDrawIcon(dword file_path, extension)
329
{
329
{
330
	#define ICON_PADDING 11
330
	#define ICON_PADDING 11
331
	DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff);
331
	DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff);
332
	DrawIconByExtension(file_path, extension, -icon_size/2+28, -icon_size/2+38, 0xFFFfff);
332
	DrawIconByExtension(file_path, extension, -icon_size/2+28, -icon_size/2+38, 0xFFFfff);
333
}
333
}
334
 
334
 
335
void EventApplyProperties()
335
void EventApplyProperties()
336
{
336
{
337
	if (selected_count) || (itdir) {
337
	if (selected_count) || (itdir) {
338
		ShowConfirmQuestionPopin();
338
		ShowConfirmQuestionPopin();
339
	} else {
339
	} else {
340
		SetProperties(SET_PROPERTIES_SINGLE_FILE);
340
		SetProperties(SET_PROPERTIES_SINGLE_FILE);
341
	}
341
	}
342
}
342
}