Subversion Repositories Kolibri OS

Rev

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

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