forked from KolibriOS/kolibrios
Eolite/KFM2: global refactoring, use proper multi-panes PATH variable
git-svn-id: svn://kolibrios.org@8949 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c213c7fdf5
commit
5bb70bb219
@ -27,7 +27,6 @@ img_files = {
|
|||||||
{"NOTIFY3.PNG", "common/notify3.png"},
|
{"NOTIFY3.PNG", "common/notify3.png"},
|
||||||
{"UNIMG", PROGS .. "/fs/unimg/unimg"},
|
{"UNIMG", PROGS .. "/fs/unimg/unimg"},
|
||||||
{"3D/HOUSE.3DS", "common/3d/house.3ds"},
|
{"3D/HOUSE.3DS", "common/3d/house.3ds"},
|
||||||
{"File Managers/KFM2", "common/File Managers/kfm2"},
|
|
||||||
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
|
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
|
||||||
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
|
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
|
||||||
{"File Managers/FNAV/ABOUT.TXT", "common/File Managers/fNav/About.txt"},
|
{"File Managers/FNAV/ABOUT.TXT", "common/File Managers/fNav/About.txt"},
|
||||||
@ -656,6 +655,7 @@ tup.append_table(img_files, {
|
|||||||
{"DEVELOP/MENU", PROGS .. "/cmm/menu/menu.com"},
|
{"DEVELOP/MENU", PROGS .. "/cmm/menu/menu.com"},
|
||||||
{"DEVELOP/PIPET", PROGS .. "/cmm/misc/pipet.com"},
|
{"DEVELOP/PIPET", PROGS .. "/cmm/misc/pipet.com"},
|
||||||
{"File Managers/EOLITE", PROGS .. "/cmm/eolite/Eolite.com"},
|
{"File Managers/EOLITE", PROGS .. "/cmm/eolite/Eolite.com"},
|
||||||
|
{"File Managers/KFM2", PROGS .. "/cmm/misc/kfm2.com"},
|
||||||
{"KF_VIEW", PROGS .. "/cmm/kf_font_viewer/font_viewer.com"},
|
{"KF_VIEW", PROGS .. "/cmm/kf_font_viewer/font_viewer.com"},
|
||||||
{"DEVELOP/DIFF", PROGS .. "/cmm/diff/diff.com"},
|
{"DEVELOP/DIFF", PROGS .. "/cmm/diff/diff.com"},
|
||||||
{"GAMES/CLICKS", PROGS .. "/games/clicks/trunk/clicks.com"},
|
{"GAMES/CLICKS", PROGS .. "/games/clicks/trunk/clicks.com"},
|
||||||
|
Binary file not shown.
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
// 70.5 - get volume info and label
|
// 70.5 - get volume info and label
|
||||||
|
|
||||||
#define ABOUT_TITLE "EOLITE 5 Beta8"
|
#define ABOUT_TITLE "EOLITE 5 Beta9"
|
||||||
#define TITLE_EOLITE "Eolite File Manager 5 Beta8"
|
#define TITLE_EOLITE "Eolite File Manager 5 Beta9"
|
||||||
#define TITLE_KFM "Kolibri File Manager 2 Beta8";
|
#define TITLE_KFM "Kolibri File Manager 2 Beta9";
|
||||||
|
|
||||||
#define MEMSIZE 1024 * 250
|
#define MEMSIZE 1024 * 250
|
||||||
#include "../lib/clipboard.h"
|
#include "../lib/clipboard.h"
|
||||||
@ -74,8 +74,7 @@ bool list_full_redraw;
|
|||||||
collection_int items=0;
|
collection_int items=0;
|
||||||
int selected_count;
|
int selected_count;
|
||||||
int folder_count;
|
int folder_count;
|
||||||
//dword path;
|
dword path;
|
||||||
char path[4096];
|
|
||||||
|
|
||||||
//Sselected element data
|
//Sselected element data
|
||||||
byte file_path[4096];
|
byte file_path[4096];
|
||||||
@ -93,13 +92,10 @@ bool list_full_redraw;
|
|||||||
int status_bar_h;
|
int status_bar_h;
|
||||||
int icon_size = 18;
|
int icon_size = 18;
|
||||||
|
|
||||||
|
|
||||||
int active_panel=0;
|
int active_panel=0;
|
||||||
int disk_popin_active_on_panel=0;
|
int disk_popin_active_on_panel=0;
|
||||||
#define PANES_COUNT 2
|
#define PANES_COUNT 2
|
||||||
unsigned char location[PANES_COUNT];
|
dword location[PANES_COUNT];
|
||||||
|
|
||||||
char active_path[4096], inactive_path[4096];
|
|
||||||
|
|
||||||
dword about_stak=0,properties_stak=0,settings_stak=0;
|
dword about_stak=0,properties_stak=0,settings_stak=0;
|
||||||
byte cmd_free=0;
|
byte cmd_free=0;
|
||||||
@ -134,11 +130,7 @@ void handle_param()
|
|||||||
//-v : paste files/folder from clipboard
|
//-v : paste files/folder from clipboard
|
||||||
int i;
|
int i;
|
||||||
dword p = #param;
|
dword p = #param;
|
||||||
if (param[0]=='\\') && (param[1]=='E') && (param[2]=='F') && (param[3]=='M') {
|
if (streq(#program_path+strrchr(#program_path,'/'), "KFM")) efm = true;
|
||||||
efm = true;
|
|
||||||
p += 4;
|
|
||||||
if (param[4]==' ') p++;
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadIniSettings();
|
LoadIniSettings();
|
||||||
|
|
||||||
@ -146,7 +138,7 @@ void handle_param()
|
|||||||
location[i] = malloc(4096);
|
location[i] = malloc(4096);
|
||||||
strcpy(location[i], #path_start);
|
strcpy(location[i], #path_start);
|
||||||
}
|
}
|
||||||
//path = location[0];
|
path = location[0];
|
||||||
|
|
||||||
if (ESBYTE[p]=='\0') return;
|
if (ESBYTE[p]=='\0') return;
|
||||||
|
|
||||||
@ -157,31 +149,29 @@ void handle_param()
|
|||||||
itdir = dir_exists(#file_path);
|
itdir = dir_exists(#file_path);
|
||||||
strcpy(#file_name, p + strrchr(p, '/'));
|
strcpy(#file_name, p + strrchr(p, '/'));
|
||||||
ESBYTE[strrchr(p, '/')+p-1] = '\0';
|
ESBYTE[strrchr(p, '/')+p-1] = '\0';
|
||||||
strcpy(#path, p + 3);
|
strcpy(path, p + 3);
|
||||||
properties_dialog();
|
properties_dialog();
|
||||||
ExitProcess();
|
ExitProcess();
|
||||||
case 'd':
|
case 'd':
|
||||||
strcpy(#path, p + 3);
|
strcpy(path, p + 3);
|
||||||
DeleteThread();
|
DeleteThread();
|
||||||
ExitProcess();
|
ExitProcess();
|
||||||
case 'v':
|
case 'v':
|
||||||
cut_active = ESBYTE[p+2] - '0';
|
cut_active = ESBYTE[p+2] - '0';
|
||||||
strcpy(#path, p + 4);
|
strcpy(path, p + 4);
|
||||||
PasteThread();
|
PasteThread();
|
||||||
ExitProcess();
|
ExitProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
ESBYTE[0] = NULL;
|
|
||||||
|
|
||||||
if (param[strlen(#param)-1]=='/') ESBYTE[strlen(#param)-1]=NULL; //no "/" at the end
|
if (param[strlen(#param)-1]=='/') ESBYTE[strlen(#param)-1]=NULL; //no "/" at the end
|
||||||
|
|
||||||
if (dir_exists(p)) {
|
if (dir_exists(p)) {
|
||||||
strcpy(#path, p);
|
strcpy(path, p);
|
||||||
} else {
|
} else {
|
||||||
if (file_exists(p)) {
|
if (file_exists(p)) {
|
||||||
ESBYTE[strrchr(p, '/')+p-1] = '\0';
|
ESBYTE[strrchr(p, '/')+p-1] = '\0';
|
||||||
strcpy(#path, p);
|
strcpy(path, p);
|
||||||
SelectFileByName(p+strlen(#path)+1);
|
SelectFileByName(p+strlen(path)+1);
|
||||||
} else {
|
} else {
|
||||||
notify(T_NOTIFY_APP_PARAM_WRONG);
|
notify(T_NOTIFY_APP_PARAM_WRONG);
|
||||||
}
|
}
|
||||||
@ -200,11 +190,8 @@ void main()
|
|||||||
SetAppColors();
|
SetAppColors();
|
||||||
handle_param();
|
handle_param();
|
||||||
|
|
||||||
ESBYTE[0] = NULL;
|
|
||||||
|
|
||||||
SystemDiscs.Get();
|
SystemDiscs.Get();
|
||||||
Open_Dir(#path,ONLY_OPEN);
|
Open_Dir(path,ONLY_OPEN);
|
||||||
strcpy(#inactive_path, #path);
|
|
||||||
llist_copy(#files_inactive, #files);
|
llist_copy(#files_inactive, #files);
|
||||||
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
|
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
|
||||||
loop() switch(@WaitEventTimeout(100))
|
loop() switch(@WaitEventTimeout(100))
|
||||||
@ -333,7 +320,7 @@ void main()
|
|||||||
{
|
{
|
||||||
case PATH_BTN:
|
case PATH_BTN:
|
||||||
notify(COPY_PATH_STR);
|
notify(COPY_PATH_STR);
|
||||||
Clipboard__CopyText(#path);
|
Clipboard__CopyText(path);
|
||||||
break;
|
break;
|
||||||
case KFM_DEV_DROPDOWN_1:
|
case KFM_DEV_DROPDOWN_1:
|
||||||
case KFM_DEV_DROPDOWN_1+1:
|
case KFM_DEV_DROPDOWN_1+1:
|
||||||
@ -359,7 +346,7 @@ void main()
|
|||||||
FnProcess(id-50);
|
FnProcess(id-50);
|
||||||
break;
|
break;
|
||||||
case 61: // Set path as default
|
case 61: // Set path as default
|
||||||
SetDefaultPath(#path);
|
SetDefaultPath(path);
|
||||||
break;
|
break;
|
||||||
case 100...120:
|
case 100...120:
|
||||||
EventDriveClick(id);
|
EventDriveClick(id);
|
||||||
@ -444,7 +431,7 @@ void main()
|
|||||||
EventOpenConsoleHere();
|
EventOpenConsoleHere();
|
||||||
break;
|
break;
|
||||||
case SCAN_CODE_KEY_V:
|
case SCAN_CODE_KEY_V:
|
||||||
EventPaste(#path);
|
EventPaste(path);
|
||||||
break;
|
break;
|
||||||
case SCAN_CODE_KEY_D: //set image as bg
|
case SCAN_CODE_KEY_D: //set image as bg
|
||||||
strlcpy(#temp, "\\S__",4);
|
strlcpy(#temp, "\\S__",4);
|
||||||
@ -588,9 +575,8 @@ void draw_window()
|
|||||||
for (i=0; i<6; i++) DrawBar(0, 34+i, Form.cwidth, 1, MixColors(sc.work_dark, sc.work, i*10));
|
for (i=0; i<6; i++) DrawBar(0, 34+i, Form.cwidth, 1, MixColors(sc.work_dark, sc.work, i*10));
|
||||||
for (i=0; i<6; i++) DrawBar(0, 5-i, Form.cwidth, 1, MixColors(sc.work_light, sc.work, i*10));
|
for (i=0; i<6; i++) DrawBar(0, 5-i, Form.cwidth, 1, MixColors(sc.work_light, sc.work, i*10));
|
||||||
llist_copy(#files_active, #files);
|
llist_copy(#files_active, #files);
|
||||||
strcpy(#active_path, #path);
|
|
||||||
DrawStatusBar();
|
DrawStatusBar();
|
||||||
if (!selected_count) Open_Dir(#path,ONLY_OPEN); //if there are no selected files -> refresh folder [L001]
|
if (!selected_count) Open_Dir(path,ONLY_OPEN); //if there are no selected files -> refresh folder [L001]
|
||||||
DrawFilePanels();
|
DrawFilePanels();
|
||||||
disk_popin_active_on_panel = 0;
|
disk_popin_active_on_panel = 0;
|
||||||
}
|
}
|
||||||
@ -610,7 +596,9 @@ void DrawButtonsAroundList()
|
|||||||
if (sort_type==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
|
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);
|
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);
|
DrawBar(files.x+files.w,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);
|
if (efm) && (files.x<5) {
|
||||||
|
DrawBar(files.x+files.w+16,files.y,1,files.h,EDX); //line between panel
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawFuncButtonsInKfm()
|
void DrawFuncButtonsInKfm()
|
||||||
@ -621,6 +609,7 @@ void DrawFuncButtonsInKfm()
|
|||||||
for (i=0; i<10; i++) {
|
for (i=0; i<10; i++) {
|
||||||
len = strlen(kfm_func[i])+2*6 + padding;
|
len = strlen(kfm_func[i])+2*6 + padding;
|
||||||
if (i==9) len = Form.cwidth - x - 3;
|
if (i==9) len = Form.cwidth - x - 3;
|
||||||
|
DrawBar(x, Form.cheight - 19, 1, 17, sc.work);
|
||||||
DrawFuncButton(x+1, Form.cheight - 19, len, i+KFM_FUNC_ID+1, i+1, kfm_func[i]);
|
DrawFuncButton(x+1, Form.cheight - 19, len, i+KFM_FUNC_ID+1, i+1, kfm_func[i]);
|
||||||
x += len + 2;
|
x += len + 2;
|
||||||
}
|
}
|
||||||
@ -632,7 +621,9 @@ void DrawStatusBar()
|
|||||||
int go_up_folder_exists=0;
|
int go_up_folder_exists=0;
|
||||||
|
|
||||||
if (efm) {
|
if (efm) {
|
||||||
DrawBar(0, Form.cheight - status_bar_h+15, Form.cwidth, status_bar_h-15, sc.work);
|
DrawBar(0, Form.cheight - status_bar_h+15, Form.cwidth, 3, sc.work);
|
||||||
|
DrawBar(0, Form.cheight - 2, Form.cwidth, 2, sc.work);
|
||||||
|
DrawBar(Form.cwidth-1, Form.cheight - 19, 1, 17, sc.work);
|
||||||
DrawFuncButtonsInKfm();
|
DrawFuncButtonsInKfm();
|
||||||
DrawPathBar();
|
DrawPathBar();
|
||||||
return;
|
return;
|
||||||
@ -652,9 +643,9 @@ void DrawStatusBar()
|
|||||||
|
|
||||||
void DrawFilePanels()
|
void DrawFilePanels()
|
||||||
{
|
{
|
||||||
int files_y;
|
int files_y = files.y;
|
||||||
int w2 = -Form.cwidth-1/2+Form.cwidth;
|
int w2 = -Form.cwidth-1/2+Form.cwidth;
|
||||||
int h2;
|
int h2 = Form.cheight-files_y-2 - status_bar_h;
|
||||||
if (!efm)
|
if (!efm)
|
||||||
{
|
{
|
||||||
DrawDeviceAndActionsLeftPanel();
|
DrawDeviceAndActionsLeftPanel();
|
||||||
@ -664,37 +655,33 @@ void DrawFilePanels()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
llist_copy(#files_active, #files);
|
||||||
llist_copy(#files, #files_inactive);
|
llist_copy(#files, #files_inactive);
|
||||||
strcpy(#path, #inactive_path);
|
path = location[active_panel^1];
|
||||||
files_y = files.y;
|
|
||||||
h2 = Form.cheight-files_y-2 - status_bar_h;
|
|
||||||
col.selec = col.selec_inactive; //this is a bad code: need to use some var to set inactive panel for DrawButtonsAroundList();
|
|
||||||
|
|
||||||
if (active_panel==0)
|
if (active_panel==0)
|
||||||
{
|
{
|
||||||
files.SetSizes(Form.cwidth/2, files_y, w2-17, h2, files.item_h);
|
files.SetSizes(Form.cwidth/2, files_y, w2-17, h2, files.item_h);
|
||||||
DrawButtonsAroundList();
|
DrawButtonsAroundList();
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
files_inactive.count = files.count;
|
files_inactive.count = files.count;
|
||||||
llist_copy(#files, #files_active);
|
llist_copy(#files, #files_active);
|
||||||
strcpy(#path, #active_path);
|
path = location[active_panel];
|
||||||
col.selec = col.selec_active;
|
|
||||||
files.SetSizes(2, files_y, Form.cwidth/2-2-17, h2, files.item_h);
|
files.SetSizes(2, files_y, Form.cwidth/2-2-17, h2, files.item_h);
|
||||||
DrawButtonsAroundList();
|
DrawButtonsAroundList();
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
if (active_panel==1)
|
if (active_panel==1)
|
||||||
{
|
{
|
||||||
files.SetSizes(2, files_y, Form.cwidth/2-2-17, h2, files.item_h);
|
files.SetSizes(2, files_y, Form.cwidth/2-2-17, h2, files.item_h);
|
||||||
DrawButtonsAroundList();
|
DrawButtonsAroundList();
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
files_inactive.count = files.count;
|
files_inactive.count = files.count;
|
||||||
llist_copy(#files, #files_active);
|
llist_copy(#files, #files_active);
|
||||||
strcpy(#path, #active_path);
|
path = location[active_panel];
|
||||||
col.selec = col.selec_active;
|
|
||||||
files.SetSizes(Form.cwidth/2, files_y, w2 -17, h2, files.item_h);
|
files.SetSizes(Form.cwidth/2, files_y, w2 -17, h2, files.item_h);
|
||||||
DrawButtonsAroundList();
|
DrawButtonsAroundList();
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -745,7 +732,6 @@ void List_ReDraw()
|
|||||||
void Line_ReDraw(dword bgcol, filenum){
|
void Line_ReDraw(dword bgcol, filenum){
|
||||||
dword text_col=col.list_gb_text,
|
dword text_col=col.list_gb_text,
|
||||||
ext1, attr,
|
ext1, attr,
|
||||||
file_offet,
|
|
||||||
file_name_off,
|
file_name_off,
|
||||||
file_size=0,
|
file_size=0,
|
||||||
y=filenum*files.item_h+files.y,
|
y=filenum*files.item_h+files.y,
|
||||||
@ -753,9 +739,15 @@ void Line_ReDraw(dword bgcol, filenum){
|
|||||||
BDVK file;
|
BDVK file;
|
||||||
char full_path[4096];
|
char full_path[4096];
|
||||||
dword separator_color;
|
dword separator_color;
|
||||||
|
bool current_inactive = false;
|
||||||
char label_file_name[4096];
|
char label_file_name[4096];
|
||||||
if (filenum==-1) return;
|
if (filenum==-1) return;
|
||||||
|
|
||||||
|
if (bgcol==col.selec) && (files.x==files_inactive.x) {
|
||||||
|
bgcol = col.list_bg;
|
||||||
|
current_inactive = true;
|
||||||
|
}
|
||||||
|
|
||||||
DrawBar(files.x,y,4,files.item_h,bgcol);
|
DrawBar(files.x,y,4,files.item_h,bgcol);
|
||||||
DrawBar(files.x+4,y,icon_size,icon_y-y,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 (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);
|
||||||
@ -769,39 +761,40 @@ void Line_ReDraw(dword bgcol, filenum){
|
|||||||
DrawBar(files.x+files.w-141,y,1,files.item_h, separator_color);
|
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);
|
DrawBar(files.x+files.w-68,y,1,files.item_h, separator_color);
|
||||||
|
|
||||||
file_offet = items.get(filenum+files.first)*304 + buf+32;
|
ESI = items.get(filenum+files.first)*304 + buf+32;
|
||||||
attr = ESDWORD[file_offet];
|
attr = ESDWORD[ESI];
|
||||||
file.selected = ESBYTE[file_offet+7];
|
file.selected = ESBYTE[ESI+7];
|
||||||
file.sizelo = ESDWORD[file_offet+32];
|
file.sizelo = ESDWORD[ESI+32];
|
||||||
file.sizehi = ESDWORD[file_offet+36];
|
file.sizehi = ESDWORD[ESI+36];
|
||||||
file_name_off = file_offet+40;
|
file_name_off = ESI+40;
|
||||||
|
sprintf(#full_path,"%s/%s",path,file_name_off);
|
||||||
|
|
||||||
if (! attr & ATR_FOLDER) //file or folder?
|
if (attr&ATR_FOLDER)
|
||||||
{
|
{
|
||||||
|
if (!strcmp(file_name_off,"..")) ext1="<up>"; else {
|
||||||
|
ext1="<DIR>";
|
||||||
|
WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, col.list_gb_text, ext1);
|
||||||
|
}
|
||||||
|
if (chrnum(path, '/')==1) && (streq(path, "/kolibrios")==false) file_size = GetDeviceSize(#full_path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ext1 = strrchr(file_name_off,'.') + file_name_off;
|
ext1 = strrchr(file_name_off,'.') + file_name_off;
|
||||||
if (ext1==file_name_off) ext1 = NULL; //if no extension then show nothing
|
if (ext1==file_name_off) ext1 = NULL; //if no extension then show nothing
|
||||||
file_size = ConvertSize64(file.sizelo, file.sizehi);
|
file_size = ConvertSize64(file.sizelo, file.sizehi);
|
||||||
if (ext1) && (strlen(ext1)<9) WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, col.list_gb_text, ext1);
|
if (ext1) && (strlen(ext1)<9) WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, col.list_gb_text, ext1);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!strcmp(file_name_off,"..")) ext1="<up>"; else {
|
|
||||||
ext1="<DIR>";
|
|
||||||
WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, col.list_gb_text, ext1);
|
|
||||||
}
|
|
||||||
if (chrnum(#path, '/')==1) && (streq(#path, "/kolibrios")==false) file_size = GetDeviceSizeLabel(#full_path);
|
|
||||||
}
|
|
||||||
if (file_size) WriteText(7-strlen(file_size)*6+files.x+files.w-58,
|
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);
|
files.text_y+y+1, files.font_type, col.list_gb_text, file_size);
|
||||||
|
|
||||||
if (attr&2) || (attr&4) text_col=col.list_text_hidden; //system or hiden?
|
if (attr&ATR_HIDDEN) || (attr&ATR_SYSTEM) text_col=col.list_text_hidden;
|
||||||
if (bgcol==col.selec)
|
if (bgcol==col.selec)
|
||||||
{
|
{
|
||||||
file_name_is_8_3(file_name_off);
|
file_name_is_8_3(file_name_off);
|
||||||
itdir = attr & ATR_FOLDER;
|
itdir = attr & ATR_FOLDER;
|
||||||
strcpy(#file_name, file_name_off);
|
strcpy(#file_name, file_name_off);
|
||||||
if (!strcmp(#path,"/")) sprintf(#file_path,"%s%s",#path,file_name_off);
|
if (streq(path,"/")) sprintf(#file_path,"%s%s",path,file_name_off);
|
||||||
else sprintf(#file_path,"%s/%s",#path,file_name_off);
|
else sprintf(#file_path,"%s/%s",path,file_name_off);
|
||||||
if (text_col==col.list_text_hidden) {
|
if (text_col==col.list_text_hidden) {
|
||||||
text_col=MixColors(col.selec_text, col.list_text_hidden, 65);
|
text_col=MixColors(col.selec_text, col.list_text_hidden, 65);
|
||||||
} else text_col=col.selec_text;
|
} else text_col=col.selec_text;
|
||||||
@ -822,6 +815,7 @@ void Line_ReDraw(dword bgcol, filenum){
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//that shit must be it a library
|
||||||
strcpy(#label_file_name, file_name_off);
|
strcpy(#label_file_name, file_name_off);
|
||||||
if (kfont.getsize(kfont.size.pt, #label_file_name) + 141 + 26 > files.w)
|
if (kfont.getsize(kfont.size.pt, #label_file_name) + 141 + 26 > files.w)
|
||||||
{
|
{
|
||||||
@ -833,10 +827,8 @@ void Line_ReDraw(dword bgcol, filenum){
|
|||||||
kfont.WriteIntoWindow(files.x + icon_size+7, files.item_h - kfont.height / 2 + y,
|
kfont.WriteIntoWindow(files.x + icon_size+7, files.item_h - kfont.height / 2 + y,
|
||||||
bgcol, text_col, kfont.size.pt, #label_file_name);
|
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, col.selec_active);
|
|
||||||
|
|
||||||
sprintf(#full_path,"%s/%s",#path,file_name_off);
|
|
||||||
DrawIconByExtension(#full_path, ext1, files.x+4, icon_y, bgcol);
|
DrawIconByExtension(#full_path, ext1, files.x+4, icon_y, bgcol);
|
||||||
|
if (current_inactive) DrawWideRectangle(files.x+2, y, files.w-4, files.item_h, 2, col.selec_active);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -848,24 +840,24 @@ void Open_Dir(dword dir_path, redraw){
|
|||||||
errornum = GetDir(#buf, #files.count, dir_path, DIRS_NOROOT);
|
errornum = GetDir(#buf, #files.count, dir_path, DIRS_NOROOT);
|
||||||
if (errornum)
|
if (errornum)
|
||||||
{
|
{
|
||||||
history.add(#path);
|
history.add(path);
|
||||||
EventHistoryGoBack();
|
EventHistoryGoBack();
|
||||||
Write_Error(errornum);
|
Write_Error(errornum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
|
if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
|
||||||
|
|
||||||
history.add(#path);
|
|
||||||
SystemDiscs.Draw();
|
SystemDiscs.Draw();
|
||||||
files.visible = files.h / files.item_h;
|
files.visible = files.h / files.item_h;
|
||||||
if (files.count < files.visible) files.visible = files.count;
|
if (files.count < files.visible) files.visible = files.count;
|
||||||
if (!strncmp(dir_path, "/rd/1/",5)) || (!strncmp(dir_path, "/sys/",4))
|
if (!strncmp(dir_path, "/rd/1",5)) || (!strncmp(dir_path, "/sys/",4))
|
||||||
dir_at_fat16 = true; else dir_at_fat16 = false;
|
dir_at_fat16 = true; else dir_at_fat16 = false;
|
||||||
Sorting();
|
Sorting();
|
||||||
list_full_redraw = true;
|
list_full_redraw = true;
|
||||||
SetCurDir(dir_path);
|
SetCurDir(dir_path);
|
||||||
DrawPathBar();
|
DrawPathBar();
|
||||||
if (redraw!=ONLY_OPEN) {
|
if (redraw!=ONLY_OPEN) {
|
||||||
|
history.add(path);
|
||||||
List_ReDraw();
|
List_ReDraw();
|
||||||
DrawStatusBar();
|
DrawStatusBar();
|
||||||
}
|
}
|
||||||
@ -879,7 +871,7 @@ inline Sorting()
|
|||||||
|
|
||||||
items.drop();
|
items.drop();
|
||||||
|
|
||||||
if (!strcmp(#path,"/")) //do not sort root folder
|
if (streq(path,"/")) //do not sort root folder
|
||||||
{
|
{
|
||||||
for(d=1;d<files.count;d++;) items.set(d, d);
|
for(d=1;d<files.count;d++;) items.set(d, d);
|
||||||
folder_count = d;
|
folder_count = d;
|
||||||
@ -952,7 +944,7 @@ void SelectFileByName(dword that_file)
|
|||||||
{
|
{
|
||||||
int ind;
|
int ind;
|
||||||
files.KeyHome();
|
files.KeyHome();
|
||||||
Open_Dir(#path,ONLY_OPEN);
|
Open_Dir(path,ONLY_OPEN);
|
||||||
if (dir_at_fat16) && (file_name_is_8_3(that_file)) strttl(that_file);
|
if (dir_at_fat16) && (file_name_is_8_3(that_file)) strttl(that_file);
|
||||||
for (ind=files.count-1; ind>=0; ind--;) { if (!strcmpi(items.get(ind)*304+buf+72,that_file)) break; }
|
for (ind=files.count-1; ind>=0; ind--;) { if (!strcmpi(items.get(ind)*304+buf+72,that_file)) break; }
|
||||||
files.cur_y = ind - 1;
|
files.cur_y = ind - 1;
|
||||||
@ -966,11 +958,11 @@ void Dir_Up()
|
|||||||
{
|
{
|
||||||
int iii;
|
int iii;
|
||||||
char old_folder_name[4096];
|
char old_folder_name[4096];
|
||||||
iii=strlen(#path)-1;
|
iii=strlen(path)-1;
|
||||||
if (iii==0) return;
|
if (iii==0) return;
|
||||||
iii = strrchr(#path, '/');
|
iii = strrchr(path, '/');
|
||||||
strcpy(#old_folder_name, #path+iii);
|
strcpy(#old_folder_name, path+iii);
|
||||||
if (iii>1) path[iii-1]=NULL; else path[iii]=NULL;
|
if (iii>1) ESBYTE[path+iii-1]=NULL; else ESBYTE[path+iii]=NULL;
|
||||||
SelectFileByName(#old_folder_name);
|
SelectFileByName(#old_folder_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -980,7 +972,7 @@ void EventOpenSelected()
|
|||||||
for (i=0; i<files.count; i++) if (getElementSelectedFlag(i)) {
|
for (i=0; i<files.count; i++) if (getElementSelectedFlag(i)) {
|
||||||
EDX = items.get(i)*304 + buf+32;
|
EDX = items.get(i)*304 + buf+32;
|
||||||
if (ESDWORD[EDX]&ATR_FOLDER) continue; //is foder
|
if (ESDWORD[EDX]&ATR_FOLDER) continue; //is foder
|
||||||
sprintf(#param,"%s/%s",#path, EDX+40);
|
sprintf(#param,"%s/%s",path, EDX+40);
|
||||||
RunProgram("/sys/@open", #param);
|
RunProgram("/sys/@open", #param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1002,18 +994,18 @@ void EventOpen(byte _new_window)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!strncmp(#file_name,"..",3)) { Dir_Up(); return; }
|
if (!strncmp(#file_name,"..",3)) { Dir_Up(); return; }
|
||||||
strcpy(#path, #file_path);
|
strcpy(path, #file_path);
|
||||||
files.first=files.cur_y=0;
|
files.first=files.cur_y=0;
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fastcall void EventHistoryGoBack()
|
inline fastcall void EventHistoryGoBack()
|
||||||
{
|
{
|
||||||
char cur_folder[4096];
|
char cur_folder[4096];
|
||||||
strcpy(#cur_folder, #path);
|
strcpy(#cur_folder, path);
|
||||||
if (history.back()) {
|
if (history.back()) {
|
||||||
strcpy(#path, history.current());
|
strcpy(path, history.current());
|
||||||
SelectFileByName(#cur_folder+strrchr(#cur_folder,'/'));
|
SelectFileByName(#cur_folder+strrchr(#cur_folder,'/'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1030,7 +1022,7 @@ void NewElement()
|
|||||||
BDVK element_info;
|
BDVK element_info;
|
||||||
byte copy_result, info_result;
|
byte copy_result, info_result;
|
||||||
|
|
||||||
sprintf(#temp,"%s/%s",#path,new_file_ed.text);
|
sprintf(#temp,"%s/%s",path,new_file_ed.text);
|
||||||
info_result = GetFileInfo(#temp, #element_info);
|
info_result = GetFileInfo(#temp, #element_info);
|
||||||
switch(new_element_active)
|
switch(new_element_active)
|
||||||
{
|
{
|
||||||
@ -1078,7 +1070,7 @@ void NewElement()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
SelectFileByName(new_file_ed.text);
|
SelectFileByName(new_file_ed.text);
|
||||||
EventClosePopinForm();
|
EventClosePopinForm();
|
||||||
}
|
}
|
||||||
@ -1126,7 +1118,7 @@ void FnProcess(byte N)
|
|||||||
case 5:
|
case 5:
|
||||||
if (efm) {
|
if (efm) {
|
||||||
CopyFilesListToClipboard(COPY);
|
CopyFilesListToClipboard(COPY);
|
||||||
EventPaste(#inactive_path);
|
EventPaste(location[active_panel^1]);
|
||||||
} else {
|
} else {
|
||||||
EventManualFolderRefresh();
|
EventManualFolderRefresh();
|
||||||
}
|
}
|
||||||
@ -1134,7 +1126,7 @@ void FnProcess(byte N)
|
|||||||
case 6:
|
case 6:
|
||||||
if (efm) {
|
if (efm) {
|
||||||
CopyFilesListToClipboard(CUT);
|
CopyFilesListToClipboard(CUT);
|
||||||
EventPaste(#inactive_path);
|
EventPaste(location[active_panel^1]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
@ -1147,15 +1139,11 @@ void FnProcess(byte N)
|
|||||||
NewElement_Form(CREATE_FILE, T_NEW_FILE);
|
NewElement_Form(CREATE_FILE, T_NEW_FILE);
|
||||||
break;
|
break;
|
||||||
case 10: //F10
|
case 10: //F10
|
||||||
if (!active_settings)
|
if (active_settings) {
|
||||||
{
|
ActivateWindow(GetProcessSlot(settings_window));
|
||||||
|
} else {
|
||||||
settings_stak = malloc(4096);
|
settings_stak = malloc(4096);
|
||||||
settings_window = CreateThread(#settings_dialog, settings_stak+4092);
|
settings_window = CreateThread(#settings_dialog, settings_stak+4092);
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ActivateWindow(GetProcessSlot(settings_window));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1167,8 +1155,8 @@ void SetActivePanel(int _active)
|
|||||||
active_panel = _active;
|
active_panel = _active;
|
||||||
llist_copy(#files_active, #files_inactive);
|
llist_copy(#files_active, #files_inactive);
|
||||||
llist_copy(#files_inactive, #files);
|
llist_copy(#files_inactive, #files);
|
||||||
strcpy(#active_path, #inactive_path);
|
llist_copy(#files, #files_active);
|
||||||
strcpy(#inactive_path, #path);
|
path = location[active_panel];
|
||||||
DrawFilePanels();
|
DrawFilePanels();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1189,13 +1177,13 @@ void EventSelectFileByKeyPress()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dword GetDeviceSizeLabel(dword path)
|
dword GetDeviceSize(dword p)
|
||||||
{
|
{
|
||||||
BDVK bdvk;
|
BDVK bdvk;
|
||||||
if (ESBYTE[path+1] == '/') path++;
|
if (ESBYTE[p+1] == '/') p++;
|
||||||
if (ESBYTE[path+1] == 'c') && (ESBYTE[path+2] == 'd')
|
if (ESBYTE[p+1] == 'c') && (ESBYTE[p+2] == 'd')
|
||||||
&& (ESBYTE[path+4] == 0) return 0;
|
&& (ESBYTE[p+4] == 0) return 0;
|
||||||
GetFileInfo(path, #bdvk);
|
GetFileInfo(p, #bdvk);
|
||||||
return ConvertSize64(bdvk.sizelo, bdvk.sizehi);
|
return ConvertSize64(bdvk.sizelo, bdvk.sizehi);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1213,7 +1201,7 @@ int GetRealFileCountInFolder(dword folder_path)
|
|||||||
void EventRefreshDisksAndFolders()
|
void EventRefreshDisksAndFolders()
|
||||||
{
|
{
|
||||||
if(efm) {
|
if(efm) {
|
||||||
if (GetRealFileCountInFolder(#inactive_path) != files_inactive.count) {
|
if (GetRealFileCountInFolder(location[active_panel^1]) != files_inactive.count) {
|
||||||
DrawFilePanels();
|
DrawFilePanels();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1223,7 +1211,7 @@ void EventRefreshDisksAndFolders()
|
|||||||
DrawDeviceAndActionsLeftPanel();
|
DrawDeviceAndActionsLeftPanel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(GetRealFileCountInFolder(#path) != files.count) Open_Dir(#path,WITH_REDRAW);
|
if(GetRealFileCountInFolder(path) != files.count) Open_Dir(path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventManualFolderRefresh()
|
void EventManualFolderRefresh()
|
||||||
@ -1241,27 +1229,27 @@ void EventSort(dword id)
|
|||||||
else sort_type = id;
|
else sort_type = id;
|
||||||
strcpy(#selected_filename, #file_name);
|
strcpy(#selected_filename, #file_name);
|
||||||
DrawButtonsAroundList();
|
DrawButtonsAroundList();
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
SelectFileByName(#selected_filename);
|
SelectFileByName(#selected_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventHistoryGoForward()
|
void EventHistoryGoForward()
|
||||||
{
|
{
|
||||||
if (history.forward()) {
|
if (history.forward()) {
|
||||||
strcpy(#path, history.current());
|
strcpy(path, history.current());
|
||||||
files.KeyHome();
|
files.KeyHome();
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventOpenNewEolite()
|
void EventOpenNewEolite()
|
||||||
{
|
{
|
||||||
RunProgram(I_Path, #path);
|
RunProgram(I_Path, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventOpenConsoleHere()
|
void EventOpenConsoleHere()
|
||||||
{
|
{
|
||||||
sprintf(#param, "pwd cd %s", #path);
|
sprintf(#param, "pwd cd %s", path);
|
||||||
RunProgram("/sys/shell", #param);
|
RunProgram("/sys/shell", #param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1374,7 +1362,7 @@ void EventToolbarButtonClick(int _btid)
|
|||||||
case GOUP_BTN: Dir_Up(); break;
|
case GOUP_BTN: Dir_Up(); break;
|
||||||
case COPY_BTN: CopyFilesListToClipboard(CUT); break;
|
case COPY_BTN: CopyFilesListToClipboard(CUT); break;
|
||||||
case CUT_BTN: CopyFilesListToClipboard(COPY); break;
|
case CUT_BTN: CopyFilesListToClipboard(COPY); break;
|
||||||
case PASTE_BTN:EventPaste(#path); break;
|
case PASTE_BTN:EventPaste(path); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1391,10 +1379,10 @@ void EventOpenDiskPopin(int panel_n)
|
|||||||
DefineHiddenButton(0,0,5000,3000,9999+BT_NOFRAME);
|
DefineHiddenButton(0,0,5000,3000,9999+BT_NOFRAME);
|
||||||
if (panel_n==0) {
|
if (panel_n==0) {
|
||||||
disk_popin_active_on_panel = 1;
|
disk_popin_active_on_panel = 1;
|
||||||
SystemDiscs.DrawOptions(Form.cwidth/2-DDW, 8+DEV_H_HOR+3);
|
SystemDiscs.DrawOptions(Form.cwidth/2-DDW);
|
||||||
} else {
|
} else {
|
||||||
disk_popin_active_on_panel = 2;
|
disk_popin_active_on_panel = 2;
|
||||||
SystemDiscs.DrawOptions(Form.cwidth-DDW-2, 8+DEV_H_HOR+3);
|
SystemDiscs.DrawOptions(Form.cwidth-DDW-2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,4 +3,4 @@ if tup.getconfig("LANG") == "ru"
|
|||||||
then C_LANG = "LANG_RUS"
|
then C_LANG = "LANG_RUS"
|
||||||
else C_LANG = "LANG_ENG" -- this includes default case without config
|
else C_LANG = "LANG_ENG" -- this includes default case without config
|
||||||
end
|
end
|
||||||
tup.rule("Eolite.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "Eolite.com")
|
tup.rule("Eolite.c", "c-- /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "Eolite.com")
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//===================================================//
|
//===================================================//
|
||||||
|
|
||||||
char work_area_pointer[1024];
|
char work_area_pointer[1024];
|
||||||
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x000000, 0xFFFFCC, #path, #work_area_pointer, 0};
|
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x000000, 0xFFFFCC, NULL, #work_area_pointer, 0};
|
||||||
void DrawPathBar()
|
void DrawPathBar()
|
||||||
{
|
{
|
||||||
if (efm) {
|
if (efm) {
|
||||||
@ -19,6 +19,7 @@ void DrawPathBar()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PathShow.text_pointer = location[0];
|
||||||
PathShow.start_x = 250;
|
PathShow.start_x = 250;
|
||||||
PathShow.start_y = 17;
|
PathShow.start_y = 17;
|
||||||
PathShow.area_size_x = Form.cwidth-300;
|
PathShow.area_size_x = Form.cwidth-300;
|
||||||
@ -47,35 +48,27 @@ void DrawPathBarKfm()
|
|||||||
bgc = 0xFFFFCC;
|
bgc = 0xFFFFCC;
|
||||||
PathShow.font_color = 0x222222;
|
PathShow.font_color = 0x222222;
|
||||||
}
|
}
|
||||||
if (active_panel==0) PathShow.text_pointer = #path; else PathShow.text_pointer = #inactive_path;
|
|
||||||
PathShow.start_x = 4;
|
|
||||||
PathShow.area_size_x = Form.cwidth/2-8;
|
|
||||||
PathShow.start_y = Form.cheight - status_bar_h+2;
|
PathShow.start_y = Form.cheight - status_bar_h+2;
|
||||||
|
|
||||||
_DRAW_BAR:
|
PathShow.start_x = 4;
|
||||||
DrawBar(PathShow.start_x-2,PathShow.start_y-3,PathShow.area_size_x+5,14,bgc);
|
PathShow.area_size_x = Form.cwidth/2-8;
|
||||||
DrawRectangle(PathShow.start_x-3,PathShow.start_y-4,PathShow.area_size_x+6,15,sc.work_graph);
|
do {
|
||||||
PathShow_prepare stdcall(#PathShow);
|
DrawBar(PathShow.start_x-2,PathShow.start_y-3,PathShow.area_size_x+5,14,bgc);
|
||||||
PathShow_draw stdcall(#PathShow);
|
DrawRectangle(PathShow.start_x-3,PathShow.start_y-4,PathShow.area_size_x+6,15,sc.work_graph);
|
||||||
i++;
|
PathShow.text_pointer = location[i];
|
||||||
if (i<2) {
|
PathShow_prepare stdcall(#PathShow);
|
||||||
if (active_panel==0) PathShow.text_pointer = #inactive_path; else PathShow.text_pointer = #path;
|
PathShow_draw stdcall(#PathShow);
|
||||||
|
|
||||||
PathShow.start_x = Form.cwidth/2 + 2;
|
PathShow.start_x = Form.cwidth/2 + 2;
|
||||||
PathShow.area_size_x = Form.cwidth - PathShow.start_x - 5;
|
PathShow.area_size_x = Form.cwidth - PathShow.start_x - 5;
|
||||||
goto _DRAW_BAR;
|
i++;
|
||||||
}
|
} while (i<2);
|
||||||
|
|
||||||
DrawBar(0,PathShow.start_y-2,1,15,sc.work);
|
DrawBar(0,PathShow.start_y-2,1,15,sc.work);
|
||||||
DrawBar(Form.cwidth-1,PathShow.start_y-2,1,15,sc.work);
|
DrawBar(Form.cwidth-1,PathShow.start_y-2,1,15,sc.work);
|
||||||
DrawBar(1,PathShow.start_y+12,Form.cwidth-2,1,sc.work_light);
|
DrawBar(1,PathShow.start_y+12,Form.cwidth-2,1,sc.work_light);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawPathBarKfm_Line()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//===================================================//
|
//===================================================//
|
||||||
// //
|
// //
|
||||||
// BREADCRUMBS //
|
// BREADCRUMBS //
|
||||||
@ -89,7 +82,7 @@ void DrawBreadCrumbs()
|
|||||||
int i;
|
int i;
|
||||||
unsigned text_line;
|
unsigned text_line;
|
||||||
{
|
{
|
||||||
strcat(#PathShow_path, #path);
|
strcat(#PathShow_path, path);
|
||||||
for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID);
|
for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID);
|
||||||
breadCrumb.drop();
|
breadCrumb.drop();
|
||||||
for (i=0; (PathShow_path[i]) && (i<sizeof(PathShow_path)-1); i++)
|
for (i=0; (PathShow_path[i]) && (i<sizeof(PathShow_path)-1); i++)
|
||||||
@ -118,12 +111,12 @@ void DrawBreadCrumbs()
|
|||||||
|
|
||||||
void ClickOnBreadCrumb(unsigned clickid)
|
void ClickOnBreadCrumb(unsigned clickid)
|
||||||
{
|
{
|
||||||
int i, slashpos = #path;
|
int i, slashpos = path;
|
||||||
for (i=0; i!=clickid+2; i++) {
|
for (i=0; i!=clickid+2; i++) {
|
||||||
slashpos=strchr(slashpos,'/')+1;
|
slashpos=strchr(slashpos,'/')+1;
|
||||||
}
|
}
|
||||||
ESBYTE[slashpos-1] = NULL;
|
ESBYTE[slashpos-1] = NULL;
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,31 +1,37 @@
|
|||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
?define T_FILE "” ©«"
|
//===================================================//
|
||||||
?define T_TYPE "’¨¯"
|
// //
|
||||||
?define T_SIZE "<EFBFBD> §¬¥à"
|
// CYRILLIC //
|
||||||
?define T_NEW_FOLDER "<EFBFBD>®¢ ï ¯ ¯ª "
|
// //
|
||||||
?define T_NEW_FILE "<EFBFBD>®¢ë© ä ©«"
|
//===================================================//
|
||||||
?define T_DELETE_FILE "‚ë ¤¥©áâ¢¨â¥«ì® å®â¨â¥ 㤠«¨âì"
|
#define T_FILE "” ©«"
|
||||||
?define T_YES "„ "
|
#define T_TYPE "’¨¯"
|
||||||
?define T_NO "<EFBFBD>¥â"
|
#define T_SIZE "<22> §¬¥à"
|
||||||
?define T_CANCEL "Žâ¬¥ "
|
#define T_NEW_FOLDER "<22>®¢ ï ¯ ¯ª "
|
||||||
?define T_CREATE "‘®§¤ âì"
|
#define T_NEW_FILE "<22>®¢ë© ä ©«"
|
||||||
?define T_RENAME "<EFBFBD>¥à¥ §¢ âì"
|
#define T_DELETE_FILE "‚ë ¤¥©áâ¢¨â¥«ì® å®â¨â¥ 㤠«¨âì"
|
||||||
?define FS_ITEM_ALREADY_EXISTS "'<27>«¥¬¥â á â ª¨¬ ¨¬¥¥¬ 㦥 áãé¥áâ¢ã¥â' -E"
|
#define T_YES "„ "
|
||||||
?define NOT_CREATE_FOLDER "'<27>¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã.' -E"
|
#define T_NO "<22>¥â"
|
||||||
?define NOT_CREATE_FILE "'<27>¥ 㤠«®áì ᮧ¤ âì ä ©«.' -E"
|
#define T_CANCEL "Žâ¬¥ "
|
||||||
?define T_NOTIFY_APP_PARAM_WRONG "'<27> à ¬¥âà ¤«ï § ¯ã᪠Eolite ¥ ¢¥à¥: ¯ ¯ª ¥ áãé¥áâ¢ã¥â!' -E"
|
#define T_CREATE "‘®§¤ âì"
|
||||||
?define T_COPY_WINDOW_TITLE "Š®¯¨àãî..."
|
#define T_RENAME "<22>¥à¥ §¢ âì"
|
||||||
?define T_MOVE_WINDOW_TITLE "<EFBFBD>¥à¥¬¥é î..."
|
#define FS_ITEM_ALREADY_EXISTS "'<27>«¥¬¥â á â ª¨¬ ¨¬¥¥¬ 㦥 áãé¥áâ¢ã¥â' -E"
|
||||||
?define T_DELETE_WINDOW_TITLE "“¤ «ïî..."
|
#define NOT_CREATE_FOLDER "'<27>¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã.' -E"
|
||||||
?define T_ABORT_WINDOW_BUTTON "<EFBFBD>à¥à¢ âì"
|
#define NOT_CREATE_FILE "'<27>¥ 㤠«®áì ᮧ¤ âì ä ©«.' -E"
|
||||||
?define T_SELECT_APP_TO_OPEN_WITH "‚ë¡¥à¨â¥ ¯à®£à ¬¬ã ¤«ï ®âªàëâ¨ï ä ©« "
|
#define T_NOTIFY_APP_PARAM_WRONG "'<27> à ¬¥âà ¤«ï § ¯ã᪠Eolite ¥ ¢¥à¥: ¯ ¯ª ¥ áãé¥áâ¢ã¥â!' -E"
|
||||||
?define DEL_MORE_FILES_1 "¢ë¡à ë¥ í«¥¬¥âë ("
|
#define T_COPY_WINDOW_TITLE "Š®¯¨àãî..."
|
||||||
?define DEL_MORE_FILES_2 " èâ.)?"
|
#define T_MOVE_WINDOW_TITLE "<22>¥à¥¬¥é î..."
|
||||||
?define T_STATUS_EVEMENTS "<EFBFBD> ¯®ª: %d ” ©«®¢: %d"
|
#define T_DELETE_WINDOW_TITLE "“¤ «ïî..."
|
||||||
?define T_STATUS_SELECTED "‚뤥«¥®: %d"
|
#define T_ABORT_WINDOW_BUTTON "<22>à¥à¢ âì"
|
||||||
?define COPY_PATH_STR "'<27>ãâì ¯ ¯ª¨ ᪮¯¨à®¢ ¢ ¡ãä¥à ®¡¬¥ ' -I"
|
#define T_SELECT_APP_TO_OPEN_WITH "‚ë¡¥à¨â¥ ¯à®£à ¬¬ã ¤«ï ®âªàëâ¨ï ä ©« "
|
||||||
?define T_ABOUT "Ž ¯à®£à ¬¬¥"
|
#define DEL_MORE_FILES_1 "¢ë¡à ë¥ í«¥¬¥âë ("
|
||||||
?define T_USE_SHIFT_ENTER "'ˆá¯®«ì§ã©â¥ Shift+Enter çâ®¡ë ®âªàëâì ¢á¥ ¢ë¤¥«¥ë¥ ä ©«ë.' -I"
|
#define DEL_MORE_FILES_2 " èâ.)?"
|
||||||
|
#define T_STATUS_EVEMENTS "<22> ¯®ª: %d ” ©«®¢: %d"
|
||||||
|
#define T_STATUS_SELECTED "‚뤥«¥®: %d"
|
||||||
|
#define COPY_PATH_STR "'<27>ãâì ¯ ¯ª¨ ᪮¯¨à®¢ ¢ ¡ãä¥à ®¡¬¥ ' -I"
|
||||||
|
#define T_ABOUT "Ž ¯à®£à ¬¬¥"
|
||||||
|
#define T_USE_SHIFT_ENTER "'ˆá¯®«ì§ã©â¥ Shift+Enter çâ®¡ë ®âªàëâì ¢á¥ ¢ë¤¥«¥ë¥ ä ©«ë.' -I"
|
||||||
|
|
||||||
char *kfm_func = {
|
char *kfm_func = {
|
||||||
"ˆä®",
|
"ˆä®",
|
||||||
"<EFBFBD>¥à¥¨¬¥.",
|
"<EFBFBD>¥à¥¨¬¥.",
|
||||||
@ -38,35 +44,59 @@ char *kfm_func = {
|
|||||||
"” ©«",
|
"” ©«",
|
||||||
" <20> áâனª¨"
|
" <20> áâனª¨"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define T_DEVICES "“áâனá⢠"
|
||||||
|
#define T_ACTIONS "„¥©á⢨ï"
|
||||||
|
char *actions[] = {
|
||||||
|
59, "<EFBFBD>®¢ë© ä ©«", "F9",
|
||||||
|
57, "<EFBFBD>®¢ ï ¯ ¯ª ", "F7",
|
||||||
|
60, "<EFBFBD> áâனª¨", "F10",
|
||||||
|
0,0,0
|
||||||
|
};
|
||||||
|
#define T_PROG "<22>à®£à ¬¬ë "
|
||||||
|
#define T_SYS "‘¨á⥬ "
|
||||||
|
#define T_CD "CD-ROM "
|
||||||
|
#define T_FD "„¨áª¥â "
|
||||||
|
#define T_HD "†¥á⪨© ¤¨áª "
|
||||||
|
#define T_SATA "SATA ¤¨áª "
|
||||||
|
#define T_USB "USB ¤¨áª "
|
||||||
|
#define T_RAM "RAM ¤¨áª "
|
||||||
|
#define T_UNC "<22>¥¨§¢¥áâ® "
|
||||||
#else
|
#else
|
||||||
?define T_FILE "File"
|
//===================================================//
|
||||||
?define T_TYPE "Type"
|
// //
|
||||||
?define T_SIZE "Size"
|
// ENGLISH //
|
||||||
?define T_NEW_FOLDER "New folder"
|
// //
|
||||||
?define T_NEW_FILE "New file"
|
//===================================================//
|
||||||
?define T_DELETE_FILE "Do you really want to delete"
|
#define T_FILE "File"
|
||||||
?define T_YES "Yes"
|
#define T_TYPE "Type"
|
||||||
?define T_NO "No"
|
#define T_SIZE "Size"
|
||||||
?define T_CANCEL "Cancel"
|
#define T_NEW_FOLDER "New folder"
|
||||||
?define T_CREATE "Create"
|
#define T_NEW_FILE "New file"
|
||||||
?define T_RENAME "Rename"
|
#define T_DELETE_FILE "Do you really want to delete"
|
||||||
?define FS_ITEM_ALREADY_EXISTS "'An item with that name already exists' -E"
|
#define T_YES "Yes"
|
||||||
?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
|
#define T_NO "No"
|
||||||
?define NOT_CREATE_FOLDER "'Folder can not be created.' -E"
|
#define T_CANCEL "Cancel"
|
||||||
?define NOT_CREATE_FILE "'File can not be created.' -E"
|
#define T_CREATE "Create"
|
||||||
?define T_NOTIFY_APP_PARAM_WRONG "'Eolite param is wrong: directory does not exist!' -E"
|
#define T_RENAME "Rename"
|
||||||
?define T_COPY_WINDOW_TITLE "Copying..."
|
#define FS_ITEM_ALREADY_EXISTS "'An item with that name already exists' -E"
|
||||||
?define T_MOVE_WINDOW_TITLE "Moving..."
|
#define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
|
||||||
?define T_DELETE_WINDOW_TITLE "Deleting..."
|
#define NOT_CREATE_FOLDER "'Folder can not be created.' -E"
|
||||||
?define T_ABORT_WINDOW_BUTTON "Abort"
|
#define NOT_CREATE_FILE "'File can not be created.' -E"
|
||||||
?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
|
#define T_NOTIFY_APP_PARAM_WRONG "'Eolite param is wrong: directory does not exist!' -E"
|
||||||
?define DEL_MORE_FILES_1 "selected items("
|
#define T_COPY_WINDOW_TITLE "Copying..."
|
||||||
?define DEL_MORE_FILES_2 " pcs.)?"
|
#define T_MOVE_WINDOW_TITLE "Moving..."
|
||||||
?define T_STATUS_EVEMENTS "Dirs: %d Files: %d"
|
#define T_DELETE_WINDOW_TITLE "Deleting..."
|
||||||
?define T_STATUS_SELECTED "Selected: %d"
|
#define T_ABORT_WINDOW_BUTTON "Abort"
|
||||||
?define COPY_PATH_STR "'Directory path copied to clipboard' -I"
|
#define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
|
||||||
?define T_ABOUT "About"
|
#define DEL_MORE_FILES_1 "selected items("
|
||||||
?define T_USE_SHIFT_ENTER "'Use Shift+Enter to open all selected files.' -I"
|
#define DEL_MORE_FILES_2 " pcs.)?"
|
||||||
|
#define T_STATUS_EVEMENTS "Dirs: %d Files: %d"
|
||||||
|
#define T_STATUS_SELECTED "Selected: %d"
|
||||||
|
#define COPY_PATH_STR "'Directory path copied to clipboard' -I"
|
||||||
|
#define T_ABOUT "About"
|
||||||
|
#define T_USE_SHIFT_ENTER "'Use Shift+Enter to open all selected files.' -I"
|
||||||
|
|
||||||
char *kfm_func = {
|
char *kfm_func = {
|
||||||
"Info",
|
"Info",
|
||||||
"Rename",
|
"Rename",
|
||||||
@ -79,8 +109,45 @@ char *kfm_func = {
|
|||||||
"File",
|
"File",
|
||||||
" Settings"
|
" Settings"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define T_DEVICES "Devices"
|
||||||
|
#define T_ACTIONS "Actions"
|
||||||
|
char *actions[] = {
|
||||||
|
59, "New file", "F9",
|
||||||
|
57, "New folder", "F7",
|
||||||
|
60, "Settings", "F10",
|
||||||
|
0,0,0
|
||||||
|
};
|
||||||
|
#define T_PROG "Programs "
|
||||||
|
#define T_SYS "System "
|
||||||
|
#define T_CD "CD-ROM "
|
||||||
|
#define T_FD "Floppy disk "
|
||||||
|
#define T_HD "Hard disk "
|
||||||
|
#define T_SATA "SATA disk "
|
||||||
|
#define T_USB "USB disk "
|
||||||
|
#define T_RAM "RAM disk "
|
||||||
|
#define T_UNC "Unknown "
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//===================================================//
|
||||||
|
// //
|
||||||
|
// GLOBAL //
|
||||||
|
// //
|
||||||
|
//===================================================//
|
||||||
|
|
||||||
|
char *devinfo = {
|
||||||
|
"r", 0, T_SYS,
|
||||||
|
"k", 1, T_PROG,
|
||||||
|
"f", 2, T_FD,
|
||||||
|
"c", 3, T_CD,
|
||||||
|
"h", 4, T_HD,
|
||||||
|
"b", 4, T_HD,
|
||||||
|
"s", 4, T_SATA,
|
||||||
|
"t", 5, T_RAM,
|
||||||
|
"u", 6, T_USB,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
//Button IDs
|
//Button IDs
|
||||||
enum {
|
enum {
|
||||||
PATH_BTN = 10,
|
PATH_BTN = 10,
|
||||||
|
@ -70,7 +70,7 @@ void CopyFilesListToClipboard(bool _cut_active)
|
|||||||
for (i=0; i<files.count; i++)
|
for (i=0; i<files.count; i++)
|
||||||
{
|
{
|
||||||
if (getElementSelectedFlag(i) == true) {
|
if (getElementSelectedFlag(i) == true) {
|
||||||
sprintf(#copy_t,"%s/%s",#path,items.get(i)*304+buf+72);
|
sprintf(#copy_t,"%s/%s",path,items.get(i)*304+buf+72);
|
||||||
path_len = strlen(#copy_t);
|
path_len = strlen(#copy_t);
|
||||||
size_buf += path_len + 1;
|
size_buf += path_len + 1;
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ void CopyFilesListToClipboard(bool _cut_active)
|
|||||||
for (i=0; i<files.count; i++)
|
for (i=0; i<files.count; i++)
|
||||||
{
|
{
|
||||||
if (getElementSelectedFlag(i) == true) {
|
if (getElementSelectedFlag(i) == true) {
|
||||||
sprintf(copy_buf_offset,"%s/%s",#path,items.get(i)*304+buf+72);
|
sprintf(copy_buf_offset,"%s/%s",path,items.get(i)*304+buf+72);
|
||||||
copy_buf_offset += strlen(copy_buf_offset) + 1;
|
copy_buf_offset += strlen(copy_buf_offset) + 1;
|
||||||
|
|
||||||
if (cut_active) {
|
if (cut_active) {
|
||||||
@ -123,7 +123,7 @@ void PasteThread()
|
|||||||
|
|
||||||
if (cut_active) {
|
if (cut_active) {
|
||||||
for (j = 0; j < paste_elements_count; j++) {
|
for (j = 0; j < paste_elements_count; j++) {
|
||||||
sprintf(#copy_to, "%s/%s", #path, path_offset+strrchr(path_offset,'/'));
|
sprintf(#copy_to, "%s/%s", path, path_offset+strrchr(path_offset,'/'));
|
||||||
slash_count = 0;
|
slash_count = 0;
|
||||||
for (i=0; i<=10; i++) {
|
for (i=0; i<=10; i++) {
|
||||||
if (copy_to[i]=='/') slash_count++;
|
if (copy_to[i]=='/') slash_count++;
|
||||||
@ -148,11 +148,11 @@ _DIFFERENT_DRIVES:
|
|||||||
for (j = 0; j < paste_elements_count; j++) {
|
for (j = 0; j < paste_elements_count; j++) {
|
||||||
strcpy(#copy_from, path_offset);
|
strcpy(#copy_from, path_offset);
|
||||||
if (!copy_from) DialogExit();
|
if (!copy_from) DialogExit();
|
||||||
sprintf(#copy_to, "%s/%s", #path, #copy_from+strrchr(#copy_from,'/'));
|
sprintf(#copy_to, "%s/%s", path, #copy_from+strrchr(#copy_from,'/'));
|
||||||
if (streq(#copy_from,#copy_to))
|
if (streq(#copy_from,#copy_to))
|
||||||
{
|
{
|
||||||
if (cut_active) continue;
|
if (cut_active) continue;
|
||||||
sprintf(#copy_to, "%s/NEW_%s", #path, #copy_from+strrchr(#copy_from,'/'));
|
sprintf(#copy_to, "%s/NEW_%s", path, #copy_from+strrchr(#copy_from,'/'));
|
||||||
}
|
}
|
||||||
if (strstr(#copy_to, #copy_from))
|
if (strstr(#copy_to, #copy_from))
|
||||||
{
|
{
|
||||||
|
@ -12,13 +12,15 @@ void DrawScroll(bool _scroll_used) {
|
|||||||
{
|
{
|
||||||
sc_slider_y = sc_y - 1;
|
sc_slider_y = sc_y - 1;
|
||||||
sc_slider_h = sc_h + 1;
|
sc_slider_h = sc_h + 1;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
sc_slider_y = files.first * sc_h / files.count + sc_y - 1;
|
sc_slider_y = files.first * sc_h / files.count + sc_y - 1;
|
||||||
sc_slider_h = sc_h * files.visible - files.visible / files.count + 2;
|
sc_slider_h = sc_h * files.visible - files.visible / files.count + 2;
|
||||||
if (sc_slider_h < 20) sc_slider_h = 20; //minimal scroll height
|
if (sc_slider_h < 20) {
|
||||||
if (sc_slider_h > sc_h-sc_slider_y+56) || (files.first+files.visible>=files.count) sc_slider_y= sc_y + sc_h - sc_slider_h; //äëÿ áîëüøîãî ñïèñêà
|
sc_slider_h = 20; //set minimal scroll height
|
||||||
|
}
|
||||||
|
if (sc_slider_h > sc_h-sc_slider_y+56) || (files.first+files.visible>=files.count) {
|
||||||
|
sc_slider_y= sc_y + sc_h - sc_slider_h; //fix for the very long list
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//slider
|
//slider
|
||||||
DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,sc.work_graph);
|
DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,sc.work_graph);
|
||||||
|
@ -1,42 +1,4 @@
|
|||||||
|
|
||||||
#ifdef LANG_RUS
|
|
||||||
?define T_DEVICES "“áâனá⢠"
|
|
||||||
?define T_ACTIONS "„¥©á⢨ï"
|
|
||||||
char *actions[] = {
|
|
||||||
59, "<EFBFBD>®¢ë© ä ©«", "F9",
|
|
||||||
57, "<EFBFBD>®¢ ï ¯ ¯ª ", "F7",
|
|
||||||
60, "<EFBFBD> áâனª¨", "F10",
|
|
||||||
0,0,0
|
|
||||||
};
|
|
||||||
?define T_PROG "<EFBFBD>à®£à ¬¬ë "
|
|
||||||
?define T_SYS "‘¨á⥬ "
|
|
||||||
?define T_UNC "<EFBFBD>¥¨§¢¥áâ® "
|
|
||||||
?define T_CD "CD-ROM "
|
|
||||||
?define T_FD "„¨áª¥â "
|
|
||||||
?define T_HD "†¥á⪨© ¤¨áª "
|
|
||||||
?define T_SATA "SATA ¤¨áª "
|
|
||||||
?define T_USB "USB ¤¨áª "
|
|
||||||
?define T_RAM "RAM ¤¨áª "
|
|
||||||
#else
|
|
||||||
?define T_DEVICES "Devices"
|
|
||||||
?define T_ACTIONS "Actions"
|
|
||||||
char *actions[] = {
|
|
||||||
59, "New file", "F9",
|
|
||||||
57, "New folder", "F7",
|
|
||||||
60, "Settings", "F10",
|
|
||||||
0,0,0
|
|
||||||
};
|
|
||||||
?define T_PROG "Programs "
|
|
||||||
?define T_SYS "System "
|
|
||||||
?define T_UNC "Unknown "
|
|
||||||
?define T_CD "CD-ROM "
|
|
||||||
?define T_FD "Floppy disk "
|
|
||||||
?define T_HD "Hard disk "
|
|
||||||
?define T_SATA "SATA disk "
|
|
||||||
?define T_USB "USB disk "
|
|
||||||
?define T_RAM "RAM disk "
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct _SystemDiscs
|
struct _SystemDiscs
|
||||||
{
|
{
|
||||||
collection list;
|
collection list;
|
||||||
@ -48,51 +10,6 @@ struct _SystemDiscs
|
|||||||
void Click();
|
void Click();
|
||||||
} SystemDiscs=0;
|
} SystemDiscs=0;
|
||||||
|
|
||||||
#define DEV_H 17
|
|
||||||
#define DEV_H_HOR 20
|
|
||||||
|
|
||||||
void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name)
|
|
||||||
{
|
|
||||||
switch(disk_first_letter)
|
|
||||||
{
|
|
||||||
case 'r':
|
|
||||||
ESBYTE[dev_icon]=0;
|
|
||||||
strcpy(disc_name, T_SYS);
|
|
||||||
break;
|
|
||||||
case 'k':
|
|
||||||
ESBYTE[dev_icon]=1;
|
|
||||||
strcpy(disc_name, T_PROG);
|
|
||||||
break;
|
|
||||||
case 'f':
|
|
||||||
ESBYTE[dev_icon]=2;
|
|
||||||
strcpy(disc_name, T_FD);
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
ESBYTE[dev_icon]=3;
|
|
||||||
strcpy(disc_name, T_CD);
|
|
||||||
break;
|
|
||||||
case 'h':
|
|
||||||
case 'b':
|
|
||||||
ESBYTE[dev_icon]=4;
|
|
||||||
strcpy(disc_name, T_HD);
|
|
||||||
break;
|
|
||||||
case 's':
|
|
||||||
ESBYTE[dev_icon]=4;
|
|
||||||
strcpy(disc_name, T_SATA);
|
|
||||||
break;
|
|
||||||
case 't':
|
|
||||||
ESBYTE[dev_icon]=5;
|
|
||||||
strcpy(disc_name, T_RAM);
|
|
||||||
break;
|
|
||||||
case 'u':
|
|
||||||
ESBYTE[dev_icon]=6;
|
|
||||||
strcpy(disc_name, T_USB);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ESBYTE[dev_icon]=5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _SystemDiscs::Get()
|
void _SystemDiscs::Get()
|
||||||
{
|
{
|
||||||
bool kolibrios_exists=false;
|
bool kolibrios_exists=false;
|
||||||
@ -126,23 +43,35 @@ void _SystemDiscs::Get()
|
|||||||
free(diskbuf);
|
free(diskbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetDiskIconAndName(char disk_first_letter, dword dev_icon, dword disc_name)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0; devinfo[i]!=0; i+=3) {
|
||||||
|
if (disk_first_letter == ESBYTE[devinfo[i]]) {
|
||||||
|
ESBYTE[dev_icon] = devinfo[i+1];
|
||||||
|
strcpy(disc_name, devinfo[i+2]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ESBYTE[dev_icon]=5;
|
||||||
|
strcpy(disc_name, T_UNC);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define DEV_H 17
|
||||||
#define DDW 120
|
#define DDW 120
|
||||||
|
#define KFM2_DEVH 20
|
||||||
|
|
||||||
void _SystemDiscs::Draw()
|
void _SystemDiscs::Draw()
|
||||||
{
|
{
|
||||||
char dev_name[15], disc_name[100], i, dev_icon, is_active=0;
|
char dev_name[15], disc_name[100], i, dev_icon;
|
||||||
|
bool is_active=0;
|
||||||
int draw_y, draw_x;
|
int draw_y, draw_x;
|
||||||
|
|
||||||
for (i=0; i<30; i++) DeleteButton(100+i);
|
for (i=0; i<30; i++) DeleteButton(100+i);
|
||||||
|
|
||||||
if (efm) {
|
if (efm) {
|
||||||
if (active_panel==0) {
|
DrawSelect(Form.cwidth/2-DDW, KFM_DEV_DROPDOWN_1, location[0]);
|
||||||
DrawSelect(Form.cwidth/2-DDW, 10, #path, KFM_DEV_DROPDOWN_1);
|
DrawSelect(Form.cwidth-DDW-2, KFM_DEV_DROPDOWN_2, location[sizeof(dword)]);
|
||||||
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);
|
|
||||||
}
|
|
||||||
files.y = 40 + 17;
|
files.y = 40 + 17;
|
||||||
} else {
|
} else {
|
||||||
draw_y = 74;
|
draw_y = 74;
|
||||||
@ -150,11 +79,11 @@ void _SystemDiscs::Draw()
|
|||||||
for (i=0;i<list.count;i++) {
|
for (i=0;i<list.count;i++) {
|
||||||
strcpy(#dev_name, list.get(i));
|
strcpy(#dev_name, list.get(i));
|
||||||
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
|
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
|
||||||
if (strstr(#path, #dev_name)==#path) is_active=true; else is_active=false;
|
if (strstr(path, #dev_name)==path) is_active=true; else is_active=false;
|
||||||
|
|
||||||
DrawBar(draw_x,draw_y,6,DEV_H+1,0xFFFFFF);
|
DrawBar(draw_x,draw_y,6,DEV_H+1,0xFFFFFF);
|
||||||
DrawBar(draw_x+6+18,draw_y,160-6-18,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);
|
DefineHiddenButton(draw_x,draw_y,159,16,100+i);
|
||||||
if (show_dev_name.checked)
|
if (show_dev_name.checked)
|
||||||
{
|
{
|
||||||
strcat(#disc_name, #dev_name);
|
strcat(#disc_name, #dev_name);
|
||||||
@ -174,59 +103,59 @@ void _SystemDiscs::Draw()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _SystemDiscs::DrawSelect(int draw_x, draw_y, path1, btid)
|
void _SystemDiscs::DrawSelect(int draw_x, btid, dword _path)
|
||||||
{
|
{
|
||||||
char dev_name[15], disc_name[100], i, dev_icon, is_active=0;
|
#define SELECTY 10
|
||||||
if (ESBYTE[path1+1]=='\0') {
|
char dev_name[15], disc_name[100], i, dev_icon;
|
||||||
|
|
||||||
|
if (ESBYTE[_path+1]=='\0') {
|
||||||
strcpy(#dev_name, "/root");
|
strcpy(#dev_name, "/root");
|
||||||
dev_icon = 0;
|
dev_icon = 0;
|
||||||
} else if (chrnum(path1, '/')==1) {
|
} else if (chrnum(_path, '/')==1) {
|
||||||
strcpy(#dev_name, path1);
|
strcpy(#dev_name, _path);
|
||||||
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
|
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
|
||||||
} else for (i=0;i<list.count;i++) {
|
} else for (i=0;i<list.count;i++) {
|
||||||
strcpy(#dev_name, list.get(i));
|
strcpy(#dev_name, list.get(i));
|
||||||
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
|
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
|
||||||
if (strstr(path1, #dev_name)-path1==0) break;
|
if (strstr(_path, #dev_name)-_path==0) break;
|
||||||
}
|
}
|
||||||
DrawRectangle(draw_x-1, draw_y-1, DDW+2-DEV_H_HOR, DEV_H_HOR+1, sc.work_graph);
|
DrawRectangle(draw_x-1, SELECTY-1, DDW+2-KFM2_DEVH, KFM2_DEVH+1, sc.work_graph);
|
||||||
DrawBar(draw_x, draw_y, DDW+1-DEV_H_HOR, DEV_H_HOR, 0xFFFFFF);
|
DrawBar(draw_x, SELECTY, DDW+1-KFM2_DEVH, KFM2_DEVH, 0xFFFFFF);
|
||||||
_PutImage(draw_x + 5, draw_y+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
|
_PutImage(draw_x + 5, SELECTY+2, 18,17, dev_icon*17*18*3+#devices);
|
||||||
kfont.WriteIntoWindow(draw_x + 24, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1);
|
kfont.WriteIntoWindow(draw_x + 24, math.max(KFM2_DEVH-kfont.height/2+SELECTY,0), 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1);
|
||||||
DefineButton(draw_x, draw_y, DDW-1, DEV_H_HOR-1, btid+1+BT_HIDE,0xFFFFFF);
|
DefineHiddenButton(draw_x, SELECTY, DDW-1, KFM2_DEVH-1, btid+1);
|
||||||
DrawFlatButtonSmall(draw_x+DDW-DEV_H_HOR+1, draw_y-1, DEV_H_HOR-1, DEV_H_HOR+1, btid, "\x19");
|
DrawFlatButtonSmall(draw_x+DDW-KFM2_DEVH+1, SELECTY-1, KFM2_DEVH-1, KFM2_DEVH+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)
|
void _SystemDiscs::DrawOptions(int draw_x)
|
||||||
{
|
{
|
||||||
|
int optionsy = SELECTY+KFM2_DEVH+1;
|
||||||
char dev_name[15], disc_name[100], i, dev_icon, is_active=0;
|
char dev_name[15], disc_name[100], i, dev_icon, is_active=0;
|
||||||
|
|
||||||
for (i=0; i<30; i++) DeleteButton(100+i);
|
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);
|
DrawPopup(draw_x, optionsy, DDW, list.count*KFM2_DEVH, 1, -1, sc.work_graph);
|
||||||
|
|
||||||
for (i=0;i<list.count;i++) {
|
for (i=0;i<list.count;i++) {
|
||||||
strcpy(#dev_name, list.get(i));
|
strcpy(#dev_name, list.get(i));
|
||||||
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
|
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name);
|
||||||
if (strstr(#path, #dev_name)!=0) is_active=true; else is_active=false;
|
if (strstr(path, #dev_name)!=0) is_active=true; else is_active=false;
|
||||||
|
|
||||||
DrawBar(draw_x, draw_y, DDW, DEV_H_HOR, 0xFFFFFF);
|
DrawBar(draw_x, optionsy, DDW, KFM2_DEVH, 0xFFFFFF);
|
||||||
DefineButton(draw_x, draw_y, DDW, DEV_H_HOR-1, 100+i+BT_HIDE,0xFFFFFF);
|
DefineButton(draw_x, optionsy, DDW, KFM2_DEVH-1, 100+i+BT_HIDE,0xFFFFFF);
|
||||||
_PutImage(draw_x + 5, draw_y+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
|
_PutImage(draw_x + 5, optionsy+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
|
||||||
if (is_active) kfont.bold = true;
|
if (is_active) kfont.bold = true;
|
||||||
kfont.WriteIntoWindow(draw_x + 24, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1);
|
kfont.WriteIntoWindow(draw_x + 24, optionsy+2, 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1);
|
||||||
kfont.bold = false;
|
kfont.bold = false;
|
||||||
draw_y += DEV_H_HOR;
|
optionsy += KFM2_DEVH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _SystemDiscs::Click(int n)
|
void _SystemDiscs::Click(int n)
|
||||||
{
|
{
|
||||||
strcpy(#path, list.get(n));
|
strcpy(path, list.get(n));
|
||||||
files.KeyHome();
|
files.KeyHome();
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -285,12 +214,10 @@ void DrawLeftPanelBg()
|
|||||||
int actions_y = SystemDiscs.list.count*DEV_H;
|
int actions_y = SystemDiscs.list.count*DEV_H;
|
||||||
int start_y = actions_y+159;
|
int start_y = actions_y+159;
|
||||||
int area_h;
|
int area_h;
|
||||||
DrawBar(2,41,190,15,waves_pal[0]); //above devices block
|
DrawBar(2,41,190,15,waves_pal[0]); //above devices block
|
||||||
DrawBar(17,actions_y+75,160,15,waves_pal[0]); //below devices block
|
DrawBar(17,actions_y+75,160,15,EDX); //below devices block
|
||||||
PutShadow(17,actions_y+75,160,1,1,3);
|
DrawBar(2,56,15,actions_y+103,EDX); //on the left
|
||||||
PutShadow(18,actions_y+75+1,158,1,1,1);
|
DrawBar(177,56,15,actions_y+103,EDX); //on the right
|
||||||
DrawBar(2,56,15,actions_y+103,waves_pal[0]); //on the left
|
|
||||||
DrawBar(177,56,15,actions_y+103,waves_pal[0]); //on the right
|
|
||||||
area_h = Form.cheight-start_y-2 - status_bar_h;
|
area_h = Form.cheight-start_y-2 - status_bar_h;
|
||||||
if (area_h < 268){
|
if (area_h < 268){
|
||||||
PutPaletteImage(#blue_hl, 190, area_h, 2, start_y, 8, #waves_pal);
|
PutPaletteImage(#blue_hl, 190, area_h, 2, start_y, 8, #waves_pal);
|
||||||
@ -298,6 +225,8 @@ void DrawLeftPanelBg()
|
|||||||
DrawBar(2,start_y,190, area_h-268, waves_pal[0]);
|
DrawBar(2,start_y,190, area_h-268, waves_pal[0]);
|
||||||
PutPaletteImage(#blue_hl, 190, 268, 2, Form.cheight-270-status_bar_h, 8, #waves_pal);
|
PutPaletteImage(#blue_hl, 190, 268, 2, Form.cheight-270-status_bar_h, 8, #waves_pal);
|
||||||
}
|
}
|
||||||
|
PutShadow(17,actions_y+75,160,1,1,3);
|
||||||
|
PutShadow(18,actions_y+75+1,158,1,1,1);
|
||||||
PutShadow(17,start_y,160,1,1,3);
|
PutShadow(17,start_y,160,1,1,3);
|
||||||
PutShadow(18,start_y+1,158,1,1,1);
|
PutShadow(18,start_y+1,158,1,1,1);
|
||||||
}
|
}
|
@ -115,7 +115,7 @@ void SetProperties(int mode)
|
|||||||
{
|
{
|
||||||
if (getElementSelectedFlag(i) == true)
|
if (getElementSelectedFlag(i) == true)
|
||||||
{
|
{
|
||||||
sprintf(#pcur_file,"%s/%s",#path,items.get(i)*304+buf+72);
|
sprintf(#pcur_file,"%s/%s",path,items.get(i)*304+buf+72);
|
||||||
SetPropertiesFile(#pcur_file, #file_info_general);
|
SetPropertiesFile(#pcur_file, #file_info_general);
|
||||||
if (SET_PROPERTIES_ALL_SUBFOLDER == mode) {
|
if (SET_PROPERTIES_ALL_SUBFOLDER == mode) {
|
||||||
if (dir_exists(#pcur_file)) SetPropertiesDir(#pcur_file);
|
if (dir_exists(#pcur_file)) SetPropertiesDir(#pcur_file);
|
||||||
@ -131,7 +131,7 @@ void SetProperties(int mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd_free=3;
|
cmd_free=3;
|
||||||
Open_Dir(#path,ONLY_OPEN);
|
Open_Dir(path,ONLY_OPEN);
|
||||||
ExitProcess();
|
ExitProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ void properties_dialog()
|
|||||||
if (selected_count)
|
if (selected_count)
|
||||||
{
|
{
|
||||||
more_files_count.get(NULL);
|
more_files_count.get(NULL);
|
||||||
GetSizeMoreFiles(#path);
|
GetSizeMoreFiles(path);
|
||||||
ch_read_only.checked = 0;
|
ch_read_only.checked = 0;
|
||||||
ch_hidden.checked = 0;
|
ch_hidden.checked = 0;
|
||||||
ch_system.checked = 0;
|
ch_system.checked = 0;
|
||||||
@ -191,7 +191,7 @@ void properties_dialog()
|
|||||||
ch_hidden.checked = file_info_general.hidden;
|
ch_hidden.checked = file_info_general.hidden;
|
||||||
ch_system.checked = file_info_general.system;
|
ch_system.checked = file_info_general.system;
|
||||||
}
|
}
|
||||||
edit_box_set_text stdcall (#path_to_file_ed, #path);
|
edit_box_set_text stdcall (#path_to_file_ed, path);
|
||||||
|
|
||||||
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
|
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
|
||||||
loop() switch(WaitEvent())
|
loop() switch(WaitEvent())
|
||||||
@ -293,7 +293,7 @@ void DrawPropertiesWindow()
|
|||||||
if ( file_info_general.isfolder )
|
if ( file_info_general.isfolder )
|
||||||
PropertiesDrawIcon(NULL, "<DIR>");
|
PropertiesDrawIcon(NULL, "<DIR>");
|
||||||
else {
|
else {
|
||||||
sprintf(#temp_path,"%s/%s",#path,#file_name2);
|
sprintf(#temp_path,"%s/%s",path,#file_name2);
|
||||||
ext1 = strrchr(#file_name2,'.');
|
ext1 = strrchr(#file_name2,'.');
|
||||||
if (ext1) ext1 += #file_name2;
|
if (ext1) ext1 += #file_name2;
|
||||||
PropertiesDrawIcon(#temp_path, ext1);
|
PropertiesDrawIcon(#temp_path, ext1);
|
||||||
|
@ -68,9 +68,9 @@ void settings_dialog()
|
|||||||
}
|
}
|
||||||
else if (id==6)
|
else if (id==6)
|
||||||
{
|
{
|
||||||
strcpy(#path_start,#path);
|
strcpy(#path_start,path);
|
||||||
path_start_ed.size = path_start_ed.pos = strlen(#path_start);
|
path_start_ed.size = path_start_ed.pos = strlen(#path_start);
|
||||||
ini.SetString("DefaultPath", #path, strlen(#path));
|
ini.SetString("DefaultPath", path, strlen(path));
|
||||||
edit_box_draw stdcall (#path_start_ed);
|
edit_box_draw stdcall (#path_start_ed);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ void settings_dialog()
|
|||||||
|
|
||||||
case evReDraw:
|
case evReDraw:
|
||||||
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400,
|
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400,
|
||||||
365+skin_height,0x34,sc.work,TITLE_SETT,0);
|
-efm*62+365+skin_height,0x34,sc.work,TITLE_SETT,0);
|
||||||
GetProcessInfo(#Settings, SelfInfo);
|
GetProcessInfo(#Settings, SelfInfo);
|
||||||
DrawSettingsCheckBoxes();
|
DrawSettingsCheckBoxes();
|
||||||
}
|
}
|
||||||
@ -125,9 +125,11 @@ void DrawSettingsCheckBoxes()
|
|||||||
#define FRX 26
|
#define FRX 26
|
||||||
#define XXX 11
|
#define XXX 11
|
||||||
y.n = 0;
|
y.n = 0;
|
||||||
show_dev_name.draw(XXX, y.inc(14));
|
if (!efm) {
|
||||||
show_status_bar.draw(XXX, y.inc(25));
|
show_dev_name.draw(XXX, y.inc(14));
|
||||||
show_breadcrumb.draw(XXX, y.inc(25));
|
show_status_bar.draw(XXX, y.inc(25));
|
||||||
|
show_breadcrumb.draw(XXX, y.inc(25));
|
||||||
|
}
|
||||||
big_icons.draw(XXX, y.inc(25));
|
big_icons.draw(XXX, y.inc(25));
|
||||||
colored_lines.draw(XXX, y.inc(25));
|
colored_lines.draw(XXX, y.inc(25));
|
||||||
font_size.draw(XXX, y.inc(31));
|
font_size.draw(XXX, y.inc(31));
|
||||||
@ -160,7 +162,6 @@ void LoadIniSettings()
|
|||||||
Form.top = ini.GetInt("WinY", 30);
|
Form.top = ini.GetInt("WinY", 30);
|
||||||
Form.width = ini.GetInt("WinW", efm*170+550);
|
Form.width = ini.GetInt("WinW", efm*170+550);
|
||||||
Form.height = ini.GetInt("WinH", efm*100+517);
|
Form.height = ini.GetInt("WinH", efm*100+517);
|
||||||
ini.GetString("DefaultPath", #path, 4096, "/rd/1");
|
|
||||||
ini.GetString("DefaultPath", #path_start, 4096, "/rd/1");
|
ini.GetString("DefaultPath", #path_start, 4096, "/rd/1");
|
||||||
path_start_ed.size = path_start_ed.pos = strlen(#path_start);
|
path_start_ed.size = path_start_ed.pos = strlen(#path_start);
|
||||||
kfont.init(DEFAULT_FONT);
|
kfont.init(DEFAULT_FONT);
|
||||||
|
@ -40,7 +40,12 @@
|
|||||||
dword sizehi;
|
dword sizehi;
|
||||||
char name[518];
|
char name[518];
|
||||||
};
|
};
|
||||||
|
#define ATR_READONLY 1
|
||||||
|
#define ATR_HIDDEN 2
|
||||||
|
#define ATR_SYSTEM 4
|
||||||
|
#define ATR_VOL_LABEL 8
|
||||||
#define ATR_FOLDER 0x10
|
#define ATR_FOLDER 0x10
|
||||||
|
#define ATR_NONARH 0x20
|
||||||
|
|
||||||
|
|
||||||
:dword GetFileInfo(dword file_path, bdvk_struct)
|
:dword GetFileInfo(dword file_path, bdvk_struct)
|
||||||
@ -203,7 +208,7 @@ inline fastcall void GetCurDir( ECX, EDX)
|
|||||||
$int 0x40
|
$int 0x40
|
||||||
}
|
}
|
||||||
|
|
||||||
void read_file(dword path1, buf, size)
|
:void read_file(dword path1, buf, size)
|
||||||
{
|
{
|
||||||
EAX = 68;
|
EAX = 68;
|
||||||
EBX = 27;
|
EBX = 27;
|
||||||
|
@ -53,17 +53,17 @@
|
|||||||
:void DrawWideRectangle(dword x,y,w,h,boder,color1)
|
:void DrawWideRectangle(dword x,y,w,h,boder,color1)
|
||||||
{
|
{
|
||||||
DrawBar(x, y, w, boder, color1);
|
DrawBar(x, y, w, boder, color1);
|
||||||
DrawBar(x, y+h-boder, w, boder, color1);
|
DrawBar(x, y+h-boder, w, boder, EDX);
|
||||||
DrawBar(x, y+boder, boder, h-boder-boder, color1);
|
DrawBar(x, y+boder, boder, h-boder-boder, EDX);
|
||||||
DrawBar(x+w-boder, y+boder, boder, h-boder-boder, color1);
|
DrawBar(x+w-boder, y+boder, boder, h-boder-boder, EDX);
|
||||||
}
|
}
|
||||||
|
|
||||||
:void DrawRectangle3D(dword x,y,w,h,color1,color2)
|
:void DrawRectangle3D(dword x,y,w,h,color1,color2)
|
||||||
{
|
{
|
||||||
DrawBar(x,y,w+1,1,color1);
|
DrawBar(x,y,w+1,1,color1);
|
||||||
DrawBar(x,y+1,1,h-1,color1);
|
DrawBar(x,y+1,1,h-1,EDX);
|
||||||
DrawBar(x+w,y+1,1,h,color2);
|
DrawBar(x+w,y+1,1,h,color2);
|
||||||
DrawBar(x,y+h,w,1,color2);
|
DrawBar(x,y+h,w,1,EDX);
|
||||||
}
|
}
|
||||||
|
|
||||||
:void DrawCaptButton(dword x,y,w,h,id,color_b, color_t,text)
|
:void DrawCaptButton(dword x,y,w,h,id,color_b, color_t,text)
|
||||||
@ -220,7 +220,7 @@
|
|||||||
{
|
{
|
||||||
DrawRectangle(x,y,w,h,col_border);
|
DrawRectangle(x,y,w,h,col_border);
|
||||||
DrawBar(x+1,y+1,w-1,1,0xFFFfff);
|
DrawBar(x+1,y+1,w-1,1,0xFFFfff);
|
||||||
DrawBar(x+1,y+2,1,h-2,0xFFFfff);
|
DrawBar(x+1,y+2,1,h-2,EDX);
|
||||||
if (col_work!=-1) DrawBar(x+2,y+2,w-2,h-2,col_work);
|
if (col_work!=-1) DrawBar(x+2,y+2,w-2,h-2,col_work);
|
||||||
DrawPopupShadow(x,y,w,h-1,skinned);
|
DrawPopupShadow(x,y,w,h-1,skinned);
|
||||||
}
|
}
|
||||||
@ -289,9 +289,9 @@
|
|||||||
DrawBar(x+w+1, y+2, 1, h-2, right);
|
DrawBar(x+w+1, y+2, 1, h-2, right);
|
||||||
|
|
||||||
PutPixel(x, y, dots);
|
PutPixel(x, y, dots);
|
||||||
PutPixel(x+w+1, y+h+1, dots);
|
PutPixel(x+w+1, y+h+1, EDX);
|
||||||
PutPixel(x, y+h+1, dots);
|
PutPixel(x, y+h+1, EDX);
|
||||||
PutPixel(x+w+1, y, dots);
|
PutPixel(x+w+1, y, EDX);
|
||||||
|
|
||||||
PutPixel(x, y+h, dark);
|
PutPixel(x, y+h, dark);
|
||||||
PutPixel(x+w+1, y+1, light);
|
PutPixel(x+w+1, y+1, light);
|
||||||
@ -300,15 +300,13 @@
|
|||||||
|
|
||||||
:bool skin_is_dark()
|
:bool skin_is_dark()
|
||||||
{
|
{
|
||||||
dword gray;
|
ESI = #sc.work;
|
||||||
dword color_image = #sc.work;
|
|
||||||
|
|
||||||
gray = DSBYTE[color_image]*DSBYTE[color_image];
|
EDI = DSBYTE[ESI]*DSBYTE[ESI];
|
||||||
gray += DSBYTE[color_image+1]*DSBYTE[color_image+1];
|
EDI += DSBYTE[ESI+1]*DSBYTE[ESI+1];
|
||||||
gray += DSBYTE[color_image+2]*DSBYTE[color_image+2];
|
EDI += DSBYTE[ESI+2]*DSBYTE[ESI+2];
|
||||||
gray = sqrt(gray) / 3;
|
|
||||||
|
|
||||||
if (gray < 65) {
|
if (sqrt(EDI) / 3 < 65) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#define ENTRY_POINT #______INIT______
|
#define ENTRY_POINT #______INIT______
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char os_name[8] = {'M','E','N','U','E','T','0','1'};
|
char os_name[] = "MENUET01"n;
|
||||||
dword os_version = 0x00000001;
|
dword os_version = 0x00000001;
|
||||||
dword start_addr = ENTRY_POINT;
|
dword start_addr = ENTRY_POINT;
|
||||||
dword final_addr = #______STOP______+32;
|
dword final_addr = #______STOP______+32;
|
||||||
|
@ -11,4 +11,5 @@ tup.rule("notify.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_
|
|||||||
tup.rule("osupdate.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "osupdate.com")
|
tup.rule("osupdate.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "osupdate.com")
|
||||||
tup.rule("pipet.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pipet.com")
|
tup.rule("pipet.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pipet.com")
|
||||||
tup.rule("software_widget.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "software_widget.com")
|
tup.rule("software_widget.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "software_widget.com")
|
||||||
|
tup.rule("kfm2.c", "c-- %f" .. tup.getconfig("KPACK_CMD"), "kfm2.com")
|
||||||
|
|
||||||
|
12
programs/cmm/misc/kfm2.c
Normal file
12
programs/cmm/misc/kfm2.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#define MEMSIZE 1024*20
|
||||||
|
#define ENTRY_POINT #main
|
||||||
|
|
||||||
|
#include "../lib/fs.h"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
RenameMove("KFM", abspath("EOLITE"));
|
||||||
|
RunProgram(abspath("KFM"), #param);
|
||||||
|
RenameMove("EOLITE", abspath("KFM"));
|
||||||
|
ExitProcess();
|
||||||
|
}
|
@ -162,7 +162,7 @@ void main()
|
|||||||
void draw_window()
|
void draw_window()
|
||||||
{
|
{
|
||||||
sc.get();
|
sc.get();
|
||||||
DefineAndDrawWindow(screen.width-600/2,100,640,600+skin_height,0x73,sc.work,T_WINDOW_HEADER,0);
|
DefineAndDrawWindow(screen.width-600/2,100,640,600,0x73,sc.work,T_WINDOW_HEADER,0);
|
||||||
GetProcessInfo(#Form, SelfInfo);
|
GetProcessInfo(#Form, SelfInfo);
|
||||||
IF (Form.status_window&ROLLED_UP) return;
|
IF (Form.status_window&ROLLED_UP) return;
|
||||||
if (Form.width < 270) { MoveSize(OLD,OLD,270,OLD); return; }
|
if (Form.width < 270) { MoveSize(OLD,OLD,270,OLD); return; }
|
||||||
|
Loading…
Reference in New Issue
Block a user