Eolite 1.4 / CleverMouse sorry for this... :-* )))
git-svn-id: svn://kolibrios.org@3050 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
36c641b524
commit
dd73e1caef
@ -20,7 +20,7 @@ int BUTTON_HEIGHT=18;
|
||||
#define ONLY_OPEN 2
|
||||
|
||||
//ïåðåìåííûå
|
||||
#define title "Eolite File Manager v1.38"
|
||||
#define title "Eolite File Manager v1.4"
|
||||
dword selection_col = 0x94AECE;
|
||||
dword lpanel_col = 0x00699C;
|
||||
|
||||
@ -56,6 +56,7 @@ int scroll_size;
|
||||
|
||||
|
||||
int toolbar_buttons_x[6]={9,46,85,134,167,203};
|
||||
char tmp_disk_del_param[]="d0";
|
||||
|
||||
dword file_mas[6898];
|
||||
int j, i, mouse_dd;
|
||||
@ -229,8 +230,7 @@ void main()
|
||||
Pause(10);
|
||||
GetSystemDiscs();
|
||||
Open_Dir(#path,WITH_REDRAW);
|
||||
DrawSystemDiscs();
|
||||
Actions();
|
||||
DrawLeftPanel();
|
||||
break;
|
||||
case 80: //rename
|
||||
goto REN_MARK;
|
||||
@ -261,6 +261,14 @@ void main()
|
||||
Pause(5);
|
||||
DrawRegion_3D(17,id-100*16+74,159,16, 0xFFFFFF, 0xFFFFFF);
|
||||
break;
|
||||
case 130...160:
|
||||
tmp_disk_del_param[1]=disk_list[id-130].Item[4];
|
||||
RunProgram("/sys/tmpdisk", #tmp_disk_del_param);
|
||||
Pause(10);
|
||||
GetSystemDiscs();
|
||||
Open_Dir(#path,WITH_REDRAW);
|
||||
DrawLeftPanel();
|
||||
break;
|
||||
default:
|
||||
if (id<200) break; //êíîïêè èç ñïèñêà ôàéëîâ
|
||||
if (curbtn!=id-201) {FileList_ReDraw(id-201-curbtn); break;}
|
||||
@ -433,8 +441,7 @@ inline fastcall void draw_window()
|
||||
//ïðÿìîóãîëüíèêè âíóòðè
|
||||
DrawRegion_3D(1,40,Form.width-12,onTop(46,0),0x94AECE,0x94AECE); //ñèíèé îáîäîê
|
||||
DrawRegion_3D(0,39,Form.width-10,onTop(44,0),0xE4DFE1,0xE4DFE1); //ôîí
|
||||
DrawSystemDiscs();
|
||||
Actions();
|
||||
DrawLeftPanel();
|
||||
//SortButtons
|
||||
DrawFlatButton(192,40,onLeft(192,168),16,31,0xE4DFE1,"File");
|
||||
DrawFlatButton(onLeft(168,0),40,73,16,32,0xE4DFE1,"Type");
|
||||
@ -593,7 +600,7 @@ void Open_Dir(dword temp_, redraw){
|
||||
return;
|
||||
}
|
||||
count = ESDWORD[buf+8];
|
||||
buf = realloc(count * 304 + 32, buf);
|
||||
buf = realloc(count * 304 + 32, buf); //ïî÷åìó 32?
|
||||
ReadDir(count, buf, #path_);
|
||||
IF (EBX>6897) && (EBX<>-1) EBX=6897; //1 íà óäà÷ó ;)
|
||||
count=EBX;
|
||||
@ -726,17 +733,6 @@ void Paste()
|
||||
}
|
||||
|
||||
|
||||
void Tip(int y, dword caption, id, arrow)
|
||||
{
|
||||
DrawBar(17,y,160,17,0xE4DFE1); //ñåðîå ñâåðõó
|
||||
WriteText(25,y+5,0x80,0,caption,0);
|
||||
IF (id<>0) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0xE4DFE1); //êíîïà äëÿ ñòðåëêè
|
||||
WriteText(165,y+5,0x80,0,arrow,0); //ñòðåëêà âíèç
|
||||
DrawBar(17,y+17,160,1,0x94AECE); //ïîä÷¸ðêèâàíèå
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ReName(byte rename)
|
||||
{
|
||||
int del_file_rez;
|
||||
@ -773,56 +769,6 @@ void ReName(byte rename)
|
||||
}
|
||||
|
||||
|
||||
void Actions()
|
||||
{
|
||||
int actions_y=disc_num*16;
|
||||
|
||||
DeleteButton(80);
|
||||
DeleteButton(81);
|
||||
DeleteButton(82);
|
||||
|
||||
if (!show_actions)
|
||||
Tip(actions_y+90, "Actions", 77, "\x18");
|
||||
else
|
||||
{
|
||||
Tip(actions_y+90, "Actions", 77, "\x19"); //çàãîëîâîê
|
||||
DrawBar(17,actions_y+108,160,51,0xFFFFFF); //áåëîå
|
||||
PutImage(#factions,16,44,21,actions_y+113); //èêîíêè
|
||||
//rename file
|
||||
DefineButton(17,actions_y+108,159,16,80+BT_HIDE,0xE4DFE1);
|
||||
WriteText(42,actions_y+113,0x80,0,"Rename file",0);
|
||||
WriteText(150,actions_y+113,0x80,0x999999,"[F2]",0);
|
||||
//delete file
|
||||
DefineButton(17,actions_y+125,159,16,81+BT_HIDE,0xE4DFE1);
|
||||
WriteText(42,actions_y+130,0x80,0,"Delete file",0);
|
||||
WriteText(144,actions_y+130,0x80,0x999999,"[Del]",0);
|
||||
//create folder
|
||||
DefineButton(17,actions_y+142,159,16,82+BT_HIDE,0xE4DFE1);
|
||||
WriteText(42,actions_y+147,0x80,0,"Create folder",0);
|
||||
WriteText(150,actions_y+147,0x80,0x999999,"[F6]",0);
|
||||
}
|
||||
LeftPanel();
|
||||
}
|
||||
|
||||
|
||||
void LeftPanel()
|
||||
{
|
||||
int actions_y=disc_num*16;
|
||||
int start_y = show_actions*51+actions_y+108;
|
||||
DrawBar(2,41,190,15,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - íàä äåâàéñàìè
|
||||
DrawBar(17,actions_y+75,160,15,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - ïîä äåâàéñàìè
|
||||
DrawBar(2,56,15,actions_y+103,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - ñëåâà
|
||||
DrawBar(177,56,15,actions_y+103,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà
|
||||
if (onTop(start_y, 6) < 268)
|
||||
PutPaletteImage(#blue_hl, 190, onTop(start_y, 6), 2, start_y, #blue_hl_pal);
|
||||
else
|
||||
{
|
||||
DrawBar(2,start_y,190,onTop(start_y,6+268),lpanel_col);
|
||||
PutPaletteImage(#blue_hl, 190, 268, 2, onTop(268,6), #blue_hl_pal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Goto_edit_path()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
unsigned char blue_hl[190*268]= FROM "blue_hl8.raw";
|
||||
unsigned char blue_hl[190*268]= FROM "imgs\blue_hl8.raw";
|
||||
|
||||
|
||||
dword blue_hl_pal[100]= {0x0001699C,0x0000699C,0x00026A9C,0x0002699C,
|
||||
@ -19,7 +19,7 @@ dword blue_hl_pal[100]= {0x0001699C,0x0000699C,0x00026A9C,0x0002699C,
|
||||
0x001E7AA8,0x001C79A6,0x001575A4,0x00207CA8,0x001E7AA7,0x001D79A7,
|
||||
0x001976A4,0x00217CA8,0x00227CA8,0x00207BA8,0x001976A5,0x001473A3,0};
|
||||
|
||||
unsigned char devices[14*65]= FROM "devices.raw";
|
||||
unsigned char devices[14*65]= FROM "imgs\devices.raw";
|
||||
|
||||
|
||||
unsigned char factions[16*44] = FROM "file_actions.raw";
|
||||
unsigned char factions[16*44] = FROM "imgs\file_actions.raw";
|
@ -38,7 +38,7 @@ void about_dialog()
|
||||
DefineAndDrawWindow(600,150,181,256,0x34,0x10EFEBEF,"About Eolite");
|
||||
DrawBar(0,0,172,50,0x8494C4); //ãîëóáîå ñçàäè
|
||||
PutPaletteImage(#logo,85,85,43,7,#logo_pal);
|
||||
WriteText(46,100,0x90,0xBF40BF,"Eolite v1.38",0);
|
||||
WriteText(49,100,0x90,0xBF40BF,"Eolite v1.4",0);
|
||||
$add ebx, 1<<16
|
||||
$int 0x40
|
||||
WriteText(55,120,0x80,0,"Developers:",0);
|
||||
|
@ -1,4 +1,13 @@
|
||||
//03.04.2012
|
||||
void Tip(int y, dword caption, id, arrow)
|
||||
{
|
||||
DrawBar(17,y,160,1,0xEFEDEE);
|
||||
DrawBar(17,y+1,160,16,0xE4DFE1); //ñåðîå ñâåðõó
|
||||
WriteText(25,y+5,0x80,0,caption,0);
|
||||
IF (id<>0) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0xE4DFE1); //êíîïà äëÿ ñòðåëêè
|
||||
WriteText(165,y+5,0x80,0,arrow,0); //ñòðåëêà âíèç
|
||||
DrawBar(17,y+17,160,1,0x94AECE); //ïîä÷¸ðêèâàíèå
|
||||
}
|
||||
|
||||
|
||||
path_string disk_list[20];
|
||||
int disc_num;
|
||||
@ -42,6 +51,7 @@ void DrawSystemDiscs()
|
||||
char disc_name[100];
|
||||
int i, dev_icon;
|
||||
|
||||
for (i=0; i<20; i++) DeleteButton(i);
|
||||
//ñïèñîê äèñêîâ
|
||||
Tip(56, "Devices", 78, "=");
|
||||
for (i=0;i<disc_num;i++)
|
||||
@ -73,11 +83,9 @@ void DrawSystemDiscs()
|
||||
dev_icon=4;
|
||||
strcpy(#disc_name, "RAM disk ");
|
||||
|
||||
//temp[0]=dev_name[4]; //àõóåòü ñèñòåìà
|
||||
//temp[1]=NULL;
|
||||
//DefineButton(17+143,i*16+74,16,16,StrToInt(#temp)+130+BT_HIDE+BT_NOFRAME,0xFFFFFF);
|
||||
//WriteText(45+121,i*16+79,0x80,0xAC0000,"-",0);
|
||||
//WriteText(45+121,i*16+79+1,0x80,0xAC0000,"-",0);
|
||||
DefineButton(17+143,i*16+74,16,16,i+130+BT_HIDE+BT_NOFRAME,0xFFFFFF);
|
||||
WriteText(45+121,i*16+79,0x80,0xD63535,"-",0);
|
||||
WriteText(45+121,i*16+79+1,0x80,0xBC2424,"-",0);
|
||||
break;
|
||||
default:
|
||||
dev_icon=3; //ïî-óìîë÷àíèþ óñòðîéñòâî âûãëÿäèò êàê æåñòÿê íî ýòî íåïðàâèëüíî
|
||||
@ -88,4 +96,63 @@ void DrawSystemDiscs()
|
||||
else WriteText(45,i*16+79,0x80,0,#dev_name,0);
|
||||
PutImage(dev_icon*14*13*3+#devices,14,13,21,i*16+76);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Actions()
|
||||
{
|
||||
int actions_y=disc_num*16;
|
||||
|
||||
DeleteButton(80);
|
||||
DeleteButton(81);
|
||||
DeleteButton(82);
|
||||
|
||||
if (!show_actions)
|
||||
Tip(actions_y+90, "Actions", 77, "\x18");
|
||||
else
|
||||
{
|
||||
Tip(actions_y+90, "Actions", 77, "\x19"); //çàãîëîâîê
|
||||
DrawBar(17,actions_y+108,160,51,0xFFFFFF); //áåëîå
|
||||
PutImage(#factions,16,44,21,actions_y+113); //èêîíêè
|
||||
//rename file
|
||||
DefineButton(17,actions_y+108,159,16,80+BT_HIDE,0xE4DFE1);
|
||||
WriteText(42,actions_y+113,0x80,0,"Rename file",0);
|
||||
WriteText(150,actions_y+113,0x80,0x999999,"[F2]",0);
|
||||
//delete file
|
||||
DefineButton(17,actions_y+125,159,16,81+BT_HIDE,0xE4DFE1);
|
||||
WriteText(42,actions_y+130,0x80,0,"Delete file",0);
|
||||
WriteText(144,actions_y+130,0x80,0x999999,"[Del]",0);
|
||||
//create folder
|
||||
DefineButton(17,actions_y+142,159,16,82+BT_HIDE,0xE4DFE1);
|
||||
WriteText(42,actions_y+147,0x80,0,"Create folder",0);
|
||||
WriteText(150,actions_y+147,0x80,0x999999,"[F6]",0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LeftPanelBackground()
|
||||
{
|
||||
int actions_y=disc_num*16;
|
||||
int start_y = show_actions*51+actions_y+108;
|
||||
DrawBar(2,41,190,15,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - íàä äåâàéñàìè
|
||||
DrawBar(17,actions_y+75,160,15,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - ïîä äåâàéñàìè
|
||||
DrawBar(2,56,15,actions_y+103,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - ñëåâà
|
||||
DrawBar(177,56,15,actions_y+103,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà
|
||||
if (onTop(start_y, 6) < 268)
|
||||
PutPaletteImage(#blue_hl, 190, onTop(start_y, 6), 2, start_y, #blue_hl_pal);
|
||||
else
|
||||
{
|
||||
DrawBar(2,start_y,190,onTop(start_y,6+268),lpanel_col);
|
||||
PutPaletteImage(#blue_hl, 190, 268, 2, onTop(268,6), #blue_hl_pal);
|
||||
if (onTop(268,6)>300) PutPaletteImage(#blue_hl, 190, 87, 2, start_y+100, #blue_hl_pal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DrawLeftPanel()
|
||||
{
|
||||
DrawSystemDiscs();
|
||||
Actions();
|
||||
LeftPanelBackground();
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ f3:
|
||||
$stosb
|
||||
$jnz f3
|
||||
$mov eax, #buffer
|
||||
$ret
|
||||
//$ret
|
||||
}
|
||||
|
||||
inline fastcall dword StrToInt()
|
||||
@ -79,8 +79,7 @@ dword StrToCol(char* htmlcolor)
|
||||
IF ((ch>='a') && (ch<='f')) ch -= 'a'-10;
|
||||
color = color*0x10 + ch;
|
||||
}
|
||||
|
||||
return color;
|
||||
return color;
|
||||
}
|
||||
|
||||
inline fastcall signed char strcmp(ESI, EDI)
|
||||
@ -97,7 +96,7 @@ inline fastcall signed char strcmp(ESI, EDI)
|
||||
|
||||
|
||||
|
||||
inline fastcall unsigned int strchr(ESI,BL)
|
||||
inline fastcall signed int strchr(ESI,BL)
|
||||
{
|
||||
int jj=0, last=-1;
|
||||
do{
|
||||
|
@ -1,7 +1,8 @@
|
||||
16.11.12 -- v1.38
|
||||
16.11.12 -- v1.4
|
||||
- при минимальном размере окна учитывается количество дисков в системе;
|
||||
- добавлен фон на левую панель;
|
||||
- изменения в организации файлов.
|
||||
- изменения в организации файлов;
|
||||
- удаление виртуальных дисков типа /tmpX/1.
|
||||
|
||||
15.11.12 -- v1.36
|
||||
- устранена утечка памяти при сканировании устройств;
|
||||
|
Loading…
Reference in New Issue
Block a user