Subversion Repositories Kolibri OS

Rev

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

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