eolite: update

git-svn-id: svn://kolibrios.org@8779 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2021-06-07 20:03:19 +00:00
parent e07b65f95a
commit 95f1cee2c6
6 changed files with 40 additions and 25 deletions

Binary file not shown.

View File

@ -3,8 +3,8 @@
// 70.5 - get volume info and label
#define TITLE "Eolite File Manager 4.61"
#define ABOUT_TITLE "EOLITE 4.61"
#define TITLE "Eolite File Manager 4.65"
#define ABOUT_TITLE "EOLITE 4.65"
#ifndef AUTOBUILD
#include "lang.h--"
@ -167,12 +167,14 @@ void handle_param()
//-d <path> : delete file/folder
//-v : paste files/folder from clipboard
dword p = #param;
if (param[0]=='/') && (param[1]=='E') && (param[2]=='F') && (param[3]=='M') {
if (param[0]=='\\') && (param[1]=='E') && (param[2]=='F') && (param[3]=='M') {
efm = true;
p += 4;
if (param[4]==' ') p++;
}
LoadIniSettings();
if (ESBYTE[p]=='\0') return;
if (ESBYTE[p]=='-') switch (ESBYTE[p+1])
@ -198,7 +200,9 @@ void handle_param()
ExitProcess();
}
if (ESBYTE[strlen(p)+p-1]=='/') ESBYTE[strlen(p)+p-1]=NULL; //no "/" at the end
ESBYTE[0] = NULL;
if (param[strlen(#param)-1]=='/') ESBYTE[strlen(#param)-1]=NULL; //no "/" at the end
if (dir_exists(p)) {
strcpy(#path, p);
@ -206,7 +210,7 @@ void handle_param()
if (file_exists(p)) {
ESBYTE[strrchr(p, '/')+p-1] = '\0';
strcpy(#path, p);
SelectFileByName(p+strlen(p)+1);
SelectFileByName(p+strlen(#path)+1);
} else {
notify(T_NOTIFY_APP_PARAM_WRONG);
}
@ -222,11 +226,8 @@ void main()
SetAppColors();
handle_param();
ESBYTE[0] = NULL;
rand_n = random(80);
LoadIniSettings();
SystemDiscs.Get();
Open_Dir(#path,ONLY_OPEN);
@ -659,7 +660,7 @@ void DrawFilePanels()
}
else
{
SystemDiscs.Get();
//SystemDiscs.Get();
llist_copy(#files, #files_inactive);
strcpy(#path, #inactive_path);
col.selec = col.selec_inactive;
@ -702,6 +703,7 @@ void List_ReDraw()
int all_lines_h;
dword j;
static int old_cur_y, old_first;
dword separator_color;
files.CheckDoesValuesOkey(); //prevent some shit
@ -729,8 +731,9 @@ void List_ReDraw()
//in the bottom
all_lines_h = j * files.item_h;
DrawBar(files.x,all_lines_h + files.y,files.w,files.h - all_lines_h, col.list_bg);
DrawBar(files.x+files.w-141,all_lines_h + files.y,1,files.h - all_lines_h,col.list_vert_line);
DrawBar(files.x+files.w-68,all_lines_h + files.y,1,files.h - all_lines_h,col.list_vert_line);
if (colored_lines.checked) separator_color = col.list_bg; else separator_color = col.list_vert_line;
DrawBar(files.x+files.w-141,all_lines_h + files.y,1,files.h - all_lines_h, separator_color);
DrawBar(files.x+files.w-68,all_lines_h + files.y,1,files.h - all_lines_h, separator_color);
Scroll();
if (del_active) Del_Form();
@ -764,13 +767,22 @@ void Line_ReDraw(dword bgcol, filenum){
icon_y = files.item_h-icon_size/2+y;
BDVK file;
char full_path[4096];
dword separator_color;
char label_file_name[4096];
if (filenum==-1) return;
DrawBar(files.x,y,4,files.item_h,bgcol);
DrawBar(files.x+4,y,icon_size,icon_y-y,bgcol);
if (files.item_h>icon_size) DrawBar(files.x+4,icon_y+icon_size-1,icon_size,y+files.item_h-icon_y-icon_size+1,bgcol);
if (colored_lines.checked) && (bgcol!=col.selec) && (filenum%2) bgcol=col.odd_line;
if (colored_lines.checked) {
if (bgcol!=col.selec) && (filenum%2) bgcol=col.odd_line;
separator_color = bgcol;
} else {
separator_color = col.list_vert_line;
}
DrawBar(files.x+icon_size+4,y,files.w-icon_size-4,files.item_h,bgcol);
DrawBar(files.x+files.w-141,y,1,files.item_h, separator_color);
DrawBar(files.x+files.w-68,y,1,files.item_h, separator_color);
file_offet = items.get(filenum+files.first)*304 + buf+32;
attr = ESDWORD[file_offet];
@ -797,7 +809,6 @@ void Line_ReDraw(dword bgcol, filenum){
}
if (file_size) WriteText(7-strlen(file_size)*6+files.x+files.w-58,
files.text_y+y+1, files.font_type, col.list_gb_text, file_size);
DrawIconByExtension(#full_path, ext1, files.x+4, icon_y, bgcol);
if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=col.list_text_hidden; //system or hiden?
if (bgcol==col.selec)
@ -838,8 +849,8 @@ void Line_ReDraw(dword bgcol, filenum){
kfont.WriteIntoWindow(files.x + icon_size+7, files.item_h - kfont.height / 2 + y,
bgcol, text_col, kfont.size.pt, #label_file_name);
}
DrawBar(files.x+files.w-141,y,1,files.item_h,col.list_vert_line); //gray line 1
DrawBar(files.x+files.w-68,y,1,files.item_h,col.list_vert_line); //gray line 2
if (bgcol == col.selec_inactive) DrawWideRectangle(files.x+2, y, files.w-4, files.item_h, 2, 0x92B1D9);
DrawIconByExtension(#full_path, ext1, files.x+4, icon_y, bgcol);
}
@ -1137,9 +1148,7 @@ void FnProcess(byte N)
if (two_panels.checked)
{
DrawFilePanels();
}
else
{
} else {
Tip(56, T_DEVICES, 55, "-");
Open_Dir(#path,WITH_REDRAW);
pause(10);

View File

@ -2,7 +2,7 @@
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
void DrawPathBar()
{
PathShow.start_x = -efm*20 + 250;
PathShow.start_x = -efm*22 + 250;
PathShow.area_size_x = Form.cwidth-300;
DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line);

View File

@ -131,8 +131,8 @@ void _SystemDiscs::Draw()
for (i=0; i<30; i++) DeleteButton(100+i);
if ( two_panels.checked) { draw_y = 41; draw_x = 2; }
if (!two_panels.checked) { draw_y = 74; draw_x = 17; }
if (two_panels.checked) { draw_y = 41; draw_x = 2; }
else { draw_y = 74; draw_x = 17; }
for (i=0;i<list.count;i++)
{

View File

@ -155,7 +155,7 @@ void LoadIniSettings()
show_status_bar.checked = ini.GetInt("ShowStatusBar", true);
big_icons.checked = ini.GetInt("BigIcons", false); BigIconsSwitch();
//two_panels.checked = ini.GetInt("TwoPanels", false);
colored_lines.checked = ini.GetInt("ColoredLines", false);
colored_lines.checked = ini.GetInt("ColoredLines", efm);
kfont.size.pt = ini.GetInt("FontSize", 13);
files.item_h = ini.GetInt("LineHeight", 19);
Form.left = ini.GetInt("WinX", 100);
@ -255,10 +255,10 @@ void SetAppColors()
col.list_text_hidden = 0xA6A6B7;
col.list_vert_line = 0xDDD7CF;
col.lpanel = 0x00699C;
col.selec = col.selec_active = 0x94AECE;
col.selec = col.selec_active = 0x92B1D9;
col.selec_text = 0x000000;
col.slider_bg_big = 0xCDCFCF;
col.odd_line = 0xF1F1F1;
col.odd_line = 0xF4F5F5;
for (i=0; blue_hl_pal[i]!=0; i++) waves_pal[i] = blue_hl_pal[i];
}
col.selec_inactive = MixColors(0xBBBbbb, col.list_bg, 65);

View File

@ -37,14 +37,20 @@ signed SelectList_ProcessMouse()
{
select_list.first = scroll1.position;
SelectList_Draw();
return true;
}
if (mouse.vert) && (select_list.MouseScroll(mouse.vert)) SelectList_Draw();
if (mouse.vert) && (select_list.MouseScroll(mouse.vert)) {
SelectList_Draw();
return true;
}
if (mouse.up) && (mouse.lkm)
if (select_list.ProcessMouse(mouse.x, mouse.y)) {
SelectList_LineChanged();
return true;
}
return false;
}
void SelectList_DrawBorder() {