Subversion Repositories Kolibri OS

Rev

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

Rev 5834 Rev 5960
Line 67... Line 67...
67
	WriteText(165,y+5,0x80,system.color.work_text,arrow); //arrow
67
	WriteText(165,y+5,0x80,system.color.work_text,arrow); //arrow
68
	DrawBar(17,y+17,160,1,system.color.work_graph);
68
	DrawBar(17,y+17,160,1,system.color.work_graph);
69
}
69
}
Line 70... Line 70...
70
 
70
 
71
 
-
 
72
path_string disk_list[30];
-
 
73
int disc_num;
-
 
Line 74... Line 71...
74
dword devbuf;
71
 
75
 
72
collection disk_list;
76
 
73
 
77
void GetSystemDiscs()
74
void GetSystemDiscs()
78
{
75
{
-
 
76
	char dev_name[10], sys_discs[10];
Line 79... Line 77...
79
	char dev_name[10], sys_discs[10];
77
	int i1, j1, dev_num, dev_disc_num;
80
	int i1, j1, dev_num, dev_disc_num,l;
78
	dword temp_file_count, tempbuf;
81
	dword temp_file_count, tempbuf;
-
 
82
 
79
	dword devbuf;
83
	disc_num=0;
80
 
84
	if (devbuf) free(devbuf);
81
	disk_list.init(4096);
85
	devbuf = malloc(10000); //áóôåð ãäå-òî íà 10 äåâàéñîâ â ëåâîé ïàíåëè
82
	devbuf = malloc(10000);
86
	ReadDir(19, devbuf, "/");
83
	ReadDir(19, devbuf, "/");
87
	dev_num = EBX;
84
	dev_num = EBX;
88
	for (i1=0; i1
85
	for (i1=0; i1
89
	{
-
 
90
		sprintf(#dev_name,"/%s/",i1*304+ devbuf+72);
86
	{
91
		Open_Dir(#dev_name, ONLY_OPEN);
87
		sprintf(#dev_name,"/%s/",i1*304+ devbuf+72);
92
		dev_disc_num = files.count;
88
		Open_Dir(#dev_name, ONLY_OPEN);
93
		//if (files.count<=0) copystr(#dev_name,#disk_list[disc_num].Item); else
89
		dev_disc_num = files.count;
94
		for (j1=0; j1
-
 
95
		{
90
		for (j1=0; j1
96
			l=sprintf(#sys_discs,"%s%s/",#dev_name,j1*304+ buf+72);
91
		{
97
			strlcpy(#disk_list[disc_num].Item, #sys_discs,l);
92
			sprintf(#sys_discs,"%s%s/",#dev_name,j1*304+ buf+72);
98
			disc_num++;
93
			disk_list.add(#sys_discs);
99
		}
-
 
100
		if (!strncmp(#sys_discs, "/rd/1/",6)) 
-
 
101
		{
94
		}
102
			GetDir(#tempbuf, #temp_file_count, "/kolibrios/", DIRS_ONLYREAL);
-
 
103
			if (temp_file_count)
-
 
104
			{
-
 
105
				strlcpy(#disk_list[disc_num].Item, "/kolibrios/",11);
-
 
106
				kolibrios_drive = true;
95
		if (!strcmp(#sys_discs, "/rd/1/")) 
107
				disc_num++;	
96
		{
108
			}
97
			GetDir(#tempbuf, #temp_file_count, "/kolibrios/", DIRS_ONLYREAL);
109
			else kolibrios_drive = false;
98
			if (temp_file_count) disk_list.add("/kolibrios/");
-
 
99
			free(tempbuf);
110
			free(tempbuf);
100
		}
Line 111... Line 101...
111
		}
101
		else if (!strcmp(#sys_discs, "/fd/1/")) CMD_ENABLE_SAVE_IMG = true;
112
		else if (!strncmp(#sys_discs, "/fd/1/",6)) CMD_ENABLE_SAVE_IMG = true;
102
	}
113
	}
103
	free(devbuf);
114
}
104
}
Line 115... Line 105...
115
 
105
 
116
 
106
 
117
void DrawSystemDiscs()
107
void DrawSystemDiscs()
118
{    
108
{    
119
	char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len;
109
	char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len;
120
	int pos_y, pos_x=2;
110
	int pos_y, pos_x=2;
121
	
111
	
122
	for (i=disc_num; i<30; i++) DeleteButton(100+i);
112
	for (i=0; i<30; i++) DeleteButton(100+i);
123
	for (i=0;i
113
	for (i=0;i
Line 205... Line 195...
205
}
195
}
Line 206... Line 196...
206
 
196
 
207
 
197
 
208
void ActionsDraw()
198
void ActionsDraw()
209
{
199
{
210
	int actions_y=disc_num*16+108, lineh=16;
200
	int actions_y=disk_list.count*16+108, lineh=16;
211
	Tip(actions_y-18, T_ACTIONS, 77, ""); //çàãîëîâîê
201
	Tip(actions_y-18, T_ACTIONS, 77, ""); //çàãîëîâîê
212
	for (i=0; actions[i*3]!=0; i++, actions_y+=lineh)
202
	for (i=0; actions[i*3]!=0; i++, actions_y+=lineh)
213
	{
203
	{
Line 220... Line 210...
220
}
210
}
Line 221... Line 211...
221
 
211
 
222
 
212
 
223
void DrawLeftPanelBg()
213
void DrawLeftPanelBg()
224
{
214
{
225
	int actions_y=disc_num*16;
215
	int actions_y=disk_list.count*16;
226
	int start_y = actions_y+156;
216
	int start_y = actions_y+156;
227
	int onTop1;
217
	int onTop1;
228
	DrawBar(2,41,190,15,col_lpanel);		      //ñèíèé ïðÿìîóãîëüíèê - íàä äåâàéñàìè
218
	DrawBar(2,41,190,15,col_lpanel);		      //ñèíèé ïðÿìîóãîëüíèê - íàä äåâàéñàìè
Line 253... Line 243...
253
	ActionsDraw();
243
	ActionsDraw();
254
	DrawLeftPanelBg();
244
	DrawLeftPanelBg();
255
}
245
}
Line 256... Line 246...
256
 
246
 
257
 
247
 
258
void ClickOnDisk(char diskN)
248
void ClickOnDisk(int n)
259
{
249
{
260
	strcpy(#path, #disk_list[diskN].Item);
250
	strcpy(#path, disk_list.get(n));
261
	files.KeyHome();
251
	files.KeyHome();
262
	Open_Dir(#path,WITH_REDRAW);	
252
	Open_Dir(#path,WITH_REDRAW);