Subversion Repositories Kolibri OS

Rev

Rev 7878 | Rev 7972 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7878 Rev 7914
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 ( TestBit(ESDWORD[filename-40], 4) )
85
			if ( TestBit(ESDWORD[filename-40], 4) )
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,file_mas[i]*304+buf+72);
118
					sprintf(#pcur_file,"%s/%s",#path,file_mas[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
	_not_draw = true;
134
	_not_draw = true;
135
	Open_Dir(#path,WITH_REDRAW);
135
	Open_Dir(#path,WITH_REDRAW);
136
	_not_draw = false;
136
	_not_draw = false;
137
	EventRedrawWindow(Form.left,Form.top);
137
	EventRedrawWindow(Form.left,Form.top);
138
	ExitProcess();
138
	ExitProcess();
139
}
139
}
140
 
140
 
141
void ShowConfirmQuestionPopin()
141
void ShowConfirmQuestionPopin()
142
{
142
{
143
	apply_question_active = 1;
143
	apply_question_active = 1;
144
	DrawPopup(15,80,250,90,1,sc.work, sc.work_graph);
144
	DrawPopup(15,80,250,90,1,sc.work, sc.work_graph);
145
	WriteText(35, 102, 0x90, 0x000000, QUEST_1);
145
	WriteText(35, 102, 0x90, 0x000000, QUEST_1);
146
	WriteText(65, 117, 0x90, 0x000000, QUEST_2);
146
	WriteText(65, 117, 0x90, 0x000000, QUEST_2);
147
	DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES);
147
	DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES);
148
	DrawStandartCaptButton(155,138,B_SETINGS_APPLY_NO_SUBFOLDER,T_NO);
148
	DrawStandartCaptButton(155,138,B_SETINGS_APPLY_NO_SUBFOLDER,T_NO);
149
}
149
}
150
 
150
 
151
void GetSizeMoreFiles(dword way)
151
void GetSizeMoreFiles(dword way)
152
{
152
{
153
	char cur_file[4096];
153
	char cur_file[4096];
154
	dword i;
154
	dword i;
155
	
155
	
156
	for (i=0; i
156
	for (i=0; i
157
	{
157
	{
158
		if (getElementSelectedFlag(i) == true) 
158
		if (getElementSelectedFlag(i) == true) 
159
		{
159
		{
160
			sprintf(#cur_file,"%s/%s",way,file_mas[i]*304+buf+72);
160
			sprintf(#cur_file,"%s/%s",way,file_mas[i]*304+buf+72);
161
			if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) )
161
			if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) )
162
			{
162
			{
163
				more_files_count.calculate_loop(#cur_file);
163
				more_files_count.calculate_loop(#cur_file);
164
				more_files_count.folders++;
164
				more_files_count.folders++;
165
			}
165
			}
166
			else
166
			else
167
			{
167
			{
168
				GetFileInfo(#cur_file, #file_info_dirsize);
168
				GetFileInfo(#cur_file, #file_info_dirsize);
169
				more_files_count.bytes += file_info_dirsize.sizelo;
169
				more_files_count.bytes += file_info_dirsize.sizelo;
170
				more_files_count.files++;
170
				more_files_count.files++;
171
			}
171
			}
172
		}
172
		}
173
	}  
173
	}  
174
}
174
}
175
 
175
 
176
void properties_dialog()
176
void properties_dialog()
177
{
177
{
178
	int id;
178
	int id;
179
	
179
	
180
	if (selected_count)
180
	if (selected_count)
181
	{
181
	{
182
		more_files_count.get(NULL);
182
		more_files_count.get(NULL);
183
		GetSizeMoreFiles(#path);
183
		GetSizeMoreFiles(#path);
184
		ch_read_only.checked = 0;
184
		ch_read_only.checked = 0;
185
		ch_hidden.checked = 0;
185
		ch_hidden.checked = 0;
186
		ch_system.checked = 0;
186
		ch_system.checked = 0;
187
	}
187
	}
188
	else
188
	else
189
	{
189
	{
190
		GetFileInfo(#file_path, #file_info_general);
190
		GetFileInfo(#file_path, #file_info_general);
191
		strcpy(#file_name2, #file_name);
191
		strcpy(#file_name2, #file_name);
192
		EditBox_UpdateText(#file_name_ed, 0);
192
		EditBox_UpdateText(#file_name_ed, 0);
193
		if(itdir) dir_size.get(#file_path);
193
		if(itdir) dir_size.get(#file_path);
194
		ch_read_only.checked = file_info_general.readonly;
194
		ch_read_only.checked = file_info_general.readonly;
195
		ch_hidden.checked = file_info_general.hidden;
195
		ch_hidden.checked = file_info_general.hidden;
196
		ch_system.checked = file_info_general.system;
196
		ch_system.checked = file_info_general.system;
197
	}
197
	}
198
	strcpy(#path_to_file, #path);
198
	strcpy(#path_to_file, #path);
199
	path_to_file_ed.size = strlen(#path_to_file);
199
	path_to_file_ed.size = strlen(#path_to_file);
200
	
200
	
201
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
201
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
202
	loop() switch(WaitEvent())
202
	loop() switch(WaitEvent())
203
	{
203
	{
204
		case evButton: 
204
		case evButton: 
205
				id=GetButtonID();
205
				id=GetButtonID();
206
				ch_read_only.click(id);
206
				ch_read_only.click(id);
207
				ch_hidden.click(id);
207
				ch_hidden.click(id);
208
				ch_system.click(id);
208
				ch_system.click(id);
209
				if (apply_question_active)
209
				if (apply_question_active)
210
				{
210
				{
211
					IF (id==B_SETINGS_APPLY_SUBFOLDER) 
211
					IF (id==B_SETINGS_APPLY_SUBFOLDER) 
212
						SetProperties(SET_PROPERTIES_ALL_SUBFOLDER);
212
						SetProperties(SET_PROPERTIES_ALL_SUBFOLDER);
213
					IF (id==B_SETINGS_APPLY_NO_SUBFOLDER) 
213
					IF (id==B_SETINGS_APPLY_NO_SUBFOLDER) 
214
						SetProperties(SET_PROPERTIES_NO_SUBFOLDER);
214
						SetProperties(SET_PROPERTIES_NO_SUBFOLDER);
215
					break;
215
					break;
216
				}
216
				}
217
				if (id==1) || (id==B_CLOSE)
217
				if (id==1) || (id==B_CLOSE)
218
				{
218
				{
219
					cmd_free=3;
219
					cmd_free=3;
220
					ExitProcess();
220
					ExitProcess();
221
				}
221
				}
222
				if (id==B_APPLY) EventApplyProperties();
222
				if (id==B_APPLY) EventApplyProperties();
223
				break;
223
				break;
224
				
224
				
225
		case evMouse:
225
		case evMouse:
226
				edit_box_mouse stdcall (#file_name_ed);
226
				edit_box_mouse stdcall (#file_name_ed);
227
				edit_box_mouse stdcall (#path_to_file_ed);
227
				edit_box_mouse stdcall (#path_to_file_ed);
228
				break;
228
				break;
229
			
229
			
230
		case evKey:
230
		case evKey:
231
				GetKeys();
231
				GetKeys();
232
 
232
 
233
				if (apply_question_active)
233
				if (apply_question_active)
234
				{
234
				{
235
					IF (key_scancode==SCAN_CODE_ENTER) 
235
					IF (key_scancode==SCAN_CODE_ENTER) 
236
						SetProperties(SET_PROPERTIES_ALL_SUBFOLDER);
236
						SetProperties(SET_PROPERTIES_ALL_SUBFOLDER);
237
					IF (key_scancode==SCAN_CODE_ESC) 
237
					IF (key_scancode==SCAN_CODE_ESC) 
238
						SetProperties(SET_PROPERTIES_NO_SUBFOLDER);
238
						SetProperties(SET_PROPERTIES_NO_SUBFOLDER);
239
					break;
239
					break;
240
				}
240
				}
241
 
241
 
242
				switch(key_scancode)
242
				switch(key_scancode)
243
				{
243
				{
244
					case SCAN_CODE_ESC:
244
					case SCAN_CODE_ESC:
245
						cmd_free=3;
245
						cmd_free=3;
246
						ExitProcess();
246
						ExitProcess();
247
						break;
247
						break;
248
 
248
 
249
					case SCAN_CODE_ENTER:
249
					case SCAN_CODE_ENTER:
250
						EventApplyProperties();
250
						EventApplyProperties();
251
						break;
251
						break;
-
 
252
 
252
 
253
					case SCAN_CODE_KEY_A:
253
					default:
254
					case SCAN_CODE_KEY_C:
254
						if (key_modifier & KEY_LCTRL) || (key_modifier & KEY_RCTRL) {
255
						if (key_modifier & KEY_LCTRL) || (key_modifier & KEY_RCTRL) {
255
							EAX = key_editbox; 
256
							EAX = key_editbox; 
256
							edit_box_key stdcall(#file_name_ed);
257
							edit_box_key stdcall(#file_name_ed);
257
							edit_box_key stdcall(#path_to_file_ed);
258
							edit_box_key stdcall(#path_to_file_ed);
258
						}
259
						}
259
				}
260
				}
260
				break;
261
				break;
261
				
262
				
262
		case evReDraw:
263
		case evReDraw:
263
				DrawPropertiesWindow();
264
				DrawPropertiesWindow();
264
	}
265
	}
265
}
266
}
266
 
267
 
267
void DrawPropertiesWindow()
268
void DrawPropertiesWindow()
268
{
269
{
269
	proc_info pform;
270
	proc_info pform;
270
	char element_size_label[32];
271
	char element_size_label[32];
271
	char folder_info[200];
272
	char folder_info[200];
272
	dword ext1;
273
	dword ext1;
273
	dword element_size;
274
	dword element_size;
274
	incn y;
275
	incn y;
275
	char temp_path[sizeof(file_path)];
276
	char temp_path[sizeof(file_path)];
276
	DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0);
277
	DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0);
277
	GetProcessInfo(#pform, SelfInfo);
278
	GetProcessInfo(#pform, SelfInfo);
278
 
279
 
279
	DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE);
280
	DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE);
280
	DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY);
281
	DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY);
281
	
282
	
282
	WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST);
283
	WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST);
283
	edit_box_draw stdcall (#path_to_file_ed);
284
	edit_box_draw stdcall (#path_to_file_ed);
284
 
285
 
285
	WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE);
286
	WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE);
286
	
287
	
287
	if (selected_count)
288
	if (selected_count)
288
	{
289
	{
289
		PropertiesDrawIcon(NULL, "");
290
		PropertiesDrawIcon(NULL, "");
290
		sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders);
291
		sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders);
291
		WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info);
292
		WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info);
292
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG);
293
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG);
293
		WriteText(120, 97, 0x90, sc.work_text, #element_size_label);
294
		WriteText(120, 97, 0x90, sc.work_text, #element_size_label);
294
	}
295
	}
295
	else
296
	else
296
	{
297
	{
297
		if ( file_info_general.isfolder )
298
		if ( file_info_general.isfolder )
298
				PropertiesDrawIcon(NULL, "");
299
				PropertiesDrawIcon(NULL, "");
299
		else {
300
		else {
300
			sprintf(#temp_path,"%s/%s",#path,#file_name2);
301
			sprintf(#temp_path,"%s/%s",#path,#file_name2);
301
			ext1 = strrchr(#file_name2,'.');
302
			ext1 = strrchr(#file_name2,'.');
302
			if (ext1) ext1 += #file_name2;
303
			if (ext1) ext1 += #file_name2;
303
			PropertiesDrawIcon(#temp_path, ext1);
304
			PropertiesDrawIcon(#temp_path, ext1);
304
		}
305
		}
305
		WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME);
306
		WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME);
306
		DrawEditBox(#file_name_ed);
307
		DrawEditBox(#file_name_ed);
307
		
308
		
308
		if (!itdir) element_size = file_info_general.sizelo;
309
		if (!itdir) element_size = file_info_general.sizelo;
309
		else
310
		else
310
		{
311
		{
311
			WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS);                              
312
			WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS);                              
312
			sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders);
313
			sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders);
313
			WriteText(120, 116, 0x90, sc.work_text, #folder_info);
314
			WriteText(120, 116, 0x90, sc.work_text, #folder_info);
314
			element_size = dir_size.bytes;
315
			element_size = dir_size.bytes;
315
		}
316
		}
316
		WriteTextLines(10,  136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20);
317
		WriteTextLines(10,  136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20);
317
		DrawDate(120,  136, sc.work_text, #file_info_general.datecreate);
318
		DrawDate(120,  136, sc.work_text, #file_info_general.datecreate);
318
		DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess);
319
		DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess);
319
		DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit);
320
		DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit);
320
 
321
 
321
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG);
322
		sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG);
322
		WriteText(120, 99, 0x90, sc.work_text, #element_size_label);
323
		WriteText(120, 99, 0x90, sc.work_text, #element_size_label);
323
	}
324
	}
324
	DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS);
325
	DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS);
325
	y.n = 212; //212 => attributes_frame.y
326
	y.n = 212; //212 => attributes_frame.y
326
	ch_read_only.draw(24, y.inc(18));
327
	ch_read_only.draw(24, y.inc(18));
327
	ch_hidden.draw(24, y.inc(24));
328
	ch_hidden.draw(24, y.inc(24));
328
	ch_system.draw(24, y.inc(24));
329
	ch_system.draw(24, y.inc(24));
329
	if (apply_question_active) ShowConfirmQuestionPopin();
330
	if (apply_question_active) ShowConfirmQuestionPopin();
330
}
331
}
331
 
332
 
332
void PropertiesDrawIcon(dword file_path, extension)
333
void PropertiesDrawIcon(dword file_path, extension)
333
{
334
{
334
	#define ICON_PADDING 11
335
	#define ICON_PADDING 11
335
	DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff);
336
	DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff);
336
	DrawIconByExtension(file_path, extension, -icon_size/2+28, -icon_size/2+38, 0xFFFfff);
337
	DrawIconByExtension(file_path, extension, -icon_size/2+28, -icon_size/2+38, 0xFFFfff);
337
}
338
}
338
 
339
 
339
void EventApplyProperties()
340
void EventApplyProperties()
340
{
341
{
341
	if (selected_count) || (itdir) {
342
	if (selected_count) || (itdir) {
342
		ShowConfirmQuestionPopin();
343
		ShowConfirmQuestionPopin();
343
	} else {
344
	} else {
344
		SetProperties(SET_PROPERTIES_SINGLE_FILE);
345
		SetProperties(SET_PROPERTIES_SINGLE_FILE);
345
	}
346
	}
346
}
347
}