Subversion Repositories Kolibri OS

Rev

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

Rev 976 Rev 977
Line 1... Line 1...
1
//Leency & Veliant -=- KolibriOS Team -=- 2008
1
//Leency & Veliant -=- KolibriOS Team -=- 2008
Line 2... Line 2...
2
 
2
 
3
//ñòðîêà 258, êåéàï!
-
 
4
//âîçìîæíî, áàã â KEdit
3
//ñòðîêà 258, êåéàï!
5
//find_symbol íàäî ÷èòàòü ñ êîíöà
4
//find_symbol íàäî ÷èòàòü ñ êîíöà
6
//DrawBar(sort_num[1],45,6,9,0xE4DFE1);
5
//DrawBar(sort_num[1],45,6,9,0xE4DFE1);
Line 7... Line 6...
7
//Open_Dir íàõðåí èñïàãàíåí èôàìè, ñäåëàòü äåôàéëû èëè åù¸ ÷òî-òî, ïîòîìó ÷òî ïîêà ýòî âûãëÿäèò íåêðàñèâî
6
//Open_Dir íàõðåí èñïàãàíåí èôàìè, ñäåëàòü äåôàéëû èëè åù¸ ÷òî-òî, ïîòîìó ÷òî ïîêà ýòî âûãëÿäèò íåêðàñèâî
Line 189... Line 188...
189
					{
188
					{
190
					IF (key==013) Del_File(true);
189
					IF (key==013) Del_File(true);
191
					IF (key==027) Del_File(false);
190
					IF (key==027) Del_File(false);
192
				 	break;
191
				 	break;
193
				 	}
192
				 	}
194
				IF (edit1.flags<>64) && (key<>13) {EAX=key<<8; edit_box_key stdcall (#edit1); break;} 
193
				IF (edit1.flags<>64) && IF (edit1.flags<>0) && (key<>13) {EAX=key<<8; edit_box_key stdcall (#edit1); break;} 
195
                IF (edit2.flags<>64) && (key<>13) && (key<>27) {EAX=key<<8; edit_box_key stdcall (#edit2); break;}
194
                IF (edit2.flags<>64) && (key<>13) && (key<>27) {EAX=key<<8; edit_box_key stdcall (#edit2); break;}
196
				switch (key)
195
				switch (key)
197
				{
196
				{
198
						case 209...217: id=key-109; GOTO DEVICE_MARK;
197
						case 209...217: id=key-109; GOTO DEVICE_MARK;
199
						case 8: GoBack(); break; //Íàçàä
198
						case 8: GoBack(); break; //Íàçàä
Line 396... Line 395...
396
	TVScroll();
395
	TVScroll();
397
}
396
}
Line 398... Line 397...
398
 
397
 
399
 
398
 
400
void Line_ReDraw(dword color, filenum){
399
void Line_ReDraw(dword color, filenum){
401
	dword y;//ïîëîæåíèå òåêñòà ïî Y;
400
	dword text_col, y;//ïîëîæåíèå òåêñòà ïî Y;
402
	if (rename_active==1) //âñ¸ ýòî ïîëíûé ïèïåö, è íàäî âûíåñòè â îòäåëüíóþ ïðîöåäóðó
401
	if (rename_active==1) //âñ¸ ýòî ïîëíûé ïèïåö, è íàäî âûíåñòè â îòäåëüíóþ ïðîöåäóðó
403
	{
402
	{
404
		rename_active=0;
403
		rename_active=0;
Line 422... Line 421...
422
	}
421
	}
423
	y=filenum*18+57;
422
	y=filenum*18+57;
424
	//äà, ÿ íå ñïîðþ ÷òî èçâðàò, íî ïåðåðèñîâêà çàòî ìàëåíüêàÿ
423
	//äà, ÿ íå ñïîðþ ÷òî èçâðàò, íî ïåðåðèñîâêà çàòî ìàëåíüêàÿ
425
	DrawBar(192,y,3,18,color); DrawBar(195,y,16,2,color); 
424
	DrawBar(192,y,3,18,color); DrawBar(195,y,16,2,color); 
426
	DrawBar(192+19,y,onLeft(46,192),18,color); DrawBar(195,y+17,16,1,color);
425
	DrawBar(192+19,y,onLeft(46,192),18,color); DrawBar(195,y+17,16,1,color);
427
	//
-
 
428
	off=file_mas[filenum+za_kadrom]*304 + buf+72;
426
	off=file_mas[filenum+za_kadrom]*304 + buf+72;
-
 
427
	//
429
	EAX=ESDWORD[off-40];
428
	EBX=EAX=ESDWORD[off-40];
-
 
429
	$shr ebx,2 //ôàéë ñêðûòûé?
430
	$shr eax,4
430
	$and ebx,1
-
 
431
	IF (!EBX) text_col=0; ELSE text_col=0xA6A6B7;
-
 
432
	$shr eax,4 //ýòî ïàïêà?
431
	$and eax,1
433
	$and eax,1
432
	IF (color==videlenie) isdir=EAX;
434
	IF (color==videlenie) isdir=EAX;
433
	if (!EAX)
435
	if (!EAX)
434
	{
436
	{
435
		temp_int = Put_icon(off+strlen(off)-4, y+2);
437
		temp_int = Put_icon(off+strlen(off)-4, y+2);
Line 439... Line 441...
439
	{
441
	{
440
		IconFairing(temp_int, y+2); //çàêðàøèâàåì èêîíêó
442
		IconFairing(temp_int, y+2); //çàêðàøèâàåì èêîíêó
441
		copystr(off,#file_name);
443
		copystr(off,#file_name);
442
		copystr(#path,#file_path);
444
		copystr(#path,#file_path);
443
		copystr(#file_name,#file_path+strlen(#file_path)); //ïîëíûé ïóòü ê ôàéëó
445
		copystr(#file_name,#file_path+strlen(#file_path)); //ïîëíûé ïóòü ê ôàéëó
-
 
446
		Preview();
-
 
447
		IF (text_col==0xA6A6B7) text_col=0xFFFFFF;
444
		/*IF (show_preview) && (!isdir)
448
		/*IF (show_preview) && (!isdir)
445
		{
449
		{
446
			GetImage(#file_path);
450
			GetImage(#file_path);
447
			j=dev_num*16+123;
451
			j=dev_num*16+123;
448
			j+=show_actions*51;
452
			j+=show_actions*51;
449
			IF (pLoadedImage<>0) DrawImage(#CurrentImage, 22*65536+j+skin_width+18);
453
			IF (pLoadedImage<>0) DrawImage(#CurrentImage, 22*65536+j+skin_width+18);
450
		}*/
454
		}*/
451
	}
455
	}
452
	temp_int = onLeft(215,160)/6;
456
	temp_int = onLeft(215,165)/6;
453
	IF (strlen(off)
457
	IF (strlen(off)
454
		WriteText(215,y+6,0,0,off,temp_int);  //èìÿ ôàéëà
458
		WriteText(215,y+6,0,text_col,off,temp_int);  //èìÿ ôàéëà
455
	DrawBar(onLeft(168,0),y,1,18,0xE4DFE1); //ïîëîñà ñåðàÿ âåðòèêàëüíàÿ 1
459
	DrawBar(onLeft(168,0),y,1,18,0xE4DFE1); //ïîëîñà ñåðàÿ âåðòèêàëüíàÿ 1
456
	DrawBar(onLeft(95,0),y,1,18,0xE4DFE1); //ïîëîñà ñåðàÿ âåðòèêàëüíàÿ 2
460
	DrawBar(onLeft(95,0),y,1,18,0xE4DFE1); //ïîëîñà ñåðàÿ âåðòèêàëüíàÿ 2
457
	//Preview();
-
 
458
}
461
}
Line 459... Line 462...
459
 
462
 
460
 
463
 
Line 664... Line 667...
664
		WriteText(25,top_pr+30,0x80,0,"Number of files:",0); WriteText(135,top_pr+30,0x80,0,IntToStr(count),0); 
667
		WriteText(25,top_pr+30,0x80,0,"Number of files:",0); WriteText(135,top_pr+30,0x80,0,IntToStr(count),0); 
665
		WriteText(30,top_pr+40,0x80,0,"but_num:",0);	 WriteText(105,top_pr+40,0x80,0,IntToStr(but_num),0);
668
		WriteText(30,top_pr+40,0x80,0,"but_num:",0);	 WriteText(105,top_pr+40,0x80,0,IntToStr(but_num),0);
666
		WriteText(30,top_pr+50,0x80,0,"curbtn",0);		 WriteText(105,top_pr+50,0x80,0,IntToStr(curbtn),0);
669
		WriteText(30,top_pr+50,0x80,0,"curbtn",0);		 WriteText(105,top_pr+50,0x80,0,IntToStr(curbtn),0);
667
		WriteText(30,top_pr+60,0x80,0,"ra_kadrom:",0);	 WriteText(105,top_pr+60,0x80,0,IntToStr(za_kadrom),0);
670
		WriteText(30,top_pr+60,0x80,0,"ra_kadrom:",0);	 WriteText(105,top_pr+60,0x80,0,IntToStr(za_kadrom),0);
668
		WriteText(30,top_pr+70,0x80,0,#file_path,0);
671
		WriteText(30,top_pr+70,0x80,0,#file_path,0);
669
		WriteText(30,top_pr+80,0x80,0,#file_name,0);
672
		WriteText(30,top_pr+80,0x80,0,IntToStr(edit1.flags),0); WriteText(30,top_pr+90,0x80,0,IntToStr(edit2.flags),0);
670
	} 
673
	} 
671
	ELSE
674
	ELSE
672
	{
675
	{
673
		Tip(top_pr,"Preview",78,"\x18");
676
		Tip(top_pr,"Preview",78,"\x18");
674
		DrawBar(17,top_pr+18,160,onTop(top_pr+18,6),0x00699C); //ñèíåå
677
		DrawBar(17,top_pr+18,160,onTop(top_pr+18,6),0x00699C); //ñèíåå
Line 711... Line 714...
711
	path[i+1]=0x00;
714
	path[i+1]=0x00;
712
	SelectFile(#temp_);
715
	SelectFile(#temp_);
713
}
716
}
Line -... Line 717...
-
 
717
 
-
 
718
 
-
 
719
/*inline fastcall void GoBack()   //âíà÷àëå óäàëÿåì òåêóùèé ïóòü, à ïîòîì êîïèðóåì òî, ÷òî îñòàëîñü
-
 
720
{
-
 
721
	i=strlen(#PathHistory)-1;
-
 
722
	PathHistory[i]=0x00;
-
 
723
	copystr(#PathHistory+find_symbol(#PathHistory,'/'),#temp); //ïàïêà â êîòîðîé áûëè
-
 
724
	HistoryPath(go_back);
-
 
725
	SelectFile(#temp);
714
 
726
}*/
715
 
727
 
716
inline fastcall void GoBack()   //âíà÷àëå óäàëÿåì òåêóùèé ïóòü, à ïîòîì êîïèðóåì òî, ÷òî îñòàëîñü
728
inline fastcall void GoBack()   //âíà÷àëå óäàëÿåì òåêóùèé ïóòü, à ïîòîì êîïèðóåì òî, ÷òî îñòàëîñü
-
 
729
{
717
{
730
	i=strlen(#PathHistory)-1;
718
	i=strlen(#PathHistory)-1;
731
	IF (i<7) return;
719
	PathHistory[i]=0x00;
732
	PathHistory[i]=0x00;
720
	copystr(#PathHistory+find_symbol(#PathHistory,'/'),#temp); //ïàïêà â êîòîðîé áûëè
733
	copystr(#PathHistory+find_symbol(#PathHistory,'/'),#temp); //ïàïêà â êîòîðîé áûëè
721
	HistoryPath(go_back);
734
	HistoryPath(go_back);