FKM2 (Eolite 5 beta): a new two panes mode

git-svn-id: svn://kolibrios.org@8854 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2021-06-14 23:33:54 +00:00
parent bb6094a24f
commit 0cb57998a6
21 changed files with 252 additions and 136 deletions

View File

@ -27,7 +27,7 @@ img_files = {
{"NOTIFY3.PNG", "common/notify3.png"},
{"UNIMG", PROGS .. "/fs/unimg/unimg"},
{"3D/HOUSE.3DS", "common/3d/house.3ds"},
{"File Managers/EFM", "common/File Managers/efm"},
{"File Managers/KFM2", "common/File Managers/kfm2"},
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
{"File Managers/FNAV/ABOUT.TXT", "common/File Managers/fNav/About.txt"},

View File

@ -5,8 +5,8 @@ Background=/sys/media/palitra
Device setup=setup
Shell=shell
[00]
name=KFM
path=/SYS/FILE MANAGERS/KFM
name=KFM2
path=/SYS/FILE MANAGERS/KFM2
param=
ico=3
x=0

View File

@ -85,7 +85,7 @@ Informaci
#10 **** ARCHIUS ****
KFAR /sys/File Managers/kfar
fNav /sys/File Managers/fNav/fNav
KFM /sys/File Managers/kfm
KFM2 /sys/File Managers/kfm2
Eolite /sys/File Managers/Eolite
Virtual disks /sys/tmpdisk
SHELL /sys/shell

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -4,8 +4,8 @@ Theme settings=skincfg
Background=/sys/media/palitra
System panel=syspanel
[00]
name=KFM
path=/SYS/FILE MANAGERS/KFM
name=KFM2
path=/SYS/FILE MANAGERS/KFM2
param=
ico=3
x=0

View File

@ -75,7 +75,7 @@ System panel |syspanel
#8 **** FM
KFAR |File Managers/kfar
fNav |File Managers/fNav/fNav
KFM |File Managers/kfm
KFM2 |File Managers/kfm2
Eolite |File Managers/Eolite
Virtual disks |tmpdisk
Shell |shell

View File

@ -4,8 +4,8 @@ Theme settings=skincfg
Fondo=/sys/media/palitra
System panel=syspanel
[00]
name=KFM
path=/SYS/FILE MANAGERS/KFM
name=KFM2
path=/SYS/FILE MANAGERS/KFM2
param=
ico=3
x=0

View File

@ -85,7 +85,8 @@ K. Bus disconnected |kbd
HDD info |hdd_info
#10 **** WORK WITH FILES ****
KFAR |File Managers/kfar
KFM |File Managers/kfm
KFM2 |File Managers/kfm2
fNav |File Managers/fNav/fNav
Eolite |File Managers/Eolite
Virtual disks |tmpdisk
SHELL konsool |shell

View File

@ -4,8 +4,8 @@ Theme settings=skincfg
Background=/sys/media/palitra
System panel=syspanel
[00]
name=KFM
path=/SYS/FILE MANAGERS/KFM
name=KFM2
path=/SYS/FILE MANAGERS/KFM2
param=
ico=3
x=0

View File

@ -86,7 +86,7 @@ HDD informer |hdd_info
#10 **** FM
KFAR |File Managers/kfar
fNav |File Managers/fNav/fNav
KFM |File Managers/kfm
KFM2 |File Managers/kfm2
Eolite |File Managers/Eolite
Virtual disks |tmpdisk
SHELL console |shell

View File

@ -4,8 +4,8 @@
<EFBFBD> áâனª  ä®­ =/sys/media/palitra
‘¨á⥬­ ï ¯ ­¥«ì=syspanel
[00]
name=KFM
path=/SYS/FILE MANAGERS/KFM
name=KFM2
path=/SYS/FILE MANAGERS/KFM2
param=
ico=3
x=0

View File

@ -75,7 +75,7 @@ ScummVM |/kolibrios/emul/scummvm
#8 ==‘¨á⥬  > ”Œ
KFAR |File Managers/kfar
fNav |File Managers/fNav/fNav
KFM |File Managers/kfm
KFM2 |File Managers/kfm2
Eolite |File Managers/Eolite
#9 ==‘¨á⥬  > ‘¯¥æ.¢®§¬®¦­®áâ¨
<EFBFBD>ªà ­­ ï «ã¯  |magnify

View File

@ -4,8 +4,8 @@ Theme settings=skincfg
Background=/sys/media/palitra
System panel=syspanel
[00]
name=KFM
path=/SYS/FILE MANAGERS/KFM
name=KFM2
path=/SYS/FILE MANAGERS/KFM2
param=
ico=3
x=0

View File

@ -86,7 +86,7 @@ Informaci
#10 **** ARCHIVOS
KFAR |File Managers/kfar
fNav |File Managers/fNav/fNav
KFM |File Managers/kfm
KFM2 |File Managers/kfm2
Eolite |File Managers/Eolite
Virtual disks |tmpdisk
SHELL |shell

View File

@ -3,8 +3,8 @@
// 70.5 - get volume info and label
#define TITLE "Eolite File Manager 4.80"
#define ABOUT_TITLE "EOLITE 4.80"
#define TITLE "Eolite File Manager 5 Beta"
#define ABOUT_TITLE "EOLITE 5 Beta"
#ifndef AUTOBUILD
#include "lang.h--"
@ -37,7 +37,16 @@ enum {
PATH_BTN = 10,
POPUP_BTN1 = 201,
POPUP_BTN2 = 202,
BREADCRUMB_ID = 300
KFM_DEV_DROPDOWN_1 = 205,
KFM_DEV_DROPDOWN_2 = 207,
BREADCRUMB_ID = 300,
BACK_BTN = 400,
FWRD_BTN,
GOUP_BTN,
COPY_BTN,
CUT_BTN,
PASTE_BTN
};
//NewElement options
@ -85,8 +94,10 @@ bool _not_draw = false;
bool exif_load = false;
bool dir_at_fat16 = NULL;
word about_thread_id;
word settings_window;
bool dev_popin_active_on_panel=0;
dword about_thread_id;
dword settings_window;
byte del_active=0;
byte new_element_active=0;
@ -241,7 +252,7 @@ void main()
loop() switch(@WaitEventTimeout(80))
{
case evMouse:
if (del_active) || (Form.status_window>2) break;
if (del_active) || (dev_popin_active_on_panel) || (Form.status_window>2) break;
if (new_element_active)
{
edit_box_mouse stdcall(#new_file_ed);
@ -331,7 +342,7 @@ void main()
break;
}
if (two_panels.checked) && (mouse.y > files.y) && (mouse.down) {
if (efm) && (mouse.y > files.y) && (mouse.down) {
if (mouse.x<Form.cwidth/2)
{
if (active_panel!=1)
@ -354,10 +365,11 @@ void main()
case evButton:
id = GetButtonID();
if (new_element_active) || (del_active) {
if (new_element_active) || (del_active) || (dev_popin_active_on_panel) {
if (POPUP_BTN1==id) && (del_active) EventDelete();
if (POPUP_BTN1==id) && (new_element_active) NewElement();
if (POPUP_BTN2==id) EventClosePopinForm();
if (dev_popin_active_on_panel) EventDriveClick(id);
break;
}
@ -371,23 +383,29 @@ void main()
notify(COPY_PATH_STR);
Clipboard__CopyText(#path);
break;
case 21: //Back
EventHistoryGoBack();
case KFM_DEV_DROPDOWN_1:
case KFM_DEV_DROPDOWN_1+1:
dev_popin_active_on_panel = 1;
SystemDiscs.DrawOptions(Form.cwidth/2-DDW, 8+DEV_H_HOR+3);
break;
case 22: //Forward
EventHistoryGoForward();
case KFM_DEV_DROPDOWN_2:
case KFM_DEV_DROPDOWN_2+1:
dev_popin_active_on_panel = 2;
SystemDiscs.DrawOptions(Form.cwidth-DDW-2, 8+DEV_H_HOR+3);
break;
case 23:
Dir_Up();
case BACK_BTN...PASTE_BTN:
if (active_panel==2) {
active_panel = 1;
ChangeActivePanel();
}
EventToolbarButtonClick(id);
break;
case 24:
EventCopy(CUT);
break;
case 25:
EventCopy(NOCUT);
break;
case 26:
EventPaste();
case BACK_BTN+100...PASTE_BTN+100:
if (active_panel==1) {
active_panel = 2;
ChangeActivePanel();
}
EventToolbarButtonClick(id-100);
break;
case 31...33:
EventSort(id-30);
@ -402,7 +420,7 @@ void main()
SetDefaultPath(#path);
break;
case 100...120:
SystemDiscs.Click(id-100);
EventDriveClick(id);
break;
case BREADCRUMB_ID...360:
ClickOnBreadCrumb(id-BREADCRUMB_ID);
@ -416,15 +434,16 @@ void main()
if (Form.status_window>2) break;
if (new_element_active) || (del_active)
if (new_element_active) || (del_active) || (dev_popin_active_on_panel)
{
if (del_active)
{
if (dev_popin_active_on_panel) {
if (key_scancode == SCAN_CODE_ESC) EventClosePopinForm();
}
if (del_active) {
if (key_scancode == SCAN_CODE_ENTER) EventDelete();
if (key_scancode == SCAN_CODE_ESC) EventClosePopinForm();
}
if (new_element_active)
{
if (new_element_active) {
if (key_scancode == SCAN_CODE_ENTER) NewElement();
if (key_scancode == SCAN_CODE_ESC) EventClosePopinForm();
EAX = key_editbox;
@ -462,7 +481,7 @@ void main()
case SCAN_CODE_1...SCAN_CODE_10:
key_scancode-=2;
if (key_scancode >= SystemDiscs.list.count) break;
if (!two_panels.checked)
if (!efm)
{
DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
pause(7);
@ -479,7 +498,7 @@ void main()
EventOpenConsoleHere();
break;
case SCAN_CODE_KEY_V:
EventPaste();
EventPaste(#path);
break;
case SCAN_CODE_KEY_D: //set image as bg
strlcpy(#temp, "\\S__",4);
@ -492,6 +511,9 @@ void main()
case SCAN_CODE_KEY_M:
Open_Dir(#inactive_path,WITH_REDRAW);
break;
case SCAN_CODE_KEY_R:
EventRefresh();
break;
case SCAN_CODE_ENTER:
if (!itdir) ShowOpenWithDialog();
else EventOpen(1);
@ -509,14 +531,13 @@ void main()
switch (key_scancode)
{
case SCAN_CODE_BS:
//EventHistoryGoBack();
Dir_Up();
break;
case SCAN_CODE_ENTER:
EventOpen(0);
break;
case SCAN_CODE_TAB:
if (!two_panels.checked) break;
if (!efm) break;
if (active_panel==1) active_panel=2; else active_panel=1;
ChangeActivePanel();
DrawFilePanels();
@ -548,7 +569,7 @@ void main()
if (CheckActiveProcess(Form.ID)) && (GetMenuClick()) break;
if (action_buf==OPERATION_END)
{
FnProcess(5);
EventRefresh();
action_buf=0;
}
break;
@ -569,29 +590,35 @@ void main()
void draw_window()
{
dword i;
dword i=0;
incn x;
dword title;
if (show_status_bar.checked) status_bar_h = STATUS_BAR_H; else status_bar_h = 0;
DefineAndDrawWindow(Form.left+rand_n,Form.top+rand_n,Form.width,Form.height,0x73,NULL,TITLE,0);
if (efm) title = "Kolibri File Manager 2 - BETA"; else title = TITLE;
DefineAndDrawWindow(Form.left+rand_n,Form.top+rand_n,Form.width,Form.height,0x73,NULL,title,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;
if (Form.height < 350) { MoveSize(OLD,OLD,OLD,350); return; }
if (Form.height < 356) { MoveSize(OLD,OLD,OLD,356); return; }
GetProcessInfo(#Form, SelfInfo);
SetAppColors();
if (two_panels.checked) {
if (Form.width < 573) { MoveSize(OLD,OLD,573,OLD); return; }
if (efm) {
if (screen.width > 693) && (Form.width < 693) { MoveSize(OLD,OLD,693,OLD); return; }
DrawBar(0, 0, Form.cwidth, 34, sc.work);
#define PAD 7
#define GAP_S 26+5
#define GAP_B 26+14
x.set(-GAP_S+8);
DrawTopPanelButton(21, x.inc(GAP_S), PAD, 30, false);
DrawTopPanelButton(22, x.inc(GAP_S), PAD, 31, false);
DrawTopPanelButton(23, x.inc(GAP_B), PAD, 01, false);
DrawTopPanelButton(24, x.inc(GAP_B), PAD, 55, false);
DrawTopPanelButton(25, x.inc(GAP_S), PAD, 20, false);
DrawTopPanelButton(26, x.inc(GAP_S), PAD, 56, false);
DrawTopPanelButton(51, Form.cwidth-GAP_S-PAD, PAD, -1, false); //burger menu
x.set(Form.cwidth/2-DDW-203/2-GAP_S);
while (i<200) {
DrawTopPanelButton(i+BACK_BTN, x.inc(GAP_S), PAD, 30, false);
DrawTopPanelButton(i+FWRD_BTN, x.inc(GAP_S), PAD, 31, false);
DrawTopPanelButton(i+GOUP_BTN, x.inc(GAP_B), PAD, 01, false);
DrawTopPanelButton(i+COPY_BTN, x.inc(GAP_B), PAD, 55, false);
DrawTopPanelButton(i+CUT_BTN, x.inc(GAP_S), PAD, 20, false);
DrawTopPanelButton(i+PASTE_BTN,x.inc(GAP_S), PAD, 56, false);
x.set(Form.cwidth/2-DDW-203/2-GAP_S+calc(Form.cwidth/2));
i+=100;
}
//DrawTopPanelButton(51, Form.cwidth-GAP_S-PAD, PAD, -1, false); //burger menu
} else {
if (Form.width < 480) { MoveSize(OLD,OLD,480,OLD); return; }
ESDWORD[#toolbar_pal] = sc.work;
@ -616,6 +643,7 @@ void draw_window()
DrawStatusBar();
if (!selected_count) Open_Dir(#path,ONLY_OPEN); //if there are no selected files -> refresh folder [L001]
DrawFilePanels();
dev_popin_active_on_panel = 0;
}
void DrawList()
@ -633,13 +661,20 @@ void DrawList()
if (sort_type==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
WriteText(sorting_arrow_x,files.y-12,0x80, sc.work_text, sorting_arrow_t);
DrawBar(files.x+files.w,files.y,1,files.h,sc.work_graph);
if (two_panels.checked) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,sc.work_graph);
if (efm) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,sc.work_graph);
}
void DrawStatusBar()
{
char status_bar_str[80];
int go_up_folder_exists=0;
if (efm) {
DrawBar(0, Form.cheight - status_bar_h, Form.cwidth, status_bar_h, sc.work);
WriteTextCenter(0,Form.cheight - 12, Form.cwidth,sc.work_text,T_KFM_FUNC);
return;
}
if (!show_status_bar.checked) return;
if (files.count>0) && (streq(items.get(0)*304+buf+72,"..")) go_up_folder_exists=1;
DrawBar(0, Form.cheight - status_bar_h, Form.cwidth, status_bar_h, sc.work);
@ -657,7 +692,7 @@ void DrawFilePanels()
int files_y;
int w2 = -Form.cwidth-1/2+Form.cwidth;
int h2;
if (!two_panels.checked)
if (!efm)
{
DrawDeviceAndActionsLeftPanel();
files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59 - status_bar_h, files.item_h);
@ -855,7 +890,7 @@ 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);
}
if (bgcol == col.selec_inactive) DrawWideRectangle(files.x+2, y, files.w-4, files.item_h, 2, 0x92B1D9);
if (bgcol == col.selec_inactive) DrawWideRectangle(files.x+2, y, files.w-4, files.item_h, 2, col.selec_active);
sprintf(#full_path,"%s/%s",#path,file_name_off);
DrawIconByExtension(#full_path, ext1, files.x+4, icon_y, bgcol);
@ -880,7 +915,7 @@ void Open_Dir(dword dir_path, redraw){
}
if (files.count!=-1)
{
if(!_not_draw) if (show_breadcrumb.checked) DrawBreadCrumbs(); else DrawPathBar();
if(!_not_draw) DrawPathBar();
history.add(#path);
SystemDiscs.Draw();
files.visible = files.h / files.item_h;
@ -1156,21 +1191,19 @@ void FnProcess(byte N)
case 4:
if (files.count) && (!itdir) RunProgram("/sys/develop/cedit", #file_path);
break;
case 5: //refresh cur dir & devs
if (two_panels.checked)
{
DrawFilePanels();
case 5:
if (efm) {
EventCopy(false);
EventPaste(#inactive_path);
} else {
Tip(56, T_DEVICES, 55, "-");
Open_Dir(#path,WITH_REDRAW);
pause(10);
SystemDiscs.Get();
Open_Dir(#path,WITH_REDRAW);
DrawDeviceAndActionsLeftPanel();
EventRefresh();
}
break;
case 6:
//Move
if (efm) {
EventCopy(true);
EventPaste(#inactive_path);
}
break;
case 7:
NewElement_Form(CREATE_FOLDER, T_NEW_FOLDER);
@ -1196,6 +1229,21 @@ void FnProcess(byte N)
}
}
void EventRefresh()
{
if (efm)
{
DrawFilePanels();
} else {
Tip(56, T_DEVICES, 55, "-");
Open_Dir(#path,WITH_REDRAW);
pause(10);
SystemDiscs.Get();
Open_Dir(#path,WITH_REDRAW);
DrawDeviceAndActionsLeftPanel();
}
}
void ChangeActivePanel()
{
llist_copy(#files_active, #files_inactive);
@ -1246,9 +1294,9 @@ int GetRealFileCountInFolder(dword folder_path)
void EventRefreshDisksAndFolders()
{
if(GetRealFileCountInFolder("/")+dir_exists("/kolibrios") != SystemDiscs.dev_num) {
FnProcess(5);
EventRefresh();
}
if(two_panels.checked)
if(efm)
{
if(GetRealFileCountInFolder(#inactive_path) != files_inactive.count) {
ChangeActivePanel();
@ -1256,9 +1304,7 @@ void EventRefreshDisksAndFolders()
ChangeActivePanel();
}
if(GetRealFileCountInFolder(#path) != files.count) Open_Dir(#path,WITH_REDRAW);
}
else
{
} else {
if(GetRealFileCountInFolder(#path) != files.count) Open_Dir(#path,WITH_REDRAW);
}
}
@ -1330,9 +1376,9 @@ void ProceedMouseGestures()
}
}
void EventPaste() {
void EventPaste(dword _into_path) {
char paste_line[4096+6];
sprintf(#paste_line, "-v%i %s", cut_active, #path);
sprintf(#paste_line, "-v%i %s", cut_active, _into_path);
RunProgram(#program_path, #paste_line);
EventClosePopinForm();
}
@ -1352,11 +1398,12 @@ char line_param[4096+5];
void EventClosePopinForm()
{
del_active=0;
del_active = 0;
new_element_active = 0;
dev_popin_active_on_panel = 0;
draw_window();
DeleteButton(POPUP_BTN1);
DeleteButton(POPUP_BTN2);
//DeleteButton(POPUP_BTN1);
//DeleteButton(POPUP_BTN2);
}
void EventShowProperties()
@ -1400,6 +1447,29 @@ void EventChooseAllFiles(dword state)
DrawStatusBar();
}
void EventToolbarButtonClick(int _btid)
{
switch(_btid) {
case BACK_BTN: EventHistoryGoBack(); break;
case FWRD_BTN: EventHistoryGoForward(); break;
case GOUP_BTN: Dir_Up(); break;
case COPY_BTN: EventCopy(CUT); break;
case CUT_BTN: EventCopy(NOCUT); break;
case PASTE_BTN:EventPaste(#path); break;
}
}
void EventDriveClick(int __id)
{
if (dev_popin_active_on_panel != active_panel) {
if (active_panel == 1) active_panel=2; else active_panel=1;
ChangeActivePanel();
}
SystemDiscs.Click(__id-100);
if (efm) {
draw_window();
}
}
stop:

View File

@ -2,6 +2,14 @@
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
void DrawPathBar()
{
if (efm) {
return;
}
if (show_breadcrumb.checked) {
DrawBreadCrumbs();
return;
}
PathShow.start_x = -efm*22 + 250;
PathShow.area_size_x = Form.cwidth-300;

View File

@ -43,11 +43,13 @@ struct _SystemDiscs
int dev_num;
void Get();
void Draw();
void DrawSelect();
void DrawOptions();
void Click();
} SystemDiscs=0;
#define DEV_H 17
#define DEV_H_HOR 21
#define DEV_H_HOR 20
void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name)
{
@ -124,37 +126,32 @@ void _SystemDiscs::Get()
free(devbuf);
}
#define DDW 120
void _SystemDiscs::Draw()
{
char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len;
char dev_name[15], disc_name[100], i, dev_icon, is_active=0, name_len;
int draw_y, draw_x;
for (i=0; i<30; i++) DeleteButton(100+i);
if (two_panels.checked) { draw_y = 41; draw_x = 2; }
else { draw_y = 74; draw_x = 17; }
for (i=0;i<list.count;i++)
{
strcpy(#dev_name, list.get(i));
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
if (strstr(#path, #dev_name)-#path==0) is_active=true; else is_active=false;
if (two_panels.checked)
{
name_len = strlen(#dev_name)-1*8;
DrawBar(draw_x, draw_y, name_len + 31, DEV_H_HOR, 0xFFFFFF);
DefineButton(draw_x+2, draw_y, name_len + 27, DEV_H_HOR-1, 100+i+BT_HIDE,0xFFFFFF);
_PutImage(draw_x + 5, draw_y+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
WriteText(draw_x + 24, draw_y+3, 10110000b, 0, #dev_name+1);
draw_x += name_len + 31;
if (draw_x>=Form.cwidth-100) && (Form.cwidth) {
DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, 0xFFFFFF);
draw_x = 2;
draw_y += DEV_H_HOR;
}
if (efm) {
if (active_panel==1) {
DrawSelect(Form.cwidth/2-DDW, 10, #path, KFM_DEV_DROPDOWN_1);
DrawSelect(Form.cwidth-DDW-2, 10, #inactive_path, KFM_DEV_DROPDOWN_2);
} else {
DrawSelect(Form.cwidth/2-DDW, 10, #inactive_path, KFM_DEV_DROPDOWN_1);
DrawSelect(Form.cwidth-DDW-2, 10, #path, KFM_DEV_DROPDOWN_2);
}
else
{
files.y = 40 + 17;
} else {
draw_y = 74;
draw_x = 17;
for (i=0;i<list.count;i++) {
strcpy(#dev_name, list.get(i));
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
if (strstr(#path, #dev_name)!=0) is_active=true; else is_active=false;
DrawBar(draw_x,draw_y,6,DEV_H+1,0xFFFFFF);
DrawBar(draw_x+6+18,draw_y,160-6-18,DEV_H+1,0xFFFFFF);
DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF);
@ -163,23 +160,68 @@ void _SystemDiscs::Draw()
strcat(#disc_name, #dev_name);
if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name);
WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name);
//if (is_active) kfont.bold = true;
//kfont.WriteIntoWindow(draw_x + 29, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #disc_name);
//kfont.bold = false;
} else {
if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name);
WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name);
}
_PutImage(draw_x+6,draw_y, 18,17, is_active*7+dev_icon*17*18*3+#devices);
draw_y += DEV_H;
draw_y += DEV_H;
}
}
if (two_panels.checked)
{
DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, 0xFFFFFF);
files.y = draw_y + DEV_H_HOR + 17;
} else {
DrawBar(draw_x+6, draw_y, 18, 1, 0xFFFfff);
}
}
void _SystemDiscs::DrawSelect(int draw_x, draw_y, path1, btid)
{
char dev_name[15], disc_name[100], i, dev_icon, is_active=0;
if (ESBYTE[path1+1]=='\0') {
strcpy(#dev_name, "/root");
dev_icon = 0;
} else if (chrnum(path1, '/')==1) {
strcpy(#dev_name, path1);
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
} else for (i=0;i<list.count;i++) {
strcpy(#dev_name, list.get(i));
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
if (strstr(path1, #dev_name)-path1==0) break;
}
DrawRectangle(draw_x-1, draw_y-1, DDW+2-DEV_H_HOR, DEV_H_HOR+1, sc.work_graph);
DrawBar(draw_x, draw_y, DDW+1-DEV_H_HOR, DEV_H_HOR, 0xFFFFFF);
_PutImage(draw_x + 5, draw_y+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
kfont.WriteIntoWindow(draw_x + 24, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1);
UnsafeDefineButton(draw_x, draw_y, DDW-1, DEV_H_HOR-1, btid+1+BT_HIDE,0xFFFFFF);
DrawFlatButtonSmall(draw_x+DDW-DEV_H_HOR+1, draw_y-1, DEV_H_HOR-1, DEV_H_HOR+1, btid, "\x19");
draw_x += DDW + 1;
//DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, sc.work);
}
void _SystemDiscs::DrawOptions(int draw_x, draw_y)
{
char dev_name[15], disc_name[100], i, dev_icon, is_active=0;
for (i=0; i<30; i++) DeleteButton(100+i);
DrawPopup(draw_x, draw_y, DDW, list.count*DEV_H_HOR, 1, -1, sc.work_graph);
for (i=0;i<list.count;i++) {
strcpy(#dev_name, list.get(i));
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
if (strstr(#path, #dev_name)!=0) is_active=true; else is_active=false;
DrawBar(draw_x, draw_y, DDW, DEV_H_HOR, 0xFFFFFF);
DefineButton(draw_x, draw_y, DDW, DEV_H_HOR-1, 100+i+BT_HIDE,0xFFFFFF);
_PutImage(draw_x + 5, draw_y+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
if (is_active) kfont.bold = true;
kfont.WriteIntoWindow(draw_x + 24, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1);
kfont.bold = false;
draw_y += DEV_H_HOR;
}
}
void _SystemDiscs::Click(int n)
{
strcpy(#path, list.get(n));

View File

@ -25,7 +25,7 @@ char empty_folder_actions[]=
char burger_menu_items[] =
"<EFBFBD>®¢®¥ ®ª­®|Ctrl+N
Žâªàëâì ª®­á®«ì|Ctrl+G
Ž¡­®¢¨âì ¯ ¯ªã|F5
Ž¡­®¢¨âì ¯ ¯ªã|Ctrl+R
<EFBFBD> áâனª¨|F10
Ž ¯à®£à ¬¬¥";
@ -55,7 +55,7 @@ char empty_folder_actions[]=
char burger_menu_items[] =
"New window|Ctrl+N
Open console here|Ctrl+G
Värskenda|F5
Värskenda|Ctrl+R
Settings|F10
About";
@ -85,7 +85,7 @@ char empty_folder_actions[]=
char burger_menu_items[] =
"New window|Ctrl+N
Open console here|Ctrl+G
Refresh folder|F5
Refresh folder|Ctrl+R
Settings|F10
About";
#endif
@ -98,14 +98,14 @@ bool active_menu = false;
void EventMenuClick(dword _id)
{
if (active_menu == MENU_NO_FILE) switch(_id) {
case 1: EventPaste(); break;
case 1: EventPaste(#path); break;
}
if (active_menu == MENU_FILE) switch(_id) {
case 1: EventOpen(0); break;
case 2: ShowOpenWithDialog(); break;
case 3: EventCopy(NOCUT); break;
case 4: EventCopy(CUT); break;
case 5: EventPaste(); break;
case 5: EventPaste(#path); break;
case 6: FnProcess(2); break;
case 7: Del_Form(); break;
case 8: FnProcess(1); break;
@ -114,7 +114,7 @@ void EventMenuClick(dword _id)
case 1: EventOpen(0); break;
case 2: EventCopy(NOCUT); break;
case 3: EventCopy(CUT); break;
case 4: EventPaste(); break;
case 4: EventPaste(#path); break;
case 5: Del_Form(); break;
case 6: FnProcess(1); break;
}

View File

@ -5,7 +5,6 @@
?define SHOW_STATUS_BAR "<EFBFBD>®ª §ë¢ âì áâ âãá ¡ à"
?define SHOW_BREADCRUMBS "ˆá¯®«ì§®¢ âì 'å«¥¡­ë¥ ªà®èª¨'"
?define BIG_ICONS "ˆá¯®«ì§®¢ âì ¡®«ì訥 ¨ª®­ª¨"
?define USE_TWO_PANELS "„¢¥ ¯ ­¥«¨"
?define COLORED_LINES "<EFBFBD>®¤á¢¥ç¨¢ âì ç¥â­ë¥ «¨­¨¨ ¢ ᯨ᪥"
?define FONT_SIZE_LABEL "<EFBFBD> §¬¥à èà¨äâ "
?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥"
@ -19,7 +18,6 @@
?define SHOW_STATUS_BAR "Show status bar"
?define SHOW_BREADCRUMBS "Show breadcrumbs"
?define BIG_ICONS "Big icons in list"
?define USE_TWO_PANELS "Two panels"
?define COLORED_LINES "Highlight even lines in list"
?define FONT_SIZE_LABEL "Font size"
?define LIST_LINE_HEIGHT "List line height"
@ -39,7 +37,6 @@ checkbox show_dev_name = { SHOW_DEVICE_CLASS };
checkbox show_status_bar = { SHOW_STATUS_BAR };
checkbox show_breadcrumb = { SHOW_BREADCRUMBS };
checkbox big_icons = { BIG_ICONS };
checkbox two_panels = { USE_TWO_PANELS };
checkbox colored_lines = { COLORED_LINES };
@ -80,7 +77,6 @@ void settings_dialog()
break;
}
show_dev_name.click(id);
two_panels.click(id);
show_breadcrumb.click(id);
show_status_bar.click(id);
colored_lines.click(id);
@ -128,7 +124,6 @@ void DrawSettingsCheckBoxes()
show_status_bar.draw(x, y.inc(25));
show_breadcrumb.draw(x, y.inc(25));
big_icons.draw(x, y.inc(25));
//two_panels.draw(x, y.inc(25));
colored_lines.draw(x, y.inc(25));
font_size.draw(x, y.inc(31));
line_height.draw(x, y.inc(31));
@ -148,13 +143,11 @@ void LoadIniSettings()
{
ini.path = GetIni(#eolite_ini_path, "app.ini");
if (efm) ini.section = "EFM"; else ini.section = "Eolite";
two_panels.checked = efm;
files.SetFont(6, 9, 10000000b);
show_dev_name.checked = ini.GetInt("ShowDeviceName", true);
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", true);
kfont.size.pt = ini.GetInt("FontSize", 13);
files.item_h = ini.GetInt("LineHeight", 19);
@ -178,7 +171,6 @@ void SaveIniSettings()
ini.SetInt("ShowDeviceName", show_dev_name.checked);
ini.SetInt("ShowStatusBar", show_status_bar.checked);
ini.SetInt("BigIcons", big_icons.checked);
//ini.SetInt("TwoPanels", two_panels.checked);
ini.SetInt("ColoredLines", colored_lines.checked);
ini.SetInt("FontSize", kfont.size.pt);
ini.SetInt("LineHeight", files.item_h);

View File

@ -58,3 +58,6 @@
?define T_ABOUT "About"
?define T_USE_SHIFT_ENTER "'Use Shift+Enter to open all selected files.' -I"
#endif
?define T_KFM_FUNC "F1 Info | F2 Rename | F3 View | F4 Edit | F5 Copy | F6 Move | F7 Folder | F8 Delete | F9 File | F10 Settings"
//?define T_KFM_FUNC "F1 ˆ­ä® | F2 <20>¥à¥¨¬. | F3 <20>à®á¬. | F4 <20>¥¤ ªâ. | F5 Š®¯¨à®¢ âì | F6 <20>¥à¥¬¥áâ¨âì | F7 <20> ¯ª  | F8 “¤ «¨âì | F9 ” ©« | F10 <20> áâனª¨"