Eolite 1.22

git-svn-id: svn://kolibrios.org@2662 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2012-05-13 11:42:55 +00:00
parent ee39c37eca
commit c7c2efaa81
5 changed files with 37 additions and 20 deletions

View File

@ -3,7 +3,7 @@
//êîïèðîâàòü ÷åðåç ïîòîê //êîïèðîâàòü ÷åðåç ïîòîê
//IF (strcmp(#path+strlen(#path)-1,"/")<>0) copystr("/",#path+strlen(#path)); //åñëè íåò, + "/" ïåðåíåñòèâ îïåíäèð //IF (strcmp(#path+strlen(#path)-1,"/")<>0) copystr("/",#path+strlen(#path)); //åñëè íåò, + "/" ïåðåíåñòèâ îïåíäèð
//3. Думаю будет флаг отображать подписи или нет. И да, иконка действительно нужна другая. //čęîíęŕ äĺéńňâčňĺëüíî íóćíŕ äđóăŕ˙ äë˙ íĺčçâĺńíűő óńňđîéńňâ č ďŕďîę â áóäóţůĺě.
#include "lib\kolibri.h" #include "lib\kolibri.h"
#include "lib\memory.h" #include "lib\memory.h"
@ -20,18 +20,20 @@ int BUTTON_HEIGHT=18;
#define ONLY_OPEN 2 #define ONLY_OPEN 2
//ïåðåìåííûå //ïåðåìåííûå
#define title "Eolite File Manager v1.21" #define title "Eolite File Manager v1.22"
dword videlenie=0x94AECE; //öâåò âûäåëåííîãî ýëåìåíòà èç ñïèñêà ôàéëîâ dword videlenie=0x94AECE; //öâåò âûäåëåííîãî ýëåìåíòà èç ñïèñêà ôàéëîâ
// //
int but_num, int but_num,
count, count,
za_kadrom, za_kadrom,
curbtn, curbtn,
disc_num,
scroll_size; scroll_size;
byte cut_active, byte cut_active,
rename_active, rename_active,
del_active; del_active;
byte show_actions=1, byte show_actions=1,
show_dev_name=1,
sort_num=2, sort_num=2,
isdir; isdir;
char path[4096], char path[4096],
@ -40,7 +42,7 @@ char path[4096],
file_name[4096], file_name[4096],
copy_file[4096], copy_file[4096],
temp[4096]; temp[4096];
byte PathHistory[4096];
int toolbar_buttons_x[6]={9,46,85,134,167,203}; int toolbar_buttons_x[6]={9,46,85,134,167,203};
@ -51,6 +53,8 @@ struct path_string {
char Item[4096]; char Item[4096];
}; };
path_string disk_list[20];
dword stak[100]; //îêíî About dword stak[100]; //îêíî About
edit_box edit1= {250,247,13,0xffffff,0x94AECE,0xD3DDEB,0xffffff,0,248,#edit_path,#mouse_dd,64,6,6}; edit_box edit1= {250,247,13,0xffffff,0x94AECE,0xD3DDEB,0xffffff,0,248,#edit_path,#mouse_dd,64,6,6};
@ -67,7 +71,6 @@ dword buf, off; //
#include "include\devices.h" #include "include\devices.h"
#include "include\history.h" #include "include\history.h"
void main() void main()
word key, id; word key, id;
mouse m; mouse m;
@ -188,12 +191,16 @@ int pressed_y;
Open_Dir(#path,1); Open_Dir(#path,1);
break; break;
case 30: //about case 30: //about
CreateThread(#authors,#stak); CreateThread(#about_dialog,#stak);
break; break;
case 77: //actions case 77:
IF (show_actions==1) show_actions=0; ELSE show_actions=1; IF (show_actions==1) show_actions=0; ELSE show_actions=1;
Actions(); Actions();
break; break;
case 78:
IF (show_dev_name==1) show_dev_name=0; ELSE show_dev_name=1;
DrawSystemDiscs();
break;
case 80: //rename case 80: //rename
goto REN_MARK; goto REN_MARK;
case 81: //Delete file case 81: //Delete file
@ -387,6 +394,8 @@ inline fastcall void draw_window()
DrawFlatButton(onLeft(95,0),40,68,16,33,0xE4DFE1,"Size"); DrawFlatButton(onLeft(95,0),40,68,16,33,0xE4DFE1,"Size");
//Ïåðåðèñîâûâàåì ñïèñîê //Ïåðåðèñîâûâàåì ñïèñîê
Open_Dir(#path,ONLY_SHOW); Open_Dir(#path,ONLY_SHOW);
//List_ReDraw();
//KEdit();
//ïðîêðóòêà //ïðîêðóòêà
DrawBar(onLeft(27,0),57,1,onTop(22,57),0x94AECE); //ëèíèÿ ñëåâà îò ïðîêðóòêè DrawBar(onLeft(27,0),57,1,onTop(22,57),0x94AECE); //ëèíèÿ ñëåâà îò ïðîêðóòêè
DrawFlatButton(onLeft(27,0),40,16,16,0,0xE4DFE1,"\x18"); //ïðîêðóòêà ââåðõ DrawFlatButton(onLeft(27,0),40,16,16,0,0xE4DFE1,"\x18"); //ïðîêðóòêà ââåðõ
@ -769,7 +778,7 @@ void Goto_edit_path()
{ {
IF (strcmp(#path,#edit_path)==0) return; //ïðîâåðêà íå â ýòîé ëè ìû ïàïêå IF (strcmp(#path,#edit_path)==0) return; //ïðîâåðêà íå â ýòîé ëè ìû ïàïêå
IF (strcmp(#edit_path+strlen(#edit_path)-1,"/")<>0) copystr("/",#edit_path+strlen(#edit_path)); //åñëè íåò, + "/" IF (strcmp(#edit_path+strlen(#edit_path)-1,"/")<>0) copystr("/",#edit_path+strlen(#edit_path)); //åñëè íåò, + "/"
Open_Dir(#edit_path,2); //проверяем если файлы в папке, так мы узнаём существует ли она Open_Dir(#edit_path,ONLY_OPEN); //ďđîâĺđ˙ĺě ĺńëč ôŕéëű â ďŕďęĺ, ňŕę ěű óçíŕ¸ě ńóůĺńňâóĺň ëč îíŕ
IF (count<1) KEdit(); ELSE //ïðîñòî î÷èùàåì ïîëîñó àäðåñà IF (count<1) KEdit(); ELSE //ïðîñòî î÷èùàåì ïîëîñó àäðåñà
{za_kadrom=curbtn=0; copystr(#edit_path,#path);}//íàâåðõ ñïèñêà {za_kadrom=curbtn=0; copystr(#edit_path,#path);}//íàâåðõ ñïèñêà
Open_Dir(#path,1); Open_Dir(#path,1);

View File

@ -1,3 +1,7 @@
13.05.12 -- v1.22 --16,5 Кб
- окно не залезает на панель задач при запуске на низких разрешениях;
- кнопка и параметр в ini-файле показывать названия устройст или нет.
05.04.12 -- v1.2 --16,5 Кб 05.04.12 -- v1.2 --16,5 Кб
- заработала кнопка "Вперёд", кошерный код работы с историей; - заработала кнопка "Вперёд", кошерный код работы с историей;
- парочка багфиксов в определении и выводе списка устройств. - парочка багфиксов в определении и выводе списка устройств.

View File

@ -3,10 +3,10 @@
#include "imgs\logo.txt" #include "imgs\logo.txt"
#define BROWSER_PATH "/sys/htmlv" #define BROWSER_PATH "/sys/htmlv"
#define BROWSER_LINK "http://www.kolibri-os.narod.ru" #define BROWSER_LINK "http://kolibri-os.narod.ru"
void authors() void about_dialog()
{ {
byte p; byte p;
mouse mm; mouse mm;
@ -37,11 +37,11 @@ void authors()
DefineAndDrawWindow(600,150,181,256,0x34,0x10EFEBEF,0,0,"About Eolite"); DefineAndDrawWindow(600,150,181,256,0x34,0x10EFEBEF,0,0,"About Eolite");
DrawBar(0,0,172,50,0x8494C4); //ãîëóáîå ñçàäè DrawBar(0,0,172,50,0x8494C4); //ãîëóáîå ñçàäè
PutPaletteImage(#logo,85,85,43,7,#logo_pal); PutPaletteImage(#logo,85,85,43,7,#logo_pal);
WriteText(54,100,0x80,0xBF40BF,"Eolite v1.2",0); WriteText(51,100,0x80,0xBF40BF,"Eolite v1.22",0);
WriteText(55,120,0x80,0,"Developers:",0); WriteText(55,120,0x80,0,"Developers:",0);
WriteText(39,130,0x80,0,"Leency & Veliant",0); WriteText(39,130,0x80,0,"Leency & Veliant",0);
WriteText(45,140,0x80,0,"KolibriOS Team",0); WriteText(45,140,0x80,0,"KolibriOS Team",0);
WriteText(55,150,0x80,0," 2008-2012 ",0); WriteText(61,150,0x80,0,"2008-2012",0);
WriteText(12,170,0x80,0,"Visit",0); WriteText(12,170,0x80,0,"Visit",0);
DrawLink(48,170,23, "kolibri-os.narod.ru"); //ññûëêa DrawLink(48,170,23, "kolibri-os.narod.ru"); //ññûëêa
DrawFlatButton(85,190,70,22,0,0xE4DFE1, "Close"); DrawFlatButton(85,190,70,22,0,0xE4DFE1, "Close");

View File

@ -1,9 +1,5 @@
//03.04.2012 //03.04.2012
path_string disk_list[20];
int disc_num;
void GetSystemDiscs() void GetSystemDiscs()
{ {
char dev_name[10], sys_discs[10]; char dev_name[10], sys_discs[10];
@ -46,7 +42,8 @@ void DrawSystemDiscs()
DrawBar(2,56,15,onTop(21,41),0x00699C); //ñèíèé ïðÿìîóãîëüíèê - ñëåâà DrawBar(2,56,15,onTop(21,41),0x00699C); //ñèíèé ïðÿìîóãîëüíèê - ñëåâà
DrawBar(177,56,15,onTop(21,41),0x00699C); //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà DrawBar(177,56,15,onTop(21,41),0x00699C); //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà
//ñïèñîê äèñêîâ //ñïèñîê äèñêîâ
Tip(56, "Devices", 0, ""); if (show_dev_name) Tip(56, "Devices", 78, "=");
else Tip(56, "Devices", 78, "-");
for (i=0;i<disc_num;i++) for (i=0;i<disc_num;i++)
{ {
DrawBar(17,i*16+74,160,17,0xFFFFFF); //áåëîå DrawBar(17,i*16+74,160,17,0xFFFFFF); //áåëîå
@ -61,7 +58,8 @@ void DrawSystemDiscs()
IF (dev_name[1]=='h') || (dev_name[1]=='b') copystr("Hard disk ",#disc_name); IF (dev_name[1]=='h') || (dev_name[1]=='b') copystr("Hard disk ",#disc_name);
copystr(#dev_name,#disc_name+strlen(#disc_name)); copystr(#dev_name,#disc_name+strlen(#disc_name));
// //
WriteText(45,i*16+79,0x80,0,#disc_name,0); if (show_dev_name) WriteText(45,i*16+79,0x80,0,#disc_name,0);
else WriteText(45,i*16+79,0x80,0,#dev_name,0);
PutImage(dev_icon*14*13*3+#devices,14,13,21,i*16+76); PutImage(dev_icon*14*13*3+#devices,14,13,21,i*16+76);
} }
} }

View File

@ -8,7 +8,6 @@
char NOTIFY_PATH[7]="@notify"; char NOTIFY_PATH[7]="@notify";
void GetIni(byte onload) void GetIni(byte onload)
{ {
byte section[32]='', parametr[32]='', option[256]='', InfType=0; byte section[32]='', parametr[32]='', option[256]='', InfType=0;
@ -49,8 +48,15 @@ void GetIni(byte onload)
case 0x0a: case 0x0a:
case 0x0d: case 0x0d:
InfType=PARAM; InfType=PARAM;
IF (strcmp(#parametr,"SelectionColor")==0) videlenie=StrToCol(#option); IF (!strcmp(#parametr,"SelectionColor")) videlenie=StrToCol(#option);
IF (strcmp(#parametr,"LineHeight")==0) BUTTON_HEIGHT=StrToInt(#option); IF (!strcmp(#parametr,"LineHeight")) BUTTON_HEIGHT=StrToInt(#option);
IF (!strcmp(#parametr,"ShowDeviceName")) show_dev_name=StrToInt(#option);
/*if (!strcmp(#section,"UserDirectories")) && (parametr) && (onload)
{
copystr(#parametr, #disk_list[disc_num].Item);
disc_num++;
}*/
IF (parametr) && (!strcmp(#file_name+find_symbol(#file_name,'.'),#parametr)) { IF (parametr) && (!strcmp(#file_name+find_symbol(#file_name,'.'),#parametr)) {
errornum=RunProgram(#option,#file_path); errornum=RunProgram(#option,#file_path);