Eolite 2.38: bug fixes

git-svn-id: svn://kolibrios.org@5150 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2014-10-30 23:20:36 +00:00
parent 21d93b27cd
commit 1ed578cbee
2 changed files with 15 additions and 14 deletions

View File

@ -1,4 +1,4 @@
//Leency & Veliant 2008-2013 //Leency & Veliant 2008-2014
//GNU GPL licence. //GNU GPL licence.
#ifndef AUTOBUILD #ifndef AUTOBUILD
@ -82,12 +82,12 @@
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
#define TITLE "Eolite File Manager v2.36" #define TITLE "Eolite File Manager v2.38"
#define ABOUT_TITLE "Eolite v2.36" #define ABOUT_TITLE "Eolite v2.38"
dword col_padding, col_selec, col_lpanel; dword col_padding, col_selec, col_lpanel;
int toolbar_buttons_x[7]={9,46,85,134,167,203}; int toolbar_buttons_x[7]={9,46,85,134,167,203};
char tmp_disk_del_param[3]="d0"; char tmp_disk_del_param[]="d0";
struct path_string { char Item[4096]; }; struct path_string { char Item[4096]; };
byte active_about=0; byte active_about=0;
@ -341,12 +341,13 @@ void main()
DrawRectangle(17,id-100*16+74,159,16, 0xFFFFFF); DrawRectangle(17,id-100*16+74,159,16, 0xFFFFFF);
break; break;
case 130...160: case 130...160:
tmp_disk_del_param[1]=disk_list[id-130].Item[4]; tmp_disk_del_param[1] = id - 130 + 48;
RunProgram("/sys/tmpdisk", #tmp_disk_del_param); RunProgram("/sys/tmpdisk", #tmp_disk_del_param);
pause(10); pause(10);
SystemDiscsGet(); SystemDiscsGet();
Open_Dir(#path,WITH_REDRAW); Open_Dir(#path,WITH_REDRAW);
DrawLeftPanel(); DrawLeftPanel();
//m.get();
break; break;
} }
break; break;

View File

@ -49,9 +49,9 @@ dword devbuf;
void SystemDiscsGet() void SystemDiscsGet()
{ {
unsigned char dev_name[10], sys_discs[10]; char dev_name[10], sys_discs[10];
unsigned int i1, j1, dev_num, dev_disc_num; int i1, j1, dev_num, dev_disc_num;
unsigned int nullbuf; int nullbuf[32];
disc_num=0; disc_num=0;
if (devbuf) free(devbuf); if (devbuf) free(devbuf);
devbuf = malloc(10000); //áóôåð ãäå-òî íà 10 äåâàéñîâ â ëåâîé ïàíåëè devbuf = malloc(10000); //áóôåð ãäå-òî íà 10 äåâàéñîâ â ëåâîé ïàíåëè
@ -59,7 +59,7 @@ void SystemDiscsGet()
dev_num = EBX; dev_num = EBX;
for (i1=0; i1<dev_num; i1++) for (i1=0; i1<dev_num; i1++)
{ {
strcpy(#dev_name, "/"); // / strcpy(#dev_name, "/"); // /
strcat(#dev_name, i1*304+ devbuf+72); // /rd strcat(#dev_name, i1*304+ devbuf+72); // /rd
strcat(#dev_name, "/"); // /rd/ strcat(#dev_name, "/"); // /rd/
Open_Dir(#dev_name, ONLY_OPEN); Open_Dir(#dev_name, ONLY_OPEN);
@ -67,15 +67,15 @@ void SystemDiscsGet()
//if (files.count<=0) copystr(#dev_name,#disk_list[disc_num].Item); else //if (files.count<=0) copystr(#dev_name,#disk_list[disc_num].Item); else
for (j1=0; j1<dev_disc_num; j1++;) for (j1=0; j1<dev_disc_num; j1++;)
{ {
strcpy(#sys_discs, #dev_name); // /rd/ strcpy(#sys_discs, #dev_name); // /rd/
strcat(#sys_discs, j1*304+ buf+72); // /rd/1 strcat(#sys_discs, j1*304+ buf+72); // /rd/1
strcat(#sys_discs, "/"); // /rd/1/ strcat(#sys_discs, "/"); // /rd/1/
strcpy(#disk_list[disc_num].Item, #sys_discs); strcpy(#disk_list[disc_num].Item, #sys_discs);
disc_num++; disc_num++;
} }
if (strcmp(#disk_list[disc_num-1].Item, "/rd/1/")==0) if (strcmp(#sys_discs, "/rd/1/")==0)
{ {
if (GetDir(nullbuf, nullbuf, "/kolibrios/", DIRS_ALL)==0) if (GetDir(#nullbuf, #nullbuf, "/kolibrios/", DIRS_ALL)==0)
{ {
strcpy(#disk_list[disc_num].Item, "/kolibrios/"); strcpy(#disk_list[disc_num].Item, "/kolibrios/");
kolibrios_drive = true; kolibrios_drive = true;
@ -146,8 +146,8 @@ void SystemDiscsDraw()
break; break;
case 't': case 't':
dev_icon=4; dev_icon=4;
strcpy(#disc_name, "RAM disk "); strcpy(#disc_name, "RAM disk ");
DefineButton(17+143,i*16+74,16,16,i+130+BT_HIDE+BT_NOFRAME,0xFFFFFF); DefineButton(17+143,i*16+74,16,16,dev_name[4]+130-48+BT_HIDE+BT_NOFRAME,0xFFFFFF);
WriteText(45+121,i*16+79,0x80,0xD63535,"-"); WriteText(45+121,i*16+79,0x80,0xD63535,"-");
WriteText(45+121,i*16+79+1,0x80,0xBC2424,"-"); WriteText(45+121,i*16+79+1,0x80,0xBC2424,"-");
break; break;