Eolite 2.44: minor fixes, optimizations

git-svn-id: svn://kolibrios.org@5401 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-02-13 22:54:42 +00:00
parent 57b0039570
commit 53bb7383fd
4 changed files with 12 additions and 49 deletions

View File

@ -1,4 +1,4 @@
//Leency & Veliant 2008-2014 //Leency & Veliant 2008-2015
//GNU GPL licence. //GNU GPL licence.
#ifndef AUTOBUILD #ifndef AUTOBUILD
@ -83,8 +83,8 @@
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
#define TITLE "Eolite File Manager v2.43" #define TITLE "Eolite File Manager v2.44"
#define ABOUT_TITLE "Eolite v2.43" #define ABOUT_TITLE "Eolite v2.44"
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};
@ -107,7 +107,6 @@ byte
rename_active=0, rename_active=0,
del_active=0, del_active=0,
show_dev_name=1, show_dev_name=1,
drw_ram_disk_space=0,
real_files_names_case=0, real_files_names_case=0,
sort_num=2, sort_num=2,
itdir; itdir;
@ -143,7 +142,7 @@ void SetAppColors()
sc.work_graph = 0x9098B0; //A0A0B8; //0x819FC5; sc.work_graph = 0x9098B0; //A0A0B8; //0x819FC5;
sc.work_button_text = 0x000000; sc.work_button_text = 0x000000;
col_padding = 0xC8C9C9; col_padding = 0xC8C9C9;
col_selec = 0x94AECE; //col_selec = 0x94AECE;
col_lpanel = 0x00699C; col_lpanel = 0x00699C;
/* /*
sc.get(); sc.get();
@ -670,7 +669,6 @@ void Open_Dir(dword dir_path, redraw){
maxcount = sizeof(file_mas)/sizeof(dword)-1; maxcount = sizeof(file_mas)/sizeof(dword)-1;
if (files.count>maxcount) files.count = maxcount; if (files.count>maxcount) files.count = maxcount;
if (files.count>0) && (files.current==-1) files.current=0; if (files.count>0) && (files.current==-1) files.current=0;
if (drw_ram_disk_space) DrawRamDiskSpace();
} }
if (files.count!=-1) if (files.count!=-1)
{ {
@ -896,7 +894,7 @@ void Open()
if (!files.count) return; if (!files.count) return;
if (!itdir) if (!itdir)
{ {
RunProgram("/sys/@open", #file_path); if (strrchr(#file_name, '.')==0) RunProgram(#file_path, ""); else RunProgram("/sys/@open", #file_path);
} }
else else
{ {

View File

@ -58,7 +58,7 @@ void about_dialog()
#endif #endif
WriteText(39,130,0x80,0,"Leency & Veliant"); WriteText(39,130,0x80,0,"Leency & Veliant");
WriteText(45,140,0x80,0,"KolibriOS Team"); WriteText(45,140,0x80,0,"KolibriOS Team");
WriteText(61,150,0x80,0,"2008-2014"); WriteText(61,150,0x80,0,"2008-2015");
#ifdef LANG_RUS #ifdef LANG_RUS
WriteText(19,170,0x80,0,INTRO_TEXT_3); WriteText(19,170,0x80,0,INTRO_TEXT_3);
#else #else

View File

@ -1,34 +1,18 @@
//INI parser in C--, GPL licence. //INI parser in C--, GPL licence.
//Leency - 2012 //Leency - 2012
#define COMMENT 0
#define SECTION 1
#define PARAM 2
#define OPTION 3
void GetIni(byte onload) void GetIni(byte onload)
{ {
byte section[32], parametr[32], option[256], InfType=0; dword eolite_ini_path = abspath("Eolite.ini");
char bukva[2]; ini_get_color stdcall (eolite_ini_path, "Config", "SelectionColor", 0x94AECE);
int errornum, tj;
static dword buff, fsize;
if (onload==1)
{
free(buff);
if (!GetFile(#buff, #fsize, abspath("Eolite.ini"))) notify("Eolite.ini not found. Defaults will be used.");
}
ini_get_color stdcall (abspath("Eolite.ini"), "Config", "SelectionColor", 0x94AECE);
edit2.shift_color = EAX; edit2.shift_color = EAX;
ini_get_int stdcall (abspath("Eolite.ini"), "Config", "LineHeight", 18); col_selec = EAX;
ini_get_int stdcall (eolite_ini_path, "Config", "LineHeight", 18);
files.line_h = EAX; files.line_h = EAX;
ini_get_int stdcall (abspath("Eolite.ini"), "Config", "ShowDeviceName", 1); ini_get_int stdcall (eolite_ini_path, "Config", "ShowDeviceName", 1);
show_dev_name = EAX; show_dev_name = EAX;
ini_get_int stdcall (abspath("Eolite.ini"), "Config", "RealFileNamesCase", 0); ini_get_int stdcall (eolite_ini_path, "Config", "RealFileNamesCase", 0);
real_files_names_case = EAX; real_files_names_case = EAX;
ini_get_int stdcall (abspath("Eolite.ini"), "Config", "DrwRamDiskSpace", 0);
drw_ram_disk_space = EAX;
} }
@ -44,20 +28,3 @@ void Write_Error(int error_number)
strcat(#error_message, "\" -tE"); strcat(#error_message, "\" -tE");
notify(#error_message); notify(#error_message);
} }
dword StrToCol(char* htmlcolor)
{
dword j, color=0;
char ch=0x00;
FOR (j=0; j<6; j++)
{
ch=ESBYTE[htmlcolor+j];
IF ((ch>='0') && (ch<='9')) ch -= '0';
IF ((ch>='A') && (ch<='F')) ch -= 'A'-10;
IF ((ch>='a') && (ch<='f')) ch -= 'a'-10;
color = color*0x10 + ch;
}
return color;
}

View File

@ -120,8 +120,6 @@ void SystemDiscsDraw()
case 'r': case 'r':
dev_icon=0; dev_icon=0;
strcpy(#disc_name, "System "); strcpy(#disc_name, "System ");
if (drw_ram_disk_space)
DrawRamDiskSpace();
break; break;
case 'c': case 'c':
dev_icon=1; dev_icon=1;