Eolite 1.96: Additional /kolibrios/ system directory support

git-svn-id: svn://kolibrios.org@3956 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2013-09-30 20:44:45 +00:00
parent 0a96bce15b
commit 74c3100ca7
2 changed files with 15 additions and 5 deletions

View File

@ -73,8 +73,8 @@
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
#define TITLE "Eolite File Manager v1.95" #define TITLE "Eolite File Manager v1.96"
#define ABOUT_TITLE "Eolite v1.95" #define ABOUT_TITLE "Eolite v1.96"
dword col_work = 0xE4DFE1; dword col_work = 0xE4DFE1;
dword col_border = 0x9098B0; //A0A0B8; //0x819FC5; dword col_border = 0x9098B0; //A0A0B8; //0x819FC5;
dword col_padding = 0xC8C9C9; dword col_padding = 0xC8C9C9;

View File

@ -50,11 +50,12 @@ path_string disk_list[30];
int disc_num; int disc_num;
dword devbuf; dword devbuf;
void SystemDiscsGet() void SystemDiscsGet()
{ {
unsigned char dev_name[10], sys_discs[10]; unsigned char dev_name[10], sys_discs[10];
unsigned int i1, j1, dev_num, dev_disc_num; unsigned int i1, j1, dev_num, dev_disc_num;
unsigned int nullbuf;
disc_num=0; disc_num=0;
if (devbuf) free(devbuf); if (devbuf) free(devbuf);
devbuf = malloc(10000); //áóôåð ãäå-òî íà 10 äåâàéñîâ â ëåâîé ïàíåëè devbuf = malloc(10000); //áóôåð ãäå-òî íà 10 äåâàéñîâ â ëåâîé ïàíåëè
@ -76,13 +77,18 @@ void SystemDiscsGet()
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 (GetDir(nullbuf, nullbuf, "/kolibrios/", DIRS_ALL)==0)
{
strcpy(#disk_list[disc_num].Item, "/kolibrios/");
disc_num++;
}
} }
} }
void SystemDiscsDraw() void SystemDiscsDraw()
{ {
char dev_name[10], disc_name[100]; char dev_name[15], disc_name[100];
int i, dev_icon; int i, dev_icon;
Tip(56, T_DEVICES, 55, "="); Tip(56, T_DEVICES, 55, "=");
@ -95,9 +101,13 @@ void SystemDiscsDraw()
dev_name[strlen(#dev_name)-1]=NULL; dev_name[strlen(#dev_name)-1]=NULL;
switch(dev_name[1]) switch(dev_name[1])
{ {
case 'k':
dev_icon=0;
strcpy(#disc_name, "Programs ");
break;
case 'r': case 'r':
dev_icon=0; dev_icon=0;
strcpy(#disc_name, "SYS disk "); strcpy(#disc_name, "System ");
break; break;
case 'c': case 'c':
dev_icon=1; dev_icon=1;