Subversion Repositories Kolibri OS

Rev

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

Rev 5710 Rev 5719
1
char *ext[]={
1
char *ext[]={
2
"..",   17,
2
"..",   17,
3
"",16, "",16,
3
"",16, "",16,
4
"txt", 1, "doc", 1, "rtf", 1, "odt", 1, "log", 1, "docx",1,
4
"txt", 1, "doc", 1, "rtf", 1, "odt", 1, "log", 1, "docx",1,
5
"htm", 2, "html",2, "mht", 2,
5
"htm", 2, "html",2, "mht", 2,
6
"ini", 3, "js",  3, "conf",3, "inf", 3,
6
"ini", 3, "js",  3, "conf",3, "inf", 3,
7
"xlt", 4, "xls", 4, "ods", 4, "xlsx",4,
7
"xlt", 4, "xls", 4, "ods", 4, "xlsx",4,
8
"cmd", 5, "bat", 5, "py",  5, "sh",  5, "ksh", 5, "com", 5,
8
"cmd", 5, "bat", 5, "py",  5, "sh",  5, "ksh", 5, "com", 5,
9
"kex", 6, "lua", 6,
9
"kex", 6, "lua", 6,
10
"exe", 7, "msi", 7,
10
"exe", 7, "msi", 7,
11
"sys", 8, "ocx", 8, "drv", 8, "so",  8,
11
"sys", 8, "ocx", 8, "drv", 8, "so",  8,
12
"inc", 9,
12
"inc", 9,
13
"chr", 10, "mt",  10, "ttf", 10, "fon", 10,
13
"chr", 10, "mt",  10, "ttf", 10, "fon", 10,
14
"asm", 11,
14
"asm", 11,
15
"mp3", 12, "wav", 12, "mid", 12, "midi",12, "ogg", 12, "wma", 12, "flac",12,
15
"mp3", 12, "wav", 12, "mid", 12, "midi",12, "ogg", 12, "wma", 12, "flac",12,
16
"skn", 13,
16
"skn", 13,
17
"avi", 14, "flv", 14, "mpg", 14, "wmv", 14, "mov", 14, "mkv", 14, "mp4", 14, "vob", 14, "webm", 14,
17
"avi", 14, "flv", 14, "mpg", 14, "wmv", 14, "mov", 14, "mkv", 14, "mp4", 14, "vob", 14, "webm", 14,
18
"djvu",15, "pdf", 15, "fb2", 15,
18
"djvu",15, "pdf", 15, "fb2", 15,
19
"nes", 18, "smc", 18,
19
"nes", 18, "smc", 18,
20
"gif", 19, "bmp", 19, "tga", 19, "pcx", 19, "png", 19, "pnm", 19, "jpg", 19, "xcf", 19, "ai",  19,
20
"gif", 19, "bmp", 19, "tga", 19, "pcx", 19, "png", 19, "pnm", 19, "jpg", 19, "xcf", 19, "ai",  19,
21
"jpeg",19, "raw", 11, "psd", 19, "wbmp",19, "tiff",19, "tif", 19, 
21
"jpeg",19, "raw", 11, "psd", 19, "wbmp",19, "tiff",19, "tif", 19, 
22
"3ds", 20, "asc", 20, "ico", 20, "cur", 20, "ani", 20, "vox", 20,
22
"3ds", 20, "asc", 20, "ico", 20, "cur", 20, "ani", 20, "vox", 20,
23
"img", 21, "ima", 21,
23
"img", 21, "ima", 21,
24
"dll", 22, "obj", 22, "dict",22,
24
"dll", 22, "obj", 22, "dict",22,
25
"rar", 23, "zip", 23, "cab", 23, "tar", 23, "ajr", 23, "jar", 23, "7z", 23, "gz", 23, "kexp", 23,
25
"rar", 23, "zip", 23, "cab", 23, "tar", 23, "ajr", 23, "jar", 23, "7z", 23, "gz", 23, "kexp", 23,
26
"iso", 24, "cue", 24, "nrg", 24, "mdf", 24,
26
"iso", 24, "cue", 24, "nrg", 24, "mdf", 24,
27
"grf", 25,
27
"grf", 25,
28
0,0};
28
0,0};
29
 
29
 
30
void Put_icon(dword extension, xx, yy, fairing_color, icon_n)
30
void Put_icon(dword extension, xx, yy, fairing_color, icon_n)
31
{
31
{
32
	int i, font_half_height;
32
	int i, font_half_height;
33
 
33
 
34
	if (extension) for (i=0; ext[i]!=0; i+=2;)
34
	if (extension) for (i=0; ext[i]!=0; i+=2;)
35
	{
35
	{
36
		if (strcmpi(extension, ext[i])==0)
36
		if (strcmpi(extension, ext[i])==0)
37
		{
37
		{
38
			icon_n = ext[i+1];
38
			icon_n = ext[i+1];
39
			break;
39
			break;
40
		}
40
		}
41
	}
41
	}
42
 
42
 
43
	ficons_pal[0] = fairing_color;
43
	ficons_pal[0] = fairing_color;
44
	PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal);
44
	PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal);
45
	if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color);
45
	if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color);
46
	if (use_big_fonts) font_half_height=0; else font_half_height=4;
46
	if (use_big_fonts) font_half_height=0; else font_half_height=4;
47
	if (icon_n!=17) && (strlen(extension)<9) WriteText(-FileShow.font_size_x/2*strlen(extension)+Form.cwidth-121,yy+font_half_height,files.font_type,0,extension);
47
	if (icon_n!=17) && (strlen(extension)<9) WriteText(-FileShow.font_size_x/2*strlen(extension)+files.x+files.w-103,yy+font_half_height,files.font_type,0,extension);
48
}
48
}
49
 
49
 
50
 
50
 
51
void IconFairing(dword filenum, x,y, color)
51
void IconFairing(dword filenum, x,y, color)
52
{
52
{
53
	switch(filenum)
53
	switch(filenum)
54
	{
54
	{
55
		case 0...1: //file
55
		case 0...1: //file
56
		case 3: //íàñòðîéêè
56
		case 3: //íàñòðîéêè
57
			RIGHT_PAINT:
57
			RIGHT_PAINT:
58
			PutPixel(x+10,y,color);
58
			PutPixel(x+10,y,color);
59
			PutPixel(x+11,y+1,color);
59
			PutPixel(x+11,y+1,color);
60
			PutPixel(x+12,y+2,color);
60
			PutPixel(x+12,y+2,color);
61
			PutPixel(x+13,y+3,color);
61
			PutPixel(x+13,y+3,color);
62
			return;
62
			return;
63
		case 2: //html
63
		case 2: //html
64
			DrawBar(x,y,1,7,color);
64
			DrawBar(x,y,1,7,color);
65
			DrawBar(x+1,y,1,6,color);
65
			DrawBar(x+1,y,1,6,color);
66
			DrawBar(x,y+10,1,5,color);
66
			DrawBar(x,y+10,1,5,color);
67
			DrawBar(x+1,y+11,1,4,color);
67
			DrawBar(x+1,y+11,1,4,color);
68
			GOTO RIGHT_PAINT;
68
			GOTO RIGHT_PAINT;
69
		case 9: //inc
69
		case 9: //inc
70
			DrawBar(x+13,y,1,3,color);
70
			DrawBar(x+13,y,1,3,color);
71
			DrawBar(x+14,y,2,4,color);
71
			DrawBar(x+14,y,2,4,color);
72
			DrawBar(x+15,y,1,15,color);
72
			DrawBar(x+15,y,1,15,color);
73
			PutPixel(x+3,y+14,color);
73
			PutPixel(x+3,y+14,color);
74
			DrawBar(x+4,y+13,1,2,color);
74
			DrawBar(x+4,y+13,1,2,color);
75
			DrawBar(x+5,y+12,10,3,color);
75
			DrawBar(x+5,y+12,10,3,color);
76
			PutPixel(x+10,y+11,color);
76
			PutPixel(x+10,y+11,color);
77
			DrawBar(x+11,y+10,1,2,color);
77
			DrawBar(x+11,y+10,1,2,color);
78
			DrawBar(x+12,y+9,1,3,color);
78
			DrawBar(x+12,y+9,1,3,color);
79
			PutPixel(x+12,y+7,color);
79
			PutPixel(x+12,y+7,color);
80
			DrawBar(x+13,y+6,2,7,color);
80
			DrawBar(x+13,y+6,2,7,color);
81
			PutPixel(x+14,y+5,color);
81
			PutPixel(x+14,y+5,color);
82
			return;
82
			return;
83
		case 10: //font
83
		case 10: //font
84
			DrawBar(x+1,y+1,1,13,color);
84
			DrawBar(x+1,y+1,1,13,color);
85
			DrawBar(x+2,y+1,1,11,color);
85
			DrawBar(x+2,y+1,1,11,color);
86
			DrawBar(x+3,y+1,1,10,color);
86
			DrawBar(x+3,y+1,1,10,color);
87
			DrawBar(x+4,y+1,1,9,color);
87
			DrawBar(x+4,y+1,1,9,color);
88
			DrawBar(x+5,y+1,1,7,color);
88
			DrawBar(x+5,y+1,1,7,color);
89
			DrawBar(x+6,y+1,1,5,color);
89
			DrawBar(x+6,y+1,1,5,color);
90
			DrawBar(x+7,y+1,1,4,color);
90
			DrawBar(x+7,y+1,1,4,color);
91
			DrawBar(x+8,y+1,1,2,color);
91
			DrawBar(x+8,y+1,1,2,color);
92
			DrawBar(x+14,y+1,1,13,color);
92
			DrawBar(x+14,y+1,1,13,color);
93
			DrawBar(x+13,y+1,1,11,color);
93
			DrawBar(x+13,y+1,1,11,color);
94
			PutPixel(x+9,y+6,color);
94
			PutPixel(x+9,y+6,color);
95
			DrawBar(x+8,y+10,2,1,color);
95
			DrawBar(x+8,y+10,2,1,color);
96
			DrawBar(x+7,y+11,2,3,color);
96
			DrawBar(x+7,y+11,2,3,color);
97
			return;
97
			return;
98
		case 12: //audio
98
		case 12: //audio
99
			PutPixel(x+2,y+9,color);
99
			PutPixel(x+2,y+9,color);
100
			PutPixel(x+1,y+10,color);
100
			PutPixel(x+1,y+10,color);
101
			PutPixel(x+10,y+8,color);
101
			PutPixel(x+10,y+8,color);
102
			PutPixel(x+9,y+9,color);
102
			PutPixel(x+9,y+9,color);
103
 
103
 
104
			PutPixel(x+6,y+13,color);
104
			PutPixel(x+6,y+13,color);
105
			PutPixel(x+5,y+14,color);
105
			PutPixel(x+5,y+14,color);
106
			PutPixel(x+14,y+12,color);
106
			PutPixel(x+14,y+12,color);
107
			PutPixel(x+13,y+13,color);
107
			PutPixel(x+13,y+13,color);
108
			return;
108
			return;
109
		case 13: //skin
109
		case 13: //skin
110
			PutPixel(x+15,y,color); 
110
			PutPixel(x+15,y,color); 
111
			return;
111
			return;
112
		case 16...17: //folder
112
		case 16...17: //folder
113
			DrawBar(x,y,1,15,color);
113
			DrawBar(x,y,1,15,color);
114
			DrawBar(x+8,y,8,2,color);
114
			DrawBar(x+8,y,8,2,color);
115
			IF (filenum==17) PutPixel(x+11,y+1,0x1A7B17); //green arrow part
115
			IF (filenum==17) PutPixel(x+11,y+1,0x1A7B17); //green arrow part
116
			DrawBar(x+1,y+13,15,2,color);
116
			DrawBar(x+1,y+13,15,2,color);
117
			PutPixel(x+1,y,color); //.òî÷êè
117
			PutPixel(x+1,y,color);
118
			PutPixel(x+7,y,color);
118
			PutPixel(x+7,y,color);
119
			PutPixel(x+15,y+2,color);
119
			PutPixel(x+15,y+2,color);
120
			PutPixel(x+1,y+12,color);
120
			PutPixel(x+1,y+12,color);
121
			PutPixel(x+15,y+12,color);
121
			PutPixel(x+15,y+12,color);
122
			return;
122
			return;
123
		case 18: //êàðòðèäæ
123
		case 18:
124
			DrawBar(x,y+11,1,2,color);
124
			DrawBar(x,y+11,1,2,color);
125
			DrawBar(x+15,y+11,1,2,color);
125
			DrawBar(x+15,y+11,1,2,color);
126
			DrawBar(x,y+13,16,1,color);
126
			DrawBar(x,y+13,16,1,color);
127
			return;
127
			return;
128
		case 24: //îáðàç
128
		case 24:
129
			DrawBar(x,y,6,1,color);
129
			DrawBar(x,y,6,1,color);
130
			DrawBar(x,y+1,4,1,color);
130
			DrawBar(x,y+1,4,1,color);
131
			DrawBar(x,y+2,3,1,color);
131
			DrawBar(x,y+2,3,1,color);
132
			DrawBar(x,y+3,2,2,color);
132
			DrawBar(x,y+3,2,2,color);
133
			
133
			
134
			DrawBar(x,y+5,1,5,color);
134
			DrawBar(x,y+5,1,5,color);
135
			
135
			
136
			DrawBar(x,y+10,2,2,color);
136
			DrawBar(x,y+10,2,2,color);
137
			DrawBar(x,y+12,3,1,color);
137
			DrawBar(x,y+12,3,1,color);
138
			DrawBar(x,y+13,4,1,color);
138
			DrawBar(x,y+13,4,1,color);
139
			DrawBar(x,y+14,6,1,color);			
139
			DrawBar(x,y+14,6,1,color);			
140
 
140
 
141
			DrawBar(x+11,y,5,1,color);
141
			DrawBar(x+11,y,5,1,color);
142
			DrawBar(x+13,y+1,3,1,color);
142
			DrawBar(x+13,y+1,3,1,color);
143
			DrawBar(x+14,y+2,2,1,color);
143
			DrawBar(x+14,y+2,2,1,color);
144
			DrawBar(x+15,y+3,1,2,color);
144
			DrawBar(x+15,y+3,1,2,color);
145
			
145
			
146
			DrawBar(x+15,y+10,1,2,color);
146
			DrawBar(x+15,y+10,1,2,color);
147
			DrawBar(x+14,y+12,2,1,color);
147
			DrawBar(x+14,y+12,2,1,color);
148
			DrawBar(x+13,y+13,3,1,color);
148
			DrawBar(x+13,y+13,3,1,color);
149
			DrawBar(x+11,y+14,5,1,color);
149
			DrawBar(x+11,y+14,5,1,color);
150
	}
150
	}
151
}
151
}