Eolite 1.33: small update

git-svn-id: svn://kolibrios.org@2903 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2012-08-02 13:31:15 +00:00
parent 7dadbba2bb
commit 8461dc784b
6 changed files with 110 additions and 116 deletions

View File

@ -20,8 +20,9 @@ int BUTTON_HEIGHT=18;
#define ONLY_OPEN 2
//ïåðåìåííûå
#define title "Eolite File Manager v1.32"
dword selection_col=0x94AECE;
#define title "Eolite File Manager v1.33"
dword selection_col = 0x94AECE;
dword lpanel_col = 0x00699C;
/*
@ -83,7 +84,7 @@ dword buf, off; //
void main()
word key, id;
mouse m;
int pressed_y, scroll_used=0;
int scroll_used=0;
{
load_editbox_lib();
GetSystemDiscs();
@ -92,10 +93,10 @@ int pressed_y, scroll_used=0;
edit1.shift_color=selection_col;
edit2.shift_color=selection_col;
IF (param)
if (param)
{
copystr(#param, #path);
IF (strcmp(#path+strlen(#path)-1,"/")<>0) copystr("/",#path+strlen(#path)); //åñëè íåò, + "/"
if (strcmp(#path+strlen(#path)-1,"/")<>0) copystr("/",#path+strlen(#path)); //åñëè íåò, + "/"
}
else
copystr("/rd/1/", #path);
@ -175,105 +176,106 @@ int pressed_y, scroll_used=0;
break;
//Button pressed-----------------------------------------------------------------------------
case evButton:
id=GetButtonID();
IF (id==1) ExitProcess();
id=GetButtonID();
IF (id==1) ExitProcess();
IF (del_active)
{
IF (id==301) || (id==302) Del_File(302-id);
break;
}
switch(id)
{
case 21: //Back
GoBack();
break;
case 22: //Forward
if (HistoryPath(GO_FORWARD))
{
za_kadrom=curbtn=0; //ââåðõ ñïèñêà
IF (del_active)
{
IF (id==301) || (id==302) Del_File(302-id);
break;
}
switch(id)
{
case 21: //Back
GoBack();
break;
case 22: //Forward
if (HistoryPath(GO_FORWARD))
{
za_kadrom=curbtn=0; //ââåðõ ñïèñêà
Open_Dir(#path,WITH_REDRAW);
}
break;
case 23: //up!
Dir_Up();
break;
case 24: //cut
key=24;
case 25: //copy
goto CTRLC_MARK;
case 26: //paste
Paste();
break;
case 27: //goto edit_path
Goto_edit_path();
break;
case 31...33: //sort
IF(sort_num==1) DrawBar(onLeft(192,168)/2+210,45,6,9,0xE4DFE1);
IF(sort_num==2) DrawBar(onLeft(115,0),45,6,9,0xE4DFE1);
IF(sort_num==3) DrawBar(onLeft(44,0),45,6,9,0xE4DFE1);
sort_num=id-30;
Open_Dir(#path,1);
break;
case 30: //about
CreateThread(#about_dialog,#stak);
break;
case 77:
IF (show_actions==1) show_actions=0; ELSE show_actions=1;
Actions();
break;
case 78:
IF (show_dev_name==1) show_dev_name=0; ELSE show_dev_name=1;
GetSystemDiscs();
Open_Dir(#path,WITH_REDRAW);
}
break;
case 23: //up!
Dir_Up();
break;
case 24: //cut
key=24;
case 25: //copy
goto CTRLC_MARK;
case 26: //paste
Paste();
break;
case 27: //goto edit_path
Goto_edit_path();
break;
case 31...33: //sort
IF(sort_num==1) DrawBar(onLeft(192,168)/2+210,45,6,9,0xE4DFE1);
IF(sort_num==2) DrawBar(onLeft(115,0),45,6,9,0xE4DFE1);
IF(sort_num==3) DrawBar(onLeft(44,0),45,6,9,0xE4DFE1);
sort_num=id-30;
Open_Dir(#path,1);
break;
case 30: //about
CreateThread(#about_dialog,#stak);
break;
case 77:
IF (show_actions==1) show_actions=0; ELSE show_actions=1;
Actions();
break;
case 78:
IF (show_dev_name==1) show_dev_name=0; ELSE show_dev_name=1;
GetSystemDiscs();
Open_Dir(#path,WITH_REDRAW);
DrawSystemDiscs();
Actions();
break;
case 80: //rename
goto REN_MARK;
case 81: //Delete file
Del_Form();
break;
case 82: //create folder
DrawSystemDiscs();
Actions();
break;
case 80: //rename
goto REN_MARK;
case 81: //Delete file
Del_Form();
break;
case 82: //create folder
NEW_FOLDER_MARK:
copystr(#path, #temp);
copystr("New folder", #temp+strlen(#temp));
CreateFolder(#temp);
IF (EAX==0){
SelectFile("New folder");
goto REN_MARK;
}
ELSE
{
Write_Error(EAX);
ShowMessage("Folder can not be created.");
}
break;
case 100...120:
copystr(#path, #temp);
copystr("New folder", #temp+strlen(#temp));
CreateFolder(#temp);
IF (EAX==0){
SelectFile("New folder");
goto REN_MARK;
}
ELSE
{
Write_Error(EAX);
ShowMessage("Folder can not be created.");
}
break;
case 100...120:
DEVICE_MARK:
DrawRegion_3D(17,id-100*16+74,159,16, 0, 0); //âûäåëåíèå
copystr(#disk_list[id-100].Item, #path);
za_kadrom=curbtn=0;
Open_Dir(#path,1);
Pause(5);
DrawRegion_3D(17,id-100*16+74,159,16, 0xFFFFFF, 0xFFFFFF);
break;
default:
if (id<200) break; //êíîïêè èç ñïèñêà ôàéëîâ
if (curbtn!=id-201) {FileList_ReDraw(id-201-curbtn); break;}
else OPEN_MARK:
if (!isdir) GetIni(0); else
if (strcmp(#file_name,"..")==0) Dir_Up();
else
{
DrawRegion_3D(17,id-100*16+74,159,16, 0, 0); //âûäåëåíèå
copystr(#disk_list[id-100].Item, #path);
za_kadrom=curbtn=0;
Open_Dir(#path,1);
Pause(5);
DrawRegion_3D(17,id-100*16+74,159,16, 0xFFFFFF, 0xFFFFFF);
break;
default:
if (id<200) break; //êíîïêè èç ñïèñêà ôàéëîâ
if (curbtn!=id-201) {FileList_ReDraw(id-201-curbtn); break;}
else
OPEN_MARK:
if (!isdir) GetIni(0); else
if (!strcmp(#file_name,"..")) Dir_Up();
else
{
OPEN_DEV:
copystr(#file_path, #path);
IF (strcmp(#path+strlen(#path)-1,"/")<>0) copystr("/",#path+strlen(#path)); //åñëè íåò, + "/"
za_kadrom=curbtn=0;
Open_Dir(#path,1);
}
}
break;
copystr(#file_path, #path);
IF (strcmp(#path+strlen(#path)-1,"/")<>0) copystr("/",#path+strlen(#path)); //åñëè íåò, + "/"
za_kadrom=curbtn=0;
Open_Dir(#path,1);
}
}
break;
//Key pressed-----------------------------------------------------------------------------
case evKey:
key = GetKey();
@ -498,8 +500,6 @@ void FileList_ReDraw(int curbtn_)
curbtn=but_num-1;
}
List_ReDraw();
//WriteFullDebug("");
}
}
}
@ -512,7 +512,7 @@ void List_ReDraw()
int paint_x=but_num*BUTTON_HEIGHT+57;
IF (count-za_kadrom<but_num) || (curbtn>but_num-1) //åñëè ìû â êîíöå ñïèñêà ôàéëîâ ðàçâåðí¸ì îêíî ïîÿâÿòüñÿ ïóñòÿå áåëûå êíîïêè
{ za_kadrom=count-but_num; curbtn=but_num-1; } //ýòî åñëè âûäåëåíèå ïîñëå ñõëîïûâàíèÿ îêíà çà êàäðîì
//
FOR (j=0; j<but_num; j++) IF (curbtn<>j) Line_ReDraw(0xFFFFFF, j); ELSE Line_ReDraw(selection_col, curbtn);
DrawBar(192,paint_x,onLeft(27,192),onTop(paint_x,6),0xFFFFFF); //çàëèâêà áåëûì äîêîíöà
DrawBar(onLeft(168,0),paint_x,1,onTop(paint_x,6),0xE4DFE1); //ïîëîñà ñåðàÿ âåðòèêàëüíàÿ 1
@ -553,8 +553,6 @@ void List_ReDraw()
TVScroll();
}*/
//-------------------------------------------------------------------------------------
void Line_ReDraw(dword color, filenum){
dword text_col=0, name_len,
@ -569,7 +567,7 @@ void Line_ReDraw(dword color, filenum){
off=file_mas[filenum+za_kadrom]*304 + buf+72;
if (!TestBit(ESDWORD[off-40], 4))
if (!TestBit(ESDWORD[off-40], 4)) //ýòî ÔÀÉË èëè ïàïêà?
{
copystr(off,#temp);
Put_icon(#temp+strchr(#temp,'.'), BUTTON_HEIGHT/2-7+y, color);
@ -807,8 +805,8 @@ void Actions()
{
int actions_y=disc_num*16;
DrawBar(17,actions_y+75,160,15,0x00699C); //ñèíèé ïðÿìîóãîëüíèê - ïîä äåâàéñàìè
DrawBar(17,show_actions*51+actions_y+108,160,onTop(show_actions*51+actions_y+108,6),0x00699C); //ñèíåå â êîíöå
DrawBar(17,actions_y+75,160,15,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - ïîä äåâàéñàìè
DrawBar(17,show_actions*51+actions_y+108,160,onTop(show_actions*51+actions_y+108,6),lpanel_col); //ñèíåå â êîíöå
DeleteButton(80);
DeleteButton(81);

View File

@ -12,9 +12,6 @@ Put box_lib.obj into "/sys/lib/" directory.
Put Eolite.ini into programs directory or in "/sys/File Managers/".
Eolite can be opened from anywhere.
==Known bugs==
1.
==Authors==
Leency - programming and design.

View File

@ -13,8 +13,6 @@ http://board.kolibrios.org/viewtopic.php?f=9&t=973
Нужно иметь свежий box_lib.obj. Eolite.ini должен быть в папке
с программой или в "/sys/File Managers/".
==Известные баги==
1. Загрузка процессора 100%, если зажать ЛКМ на ползунке.
==Авторы==
Leency - разработка, дизайн.

View File

@ -39,7 +39,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.32",0);
WriteText(46,100,0x90,0xBF40BF,"Eolite v1.33",0);
$add ebx, 1<<16
$int 0x40
WriteText(55,120,0x80,0,"Developers:",0);

View File

@ -42,9 +42,9 @@ void DrawSystemDiscs()
char disc_name[100];
int i, dev_icon;
DrawBar(2,41,190,15,0x00699C); //синий прямоугольник - сверху
DrawBar(2,56,15,onTop(21,41),0x00699C); //синий прямоугольник - слева
DrawBar(177,56,15,onTop(21,41),0x00699C); //синий прямоугольник - справа
DrawBar(2,41,190,15,lpanel_col); //синий прямоугольник - сверху
DrawBar(2,56,15,onTop(21,41),lpanel_col); //синий прямоугольник - слева
DrawBar(177,56,15,onTop(21,41),lpanel_col); //синий прямоугольник - справа
//ñïèñîê äèñêîâ
if (show_dev_name) Tip(56, "Devices", 78, "=");
else Tip(56, "Devices", 78, "-");

View File

@ -11,6 +11,7 @@ char *ext[]={
"html",2,
"mht", 2,
"ini", 3,
"js", 3,
"conf",3,
"xlt", 4,
"xls", 4,