2 Commits

Author SHA1 Message Date
6953f87287 fix tab
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 33s
Build system / Build (pull_request) Successful in 7m41s
2025-04-03 01:45:35 +03:00
2c8c7d9a07 Unz: fix #27
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 22s
Build system / Build (pull_request) Successful in 4m54s
2025-04-02 02:57:25 +03:00
6 changed files with 85 additions and 71 deletions

View File

@@ -10,9 +10,9 @@ TODO:
http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334
*/
#define ABOUT_TITLE "Eolite 5.32"
#define TITLE_EOLITE "Eolite File Manager 5.32"
#define TITLE_KFM "Kolibri File Manager 2.32";
#define ABOUT_TITLE "Eolite 5.31"
#define TITLE_EOLITE "Eolite File Manager 5.31"
#define TITLE_KFM "Kolibri File Manager 2.31";
#define MEMSIZE 1024 * 250
#include "../lib/clipboard.h"
@@ -718,7 +718,7 @@ void DrawFilePanels()
DrawButtonsAroundList();
path = location[active_panel^1];
active_panel ^= 1;
OpenDir_without_unselect(WITH_REDRAW);
OpenDir2(WITH_REDRAW);
active_panel ^= 1;
if (!getSelectedCount()) files_inactive.count = files.count;
llist_copy(#files, #files_active);
@@ -731,22 +731,38 @@ void DrawFilePanels()
DrawButtonsAroundList();
path = location[active_panel];
OpenDir_without_unselect(WITH_REDRAW);
OpenDir2(WITH_REDRAW);
}
}
void OpenDir(char redraw) {
unselectAll();
OpenDir_without_unselect(redraw);
void OpenDir2(char redraw){
if (buf) free(buf);
if (GetDir(#buf, #files.count, path, DIRS_NOROOT)) {
Write_Error(EAX);
history.add(path);
EventHistoryGoBack();
return;
}
SetCurDir(path);
if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
files.visible = math.min(files.h / files.item_h, files.count);
if (!strncmp(path, "/rd/1",5)) || (!strncmp(path, "/sys/",4))
dir_at_fat16 = true; else dir_at_fat16 = false;
Sorting();
SystemDiscs.Draw();
list_full_redraw = true;
List_ReDraw();
DrawPathBar();
}
void OpenDir_without_unselect(char redraw) {
void OpenDir(char redraw){
int errornum;
unselectAll();
if (buf) free(buf);
if (errornum = GetDir(#buf, #files.count, path, DIRS_NOROOT)) {
history.add(path);
//EventHistoryGoBack();
Dir_Up();
Write_Error(errornum);
return;

View File

@@ -50,6 +50,10 @@ opendialog open_folder_dialog =
NULL
};
#define TOOLBAR_H 100
#define LISTX 0
#define LISTY TOOLBAR_H
//===================================================//
// //
// RESULTS //
@@ -91,7 +95,9 @@ void SearchThread()
{
int prev_first, prev_cur_y;
#ifndef __COFF__
load_dll(Proc_lib, #OpenDialog_init,0);
#endif
OpenDialog_init stdcall (#open_folder_dialog);
if (!ESBYTE[path]) strcpy(path, "/sys");
@@ -101,43 +107,28 @@ void SearchThread()
loop() switch(@WaitEvent())
{
case evMouse:
edit_box_mouse stdcall (#edit_name);
edit_box_mouse stdcall (#edit_path);
prev_cur_y = select_list.cur_y;
if (SelectList_ProcessMouse()) {
SelectList_Draw();
} else {
SelectList_DrawLine(select_list.cur_y);
if (select_list.MouseOver(mouse.x, mouse.y))
{
if (mouse.key&MOUSE_LEFT) && (mouse.up) {
if (prev_cur_y == select_list.cur_y) EventRunFile();
}
if (mouse.key&MOUSE_RIGHT) && (mouse.up) {
EventShowFileInFolder();
}
}
}
break;
if (mouse.key&MOUSE_RIGHT) && (mouse.up) && (select_list.MouseOver()) EventOpenFile(false);
break;
case evButton:
switch (@GetButtonID()) {
case 1: @ExitProcess(); break;
case BTN_SEARCH: EventSearch(); break;
case BTN_CHOOSE_PATH: EventChooseSearchInPath();
}
break;
break;
case evKey:
GetKeys();
edit_box_key_c stdcall (#edit_name, key_editbox);
edit_box_key_c stdcall (#edit_path, key_editbox);
@GetKeys();
edit_box_key stdcall (#edit_name);
edit_box_key stdcall (#edit_path);
if (key_scancode == SCAN_CODE_TAB) {
if (edit_name.flags & ed_focus) {
edit_name.flags >< edit_path.flags;
@@ -152,7 +143,7 @@ void SearchThread()
if (edit_name.flags & ed_focus) || (edit_path.flags & ed_focus) {
if (SCAN_CODE_ENTER == key_scancode) EventSearch();
} else {
if (SCAN_CODE_ENTER == key_scancode) EventRunFile();
if (SCAN_CODE_ENTER == key_scancode) EventOpenFile(true);
prev_first = select_list.first;
prev_cur_y = select_list.cur_y;
if (select_list.ProcessKey(key_scancode)) {
@@ -178,24 +169,17 @@ void SearchThread()
}
}
#define TOOLBAR_H 100
#define PAD 10
#define LISTX PAD
#define LISTY TOOLBAR_H
void draw_window_search()
{
SelectList_Init(LISTX, LISTY, Form.cwidth-scroll1.size_x-LISTX-LISTX, Form.cheight-TOOLBAR_H-PAD);
SelectList_Init(LISTX, LISTY, Form.cwidth-scroll1.size_x-1, Form.cheight-TOOLBAR_H-1);
SelectList_Draw();
DrawWideRectangle(0, LISTY-PAD-1, Form.cwidth, Form.cheight-TOOLBAR_H+PAD+1, 9, sc.work);
DrawRectangle(PAD-1, LISTY-1, select_list.w+1, select_list.h+1, sc.line);
DrawBar(0, TOOLBAR_H-1, Form.cwidth, 1, sc.line);
DrawBar(0, 0, Form.cwidth, TOOLBAR_H-1, sc.work);
DrawEditBox(#edit_name);
WriteText(edit_name.left-2, edit_name.top-20, 0x90, sc.work_text, T_SEARCH_NAME);
edit_path.width = Form.cwidth - 314;
DrawStandartCaptButton(PAD, 63, BTN_SEARCH, T_BUTTON_SEARCH);
DrawFileBox(#edit_path, T_SEARCH_PATH, BTN_CHOOSE_PATH);
DrawStandartCaptButton(10, 63, BTN_SEARCH, T_BUTTON_SEARCH);
}
void SelectList_DrawLine(dword i)
@@ -240,12 +224,6 @@ void SelectList_LineChanged()
return;
}
void getfullpath(dword to, path, name) {
strcpy(to, path);
chrcat(to, '/');
strcat(to, name);
}
//===================================================//
// //
// EVENTS //
@@ -260,21 +238,22 @@ void EventChooseSearchInPath()
}
}
void EventShowFileInFolder()
{
char full_path[4096];
int pos = select_list.cur_y;
getfullpath(#full_path, results.path.get(pos), results.name.get(pos));
RunProgram(#program_path, #full_path);
void getfullpath(dword to, path, name) {
strcpy(to, path);
chrcat(to, '/');
strcat(to, name);
}
void EventRunFile()
void EventOpenFile(int run_file_not_show_in_folder)
{
char full_path[4096];
int pos = select_list.cur_y;
getfullpath(#full_path, results.path.get(pos), results.name.get(pos));
if (dir_exists(#full_path)) chrcat(#full_path, '/');
RunProgram("/sys/@open", #full_path);
if (run_file_not_show_in_folder) {
RunProgram("/sys/@open", #full_path);
} else {
RunProgram("/sys/file managers/eolite", #full_path);
}
}
void EventSearch()

View File

@@ -9,6 +9,7 @@
#pragma option -CPA
#initallvar 0
#ifndef __COFF__
#jumptomain FALSE
#startaddress 0
@@ -29,6 +30,17 @@ dword I_Param = #param;
dword I_Path = #program_path;
char param[4096];
char program_path[4096];
#else
extern dword __argv;
extern dword __path;
dword I_Param = #__argv;
dword I_Path = #__path;
#define param __argv
#define program_path __path
#define ______INIT______ start
#endif
#define bool int
@@ -391,7 +403,6 @@ inline fastcall int TestBit( EAX, CL)
//------------------------------------------------------------------------------
#define MINIMIZED 0x02
#define ROLLED_UP 0x04
:void DefineAndDrawWindow(dword _x, _y, _w, _h, _window_type, _bgcolor, _title, _flags)
{

View File

@@ -116,10 +116,17 @@
EAX = 37;
EBX = 2;
$int 64
$mov ebx, eax
$mov ecx, eax
key = EAX;
lkm = EAX&MOUSE_LEFT;
pkm = EAX&MOUSE_RIGHT;
mkm = EAX&MOUSE_MIDDLE;
$and eax, 0x00000001
$shr ebx, 1
$and ebx, 0x00000001
$shr ecx, 2
$and ecx, 0x00000001
lkm = EAX;
pkm = EBX;
mkm = ECX;
//when you release the MOUSE button
// Mouse Move Event

View File

@@ -44,14 +44,15 @@ signed SelectList_ProcessMouse()
return true;
}
if (mouse.up) && (select_list.ProcessMouse(mouse.x, mouse.y)) {
SelectList_LineChanged();
return true;
}
if (mouse.up) && (mouse.click)
if (select_list.ProcessMouse(mouse.x, mouse.y)) {
SelectList_LineChanged();
return true;
}
return false;
}
:void SelectList_DrawBorder() {
void SelectList_DrawBorder() {
DrawRectangle3D(select_list.x-2, select_list.y-2,
select_list.w+3+scroll1.size_x, select_list.h+3,
sc.dark, sc.light);
@@ -60,8 +61,8 @@ signed SelectList_ProcessMouse()
void SelectList_DrawScroller()
{
scroll1.bckg_col = sc.dark; // MixColors(sc.work, 0xBBBbbb, 80);
scroll1.frnt_col = sc.light; // MixColors(sc.work,0xFFFfff,120);
scroll1.bckg_col = MixColors(sc.work, 0xBBBbbb, 80);
scroll1.frnt_col = MixColors(sc.work,0xFFFfff,120);
scroll1.line_col = sc.line;
scroll1.max_area = select_list.count;

View File

@@ -6,7 +6,7 @@ MK_C_SYM(__ieee754_expf)
fstl %st(1)
frndint
fstl %st(2)
fsubp
fsubrp
f2xm1
fld1
faddp