Subversion Repositories Kolibri OS

Rev

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

Rev 7210 Rev 7244
Line 126... Line 126...
126
	char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len;
126
	char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len;
127
	int draw_y, draw_x, draw_h;
127
	int draw_y, draw_x, draw_h;
Line 128... Line 128...
128
	
128
	
Line 129... Line 129...
129
	for (i=0; i<30; i++) DeleteButton(100+i);
129
	for (i=0; i<30; i++) DeleteButton(100+i);
130
 
130
 
Line 131... Line 131...
131
	if ( two_panels) { draw_y = 41; draw_x =  2; draw_h = 21; }
131
	if ( two_panels.checked) { draw_y = 41; draw_x =  2; draw_h = 21; }
132
	if (!two_panels) { draw_y = 74; draw_x = 17; draw_h = 16; }
132
	if (!two_panels.checked) { draw_y = 74; draw_x = 17; draw_h = 16; }
133
 
133
 
134
	for (i=0;i
134
	for (i=0;i
135
	{
135
	{
136
		strcpy(#dev_name, list.get(i));
136
		strcpy(#dev_name, list.get(i));
137
		GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
137
		GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
138
		if (strstr(#path, #dev_name)-#path==0) is_active=true; else is_active=false;
138
		if (strstr(#path, #dev_name)-#path==0) is_active=true; else is_active=false;
139
		if (two_panels)
139
		if (two_panels.checked)
140
		{
140
		{
141
			name_len = strlen(#dev_name)-1*8;
141
			name_len = strlen(#dev_name)-1*8;
Line 153... Line 153...
153
		else
153
		else
154
		{
154
		{
155
			DrawBar(draw_x,draw_y,6,draw_h+1,0xFFFFFF);
155
			DrawBar(draw_x,draw_y,6,draw_h+1,0xFFFFFF);
156
			DrawBar(draw_x+6+18,draw_y,160-6-18,draw_h+1,0xFFFFFF);
156
			DrawBar(draw_x+6+18,draw_y,160-6-18,draw_h+1,0xFFFFFF);
157
			DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF);
157
			DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF);
158
			if (show_dev_name)
158
			if (show_dev_name.checked)
159
			{
159
			{
160
				strcat(#disc_name, #dev_name);
160
				strcat(#disc_name, #dev_name);
161
				if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name);
161
				if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name);
162
				WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name);
162
				WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name);			}
163
			}
-
 
164
			else
163
			else
165
			{
164
			{
166
				if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name);
165
				if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name);
167
				WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name);
166
				WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name);
168
			}
167
			}
169
			_PutImage(draw_x+6,draw_y, 18,17, is_active*6+dev_icon*17*18*3+#devices);
168
			_PutImage(draw_x+6,draw_y, 18,17, is_active*6+dev_icon*17*18*3+#devices);
170
			draw_y += draw_h;
169
			draw_y += draw_h;
171
		}
170
		}
172
	}
171
	}
173
	if (two_panels)
172
	if (two_panels.checked)
174
	{
173
	{
175
		DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 0xFFFFFF);
174
		DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 0xFFFFFF);
176
		DefineButton(Form.cwidth - 23, draw_y+2, 17,16, 60+BT_HIDE, 0xCCCccc);
175
		DefineButton(Form.cwidth - 23, draw_y+2, 17,16, 60+BT_HIDE, 0xCCCccc);
177
		_PutImage(Form.cwidth - 21, draw_y+4, 14,13, 2*14*13*3+#factions);
176
		_PutImage(Form.cwidth - 21, draw_y+4, 14,13, 2*14*13*3+#factions);
178
		files.y = draw_y + draw_h + 17;
177
		files.y = draw_y + draw_h + 17;