forked from KolibriOS/kolibrios
Eolite 1.15 unstable
git-svn-id: svn://kolibrios.org@2587 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
9b04adedbd
commit
f711bf30d9
@ -1,6 +1,8 @@
|
||||
//Leency & Veliant -=- KolibriOS Team -=- 2012
|
||||
//GNU GPL licence.
|
||||
|
||||
//êîïèðîâàòü ÷åðåç ïîòîê
|
||||
|
||||
#include "lib\kolibri.h"
|
||||
#include "lib\memory.h"
|
||||
#include "lib\edit_box_lib.h"
|
||||
@ -16,7 +18,7 @@ int BUTTON_HEIGHT=18;
|
||||
#define ONLY_OPEN 2
|
||||
|
||||
//ïåðåìåííûå
|
||||
#define title "Eolite File Manager v1.11"
|
||||
#define title "Eolite File Manager v1.15"
|
||||
dword videlenie=0x94AECE; //öâåò âûäåëåííîãî ýëåìåíòà èç ñïèñêà ôàéëîâ
|
||||
//
|
||||
int but_num,
|
||||
@ -43,6 +45,10 @@ int toolbar_buttons_x[6]={9,46,85,134,167,203};
|
||||
dword file_mas[6898];
|
||||
int j, i, mouse_dd;
|
||||
|
||||
struct path_string {
|
||||
char Item[4096];
|
||||
};
|
||||
|
||||
dword stak[100]; //îêíî About
|
||||
|
||||
edit_box edit1= {250,247,13,0xffffff,0x94AECE,0xD3DDEB,0xffffff,0,248,#edit_path,#mouse_dd,64,6,6};
|
||||
@ -57,6 +63,7 @@ dword buf, off; //
|
||||
#include "include\icons_f.h"
|
||||
#include "include\ini.h"
|
||||
#include "include\devices.h"
|
||||
#include "include\history.h"
|
||||
|
||||
|
||||
void main()
|
||||
@ -84,7 +91,7 @@ int pressed_y;
|
||||
{
|
||||
switch(WaitEvent())
|
||||
{
|
||||
CASE evMouse:
|
||||
case evMouse:
|
||||
IF (del_active==1) break;
|
||||
|
||||
id=GetSlot(Form.ID);
|
||||
@ -152,23 +159,26 @@ int pressed_y;
|
||||
IF (del_active==1) {IF (id==301) || (id==302) Del_File(302-id); break;}
|
||||
switch(id)
|
||||
{
|
||||
CASE 21: //Íàçàä
|
||||
case 21: //Back
|
||||
GoBack();
|
||||
break;
|
||||
CASE 23: //up!
|
||||
case 22: //Forvard
|
||||
HistoryPath(go_forvard);
|
||||
break;
|
||||
case 23: //up!
|
||||
IF (strcmp(#path,"/")<>0) Dir_Up();
|
||||
break;
|
||||
CASE 24: //cut
|
||||
case 24: //cut
|
||||
key=24;
|
||||
CASE 25: //copy
|
||||
case 25: //copy
|
||||
goto CTRLC_MARK;
|
||||
CASE 26: //paste
|
||||
case 26: //paste
|
||||
Paste();
|
||||
break;
|
||||
CASE 27: //goto edit_path
|
||||
case 27: //goto edit_path
|
||||
Goto_edit_path();
|
||||
break;
|
||||
CASE 31...33: //sort
|
||||
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);
|
||||
@ -787,12 +797,10 @@ void Dir_Up()
|
||||
|
||||
inline fastcall void GoBack() //âíà÷àëå óäàëÿåì òåêóùèé ïóòü, à ïîòîì êîïèðóåì òî, ÷òî îñòàëîñü
|
||||
{
|
||||
i=strlen(#PathHistory)-1;
|
||||
IF (i<7) RETURN;
|
||||
PathHistory[i]=0x00;
|
||||
copystr(#PathHistory+find_symbol(#PathHistory,'/'),#temp); //ïàïêà â êîòîðîé áûëè
|
||||
char cur_folder[4096];
|
||||
copystr(GetCurrentFolder(), #cur_folder);
|
||||
HistoryPath(go_back);
|
||||
SelectFile(#temp);
|
||||
SelectFile(#cur_folder);
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ void authors()
|
||||
DefineAndDrawWindow(600,150,181,256,0x34,0x10EFEBEF,0,0,"About Eolite");
|
||||
DrawBar(0,0,172,50,0x8494C4); //ãîëóáîå ñçàäè
|
||||
PutPaletteImage(#logo,85,85,43,7,#logo_pal);
|
||||
WriteText(54-3,100,0x80,0xBF40BF,"Eolite v1.11",0);
|
||||
WriteText(54-3,100,0x80,0xBF40BF,"Eolite v1.15",0);
|
||||
WriteText(55,120,0x80,0,"Developers:",0);
|
||||
WriteText(39,130,0x80,0,"Leency & Veliant",0);
|
||||
WriteText(30,140,0x80,0,"Diamond, Lrz, Nable",0);
|
||||
|
@ -1,10 +1,6 @@
|
||||
//03.04.2012
|
||||
|
||||
struct string {
|
||||
char Item[4096];
|
||||
};
|
||||
|
||||
string disk_list[20];
|
||||
path_string disk_list[20];
|
||||
int disc_num;
|
||||
|
||||
|
||||
@ -25,6 +21,7 @@ void GetSystemDiscs()
|
||||
|
||||
Open_Dir(#dev_name, ONLY_OPEN);
|
||||
dev_disc_num = count;
|
||||
//if (count<=0) copystr(#dev_name,#disk_list[disc_num].Item); else
|
||||
for (j1=0; j1<dev_disc_num; j1++;)
|
||||
{
|
||||
copystr(#dev_name, #sys_discs); // /rd/
|
||||
@ -41,7 +38,7 @@ void GetSystemDiscs()
|
||||
void DrawSystemDiscs()
|
||||
{
|
||||
byte disc_icon;
|
||||
char dev_name[6];
|
||||
char dev_name[10];
|
||||
char disc_name[100];
|
||||
int i, dev_icon;
|
||||
|
||||
@ -49,19 +46,18 @@ void DrawSystemDiscs()
|
||||
DrawBar(2,56,15,onTop(21,41),0x00699C); //ñèíèé ïðÿìîóãîëüíèê - ñëåâà
|
||||
DrawBar(177,56,15,onTop(21,41),0x00699C); //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà
|
||||
//ñïèñîê äèñêîâ
|
||||
Tip(56, "Disks", 0, "");
|
||||
Tip(56, "Devices", 0, "");
|
||||
for (i=0;i<disc_num;i++)
|
||||
{
|
||||
DrawBar(17,i*16+74,160,17,0xFFFFFF); //áåëîå
|
||||
DefineButton(17,i*16+74,159,16,100+i+BT_HIDE,0xFFFFFF); //ñîçäà¸ì êíîïêè, à ïîòîì âûâîäèì íàçâàíèÿ äèñêîâ
|
||||
copystr("Unknown drive",#disc_name); //èçíà÷àëüíî íåèçâåñíûé íîñèòåëü
|
||||
copystr("Unknown ",#disc_name); //èçíà÷àëüíî íåèçâåñíûé íîñèòåëü
|
||||
dev_icon=3; //ïî-óìîë÷àíèþ óñòðîéñòâî âûãëÿäèò êàê æåñòÿê
|
||||
copystr(#disk_list[i].Item, #dev_name);
|
||||
IF (dev_name[1]=='r') { dev_icon=0; copystr("RAM disk ",#disc_name); }
|
||||
IF (dev_name[1]=='c') { dev_icon=1; copystr("CD-ROM ",#disc_name); }
|
||||
IF (dev_name[1]=='f') { dev_icon=2; copystr("Floppy disk ",#disc_name); }
|
||||
IF (dev_name[1]=='h') || (dev_name[1]=='b') copystr("Hard disk ",#disc_name);
|
||||
//IF (dev_name[1]=='b') copystr("SATA disk ",#disc_name);
|
||||
copystr(#dev_name,#disc_name+strlen(#disc_name));
|
||||
//
|
||||
WriteText(45,i*16+79,0x80,0,#disc_name,0);
|
||||
|
@ -1,32 +1,5 @@
|
||||
//Leency - 2012
|
||||
|
||||
#define add_new_path 1
|
||||
#define go_back 2
|
||||
|
||||
void HistoryPath(byte action)
|
||||
{
|
||||
if (action==add_new_path)
|
||||
{
|
||||
IF (strcmp(#PathHistory+find_symbol(#PathHistory,'|'),#path)==0) return;
|
||||
IF (strlen(#PathHistory)+strlen(#path)>2560)
|
||||
{
|
||||
copystr(#PathHistory+1024,#PathHistory);
|
||||
copystr("/",#PathHistory+strlen(#PathHistory));
|
||||
}
|
||||
copystr("|",#PathHistory+strlen(#PathHistory));
|
||||
copystr(#path,#PathHistory+strlen(#PathHistory));
|
||||
}
|
||||
if (action==go_back)
|
||||
{
|
||||
i=strlen(#PathHistory)-1;
|
||||
WHILE (PathHistory[i]<>'|') { i--; };
|
||||
IF (i>0) PathHistory[i]=0x00;
|
||||
WHILE (PathHistory[i]<>'|') { copystr(#PathHistory[i],#path); i--; }
|
||||
IF (i>0) PathHistory[i]=0x00;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dword onLeft(dword right,left) {EAX=Form.width-right-left;}
|
||||
dword onTop(dword down,up) {EAX=Form.height-GetSkinWidth()-down-up;}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user