Subversion Repositories Kolibri OS

Rev

Rev 6995 | Rev 7086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6995 Rev 7041
Line 14... Line 14...
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"
Line 34... Line 32...
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
Line 42... Line 38...
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};
Line 48... Line -...
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;
Line 272... Line 261...
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
				}
Line 331... Line 310...
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;
Line 340... Line 318...
340
				
318
				
Line 367... Line 345...
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);
Line 376... Line -...
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);
Line 380... Line 355...
380
		edit_box_draw stdcall (#path_to_file_ed);
355
	edit_box_draw stdcall (#path_to_file_ed);
Line 381... Line 356...
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);
-
 
396
			else {
370
				PropertiesDrawIcon(NULL, "");
397
				sprintf(#temp_path,"%s/%s",#path,#file_name2);
371
		else {
398
				debugln(#temp_path);
372
			sprintf(#temp_path,"%s/%s",#path,#file_name2);
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);
Line 402... Line 376...
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);
Line 424... Line 398...
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
}
Line 434... Line 410...
434
 
410
 
435
void DrawPropertiesCheckBoxes()
411
void DrawPropertiesCheckBoxes()
436
{
412
{