Compare commits
7 Commits
9d7529196b
...
add-licens
Author | SHA1 | Date | |
---|---|---|---|
1e663f36c8 | |||
00c2cfbcfc | |||
c398a2bbf4 | |||
58cf25fe43 | |||
8da45bab3e | |||
5abc319817 | |||
ff625706c0 |
@@ -66,6 +66,17 @@ to the end commit message body on a new line.
|
|||||||
|
|
||||||
Use **rebase** to keep your branch up to date.
|
Use **rebase** to keep your branch up to date.
|
||||||
|
|
||||||
|
## Licensing
|
||||||
|
|
||||||
|
For new source code files and for existing ones without a license, you need to add the following header to the beginning of the file:
|
||||||
|
```asm
|
||||||
|
; SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
; Program - Brief description.
|
||||||
|
; Copyright (C) 2011-2025 KolibriOS team
|
||||||
|
```
|
||||||
|
|
||||||
|
Be careful when setting copyright and date interval. Review the file's history to verify its origin.
|
||||||
|
|
||||||
## Conclusion
|
## Conclusion
|
||||||
|
|
||||||
We hope this small instructions will help you to get familiar with KolibriOS contribution rules and inspire you to participate in the life of our project.
|
We hope this small instructions will help you to get familiar with KolibriOS contribution rules and inspire you to participate in the life of our project.
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# KolibriOS
|
# KolibriOS
|
||||||
|
|
||||||
[](./COPYING.TXT)
|
[](./LICENSE)
|
||||||
[](https://git.kolibrios.org/KolibriOS/kolibrios/actions)
|
[](https://git.kolibrios.org/KolibriOS/kolibrios/actions)
|
||||||
|
|
||||||
KolibriOS is a hobby operating system for x86-compatible computers, which is currently being developed by a small but passionate team of enthusiasts.
|
KolibriOS is a hobby operating system for x86-compatible computers, which is currently being developed by a small but passionate team of enthusiasts.
|
||||||
|
@@ -635,7 +635,6 @@ tup.append_table(extra_files, {
|
|||||||
})
|
})
|
||||||
-- For russian build, add russian-only programs.
|
-- For russian build, add russian-only programs.
|
||||||
if build_type == "ru_RU" then tup.append_table(img_files, {
|
if build_type == "ru_RU" then tup.append_table(img_files, {
|
||||||
{"PERIOD", VAR_PROGS .. "/other/period/trunk/period"},
|
|
||||||
{"GAMES/KLAVISHA", VAR_PROGS .. "/games/klavisha/klavisha"},
|
{"GAMES/KLAVISHA", VAR_PROGS .. "/games/klavisha/klavisha"},
|
||||||
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"},
|
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"},
|
||||||
}) else tup.append_table(img_files, {
|
}) else tup.append_table(img_files, {
|
||||||
@@ -643,6 +642,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
|
|||||||
}) end
|
}) end
|
||||||
|
|
||||||
if build_type == "ru_RU" then tup.append_table(extra_files, {
|
if build_type == "ru_RU" then tup.append_table(extra_files, {
|
||||||
|
{"kolibrios/utils/period", VAR_PROGS .. "/other/period/trunk/period"},
|
||||||
{"kolibrios/games/Dungeons/Dungeons", VAR_PROGS .. "/games/Dungeons/Dungeons"},
|
{"kolibrios/games/Dungeons/Dungeons", VAR_PROGS .. "/games/Dungeons/Dungeons"},
|
||||||
}) end
|
}) end
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2022
|
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2025
|
||||||
//GNU GPL license.
|
//GNU GPL license.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BUGS:
|
BUGS:
|
||||||
- F1 in KFM (move Properties to an external app)
|
|
||||||
- Ctrl+1+2+3+4 in KFM
|
- Ctrl+1+2+3+4 in KFM
|
||||||
- Highlight another commands on Ctrl|Shift in KFM like in Classic KFM
|
- Highlight another commands on Ctrl|Shift in KFM like in Classic KFM
|
||||||
TODO:
|
TODO:
|
||||||
@@ -11,9 +10,9 @@ TODO:
|
|||||||
http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334
|
http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ABOUT_TITLE "EOLITE 5.30"
|
#define ABOUT_TITLE "Eolite 5.32"
|
||||||
#define TITLE_EOLITE "Eolite File Manager 5.30"
|
#define TITLE_EOLITE "Eolite File Manager 5.32"
|
||||||
#define TITLE_KFM "Kolibri File Manager 2.30";
|
#define TITLE_KFM "Kolibri File Manager 2.32";
|
||||||
|
|
||||||
#define MEMSIZE 1024 * 250
|
#define MEMSIZE 1024 * 250
|
||||||
#include "../lib/clipboard.h"
|
#include "../lib/clipboard.h"
|
||||||
@@ -444,6 +443,9 @@ void main()
|
|||||||
}
|
}
|
||||||
EventDriveClick(key_scancode);
|
EventDriveClick(key_scancode);
|
||||||
break;
|
break;
|
||||||
|
case SCAN_CODE_KEY_P:
|
||||||
|
EventCopyItemPath();
|
||||||
|
break;
|
||||||
case SCAN_CODE_KEY_X:
|
case SCAN_CODE_KEY_X:
|
||||||
CopyFilesListToClipboard(CUT);
|
CopyFilesListToClipboard(CUT);
|
||||||
break;
|
break;
|
||||||
@@ -716,7 +718,7 @@ void DrawFilePanels()
|
|||||||
DrawButtonsAroundList();
|
DrawButtonsAroundList();
|
||||||
path = location[active_panel^1];
|
path = location[active_panel^1];
|
||||||
active_panel ^= 1;
|
active_panel ^= 1;
|
||||||
OpenDir2(WITH_REDRAW);
|
OpenDir_without_unselect(WITH_REDRAW);
|
||||||
active_panel ^= 1;
|
active_panel ^= 1;
|
||||||
if (!getSelectedCount()) files_inactive.count = files.count;
|
if (!getSelectedCount()) files_inactive.count = files.count;
|
||||||
llist_copy(#files, #files_active);
|
llist_copy(#files, #files_active);
|
||||||
@@ -729,38 +731,22 @@ void DrawFilePanels()
|
|||||||
|
|
||||||
DrawButtonsAroundList();
|
DrawButtonsAroundList();
|
||||||
path = location[active_panel];
|
path = location[active_panel];
|
||||||
OpenDir2(WITH_REDRAW);
|
OpenDir_without_unselect(WITH_REDRAW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenDir2(char redraw){
|
void OpenDir(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(char redraw){
|
|
||||||
int errornum;
|
|
||||||
unselectAll();
|
unselectAll();
|
||||||
|
OpenDir_without_unselect(redraw);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OpenDir_without_unselect(char redraw) {
|
||||||
|
int errornum;
|
||||||
|
|
||||||
if (buf) free(buf);
|
if (buf) free(buf);
|
||||||
if (errornum = GetDir(#buf, #files.count, path, DIRS_NOROOT)) {
|
if (errornum = GetDir(#buf, #files.count, path, DIRS_NOROOT)) {
|
||||||
history.add(path);
|
history.add(path);
|
||||||
//EventHistoryGoBack();
|
|
||||||
Dir_Up();
|
Dir_Up();
|
||||||
Write_Error(errornum);
|
Write_Error(errornum);
|
||||||
return;
|
return;
|
||||||
@@ -1055,7 +1041,6 @@ void EventHistoryGoForward()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ShowOpenWithDialog()
|
void ShowOpenWithDialog()
|
||||||
{
|
{
|
||||||
byte open_param[4097];
|
byte open_param[4097];
|
||||||
@@ -1149,6 +1134,7 @@ void ShowPopinForm(byte _popin_type)
|
|||||||
break;
|
break;
|
||||||
case POPIN_DELETE:
|
case POPIN_DELETE:
|
||||||
if (!files.count) return;
|
if (!files.count) return;
|
||||||
|
popin_string[0] = -1;
|
||||||
if (!getSelectedCount()) && (!strncmp(#file_name,"..",2)) return;
|
if (!getSelectedCount()) && (!strncmp(#file_name,"..",2)) return;
|
||||||
popinx = DrawEolitePopup(T_YES, T_NO);
|
popinx = DrawEolitePopup(T_YES, T_NO);
|
||||||
WriteTextCenter(popinx, 178, POPIN_W, sc.work_text, T_DELETE_FILE);
|
WriteTextCenter(popinx, 178, POPIN_W, sc.work_text, T_DELETE_FILE);
|
||||||
@@ -1346,6 +1332,12 @@ void EventOpenSearch()
|
|||||||
RunProgram(#program_path, #param);
|
RunProgram(#program_path, #param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void EventCopyItemPath()
|
||||||
|
{
|
||||||
|
Clipboard__CopyText(#file_path);
|
||||||
|
}
|
||||||
|
|
||||||
void ProceedMouseGestures()
|
void ProceedMouseGestures()
|
||||||
{
|
{
|
||||||
char stats;
|
char stats;
|
||||||
|
@@ -4,9 +4,11 @@ char file_actions[]=
|
|||||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Enter
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Enter
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+Ent
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+Ent
|
||||||
-
|
-
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+C
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Ctrl+P
|
||||||
<EFBFBD><EFBFBD>१<EFBFBD><EFBFBD><EFBFBD> |Ctrl+X
|
-
|
||||||
<EFBFBD><EFBFBD>⠢<EFBFBD><EFBFBD><EFBFBD> |Ctrl+V
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+C
|
||||||
|
<EFBFBD><EFBFBD>१<EFBFBD><EFBFBD><EFBFBD>|Ctrl+X
|
||||||
|
<EFBFBD><EFBFBD>⠢<EFBFBD><EFBFBD><EFBFBD>|Ctrl+V
|
||||||
-
|
-
|
||||||
<EFBFBD><EFBFBD>२<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |F2
|
<EFBFBD><EFBFBD>२<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |F2
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Del
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |Del
|
||||||
@@ -15,8 +17,10 @@ char empty_folder_actions[]=
|
|||||||
"<EFBFBD><EFBFBD>⠢<EFBFBD><EFBFBD><EFBFBD> |Ctrl+V";
|
"<EFBFBD><EFBFBD>⠢<EFBFBD><EFBFBD><EFBFBD> |Ctrl+V";
|
||||||
char burger_menu_items[] =
|
char burger_menu_items[] =
|
||||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>|Ctrl+N
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>|Ctrl+N
|
||||||
|
-
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᮫<EFBFBD>|Ctrl+G
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᮫<EFBFBD>|Ctrl+G
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+R
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+F
|
||||||
|
-
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ன<EFBFBD><EFBFBD>|F10
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ன<EFBFBD><EFBFBD>|F10
|
||||||
<EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>";
|
<EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>";
|
||||||
|
|
||||||
@@ -25,6 +29,8 @@ char file_actions[]=
|
|||||||
"Ava |Enter
|
"Ava |Enter
|
||||||
Ava ... |Ctrl+Ent
|
Ava ... |Ctrl+Ent
|
||||||
-
|
-
|
||||||
|
Copy path |Ctrl+P
|
||||||
|
-
|
||||||
Kopeeri |Ctrl+C
|
Kopeeri |Ctrl+C
|
||||||
L<EFBFBD>ika |Ctrl+X
|
L<EFBFBD>ika |Ctrl+X
|
||||||
Aseta |Ctrl+V
|
Aseta |Ctrl+V
|
||||||
@@ -36,8 +42,10 @@ char empty_folder_actions[]=
|
|||||||
"Aseta |Ctrl+V";
|
"Aseta |Ctrl+V";
|
||||||
char burger_menu_items[] =
|
char burger_menu_items[] =
|
||||||
"New window|Ctrl+N
|
"New window|Ctrl+N
|
||||||
|
-
|
||||||
Open console here|Ctrl+G
|
Open console here|Ctrl+G
|
||||||
V<EFBFBD>rskenda|Ctrl+R
|
Search|Ctrl+F
|
||||||
|
-
|
||||||
Settings|F10
|
Settings|F10
|
||||||
About";
|
About";
|
||||||
|
|
||||||
@@ -46,6 +54,8 @@ char file_actions[]=
|
|||||||
"Open |Enter
|
"Open |Enter
|
||||||
Open with... |Ctrl+Ent
|
Open with... |Ctrl+Ent
|
||||||
-
|
-
|
||||||
|
Copy path |Ctrl+P
|
||||||
|
-
|
||||||
Copy |Ctrl+C
|
Copy |Ctrl+C
|
||||||
Cut |Ctrl+X
|
Cut |Ctrl+X
|
||||||
Paste |Ctrl+V
|
Paste |Ctrl+V
|
||||||
@@ -57,8 +67,10 @@ char empty_folder_actions[]=
|
|||||||
"Paste |Ctrl+V";
|
"Paste |Ctrl+V";
|
||||||
char burger_menu_items[] =
|
char burger_menu_items[] =
|
||||||
"New window|Ctrl+N
|
"New window|Ctrl+N
|
||||||
|
-
|
||||||
Open console here|Ctrl+G
|
Open console here|Ctrl+G
|
||||||
Refresh folder|Ctrl+R
|
Search|Ctrl+F
|
||||||
|
-
|
||||||
Settings|F10
|
Settings|F10
|
||||||
About";
|
About";
|
||||||
#endif
|
#endif
|
||||||
@@ -76,17 +88,18 @@ void EventMenuClick(dword _id)
|
|||||||
if (active_menu == MENU_FILE) switch(_id) {
|
if (active_menu == MENU_FILE) switch(_id) {
|
||||||
case 1: EventOpen(0); break;
|
case 1: EventOpen(0); break;
|
||||||
case 2: ShowOpenWithDialog(); break;
|
case 2: ShowOpenWithDialog(); break;
|
||||||
case 3: CopyFilesListToClipboard(COPY); break;
|
case 3: EventCopyItemPath(); break;
|
||||||
case 4: CopyFilesListToClipboard(CUT); break;
|
case 4: CopyFilesListToClipboard(COPY); break;
|
||||||
case 5: EventPaste(path); break;
|
case 5: CopyFilesListToClipboard(CUT); break;
|
||||||
case 6: FnProcess(2); break;
|
case 6: EventPaste(path); break;
|
||||||
case 7: ShowPopinForm(POPIN_DELETE); break;
|
case 7: FnProcess(2); break;
|
||||||
case 8: FnProcess(1); break;
|
case 8: ShowPopinForm(POPIN_DELETE); break;
|
||||||
|
case 9: FnProcess(1); break;
|
||||||
}
|
}
|
||||||
if (active_menu == MENU_BURGER) switch(_id) {
|
if (active_menu == MENU_BURGER) switch(_id) {
|
||||||
case 1: EventOpenNewEolite(); break;
|
case 1: EventOpenNewEolite(); break;
|
||||||
case 2: EventOpenConsoleHere(); break;
|
case 2: EventOpenConsoleHere(); break;
|
||||||
case 3: EventRefreshDisksAndFolders(); break;
|
case 3: EventOpenSearch(); break;
|
||||||
case 4: FnProcess(10); break;
|
case 4: FnProcess(10); break;
|
||||||
case 5: EventShowAbout(); break;
|
case 5: EventShowAbout(); break;
|
||||||
}
|
}
|
||||||
|
@@ -69,7 +69,7 @@ void settings_dialog()
|
|||||||
case evKey:
|
case evKey:
|
||||||
GetKeys();
|
GetKeys();
|
||||||
if (key_scancode==SCAN_CODE_ESC) ExitSettings();
|
if (key_scancode==SCAN_CODE_ESC) ExitSettings();
|
||||||
edit_box_key_c stdcall (#path_start_ed,key_ascii << 8);
|
edit_box_key_c stdcall (#path_start_ed,key_editbox);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case evReDraw:
|
case evReDraw:
|
||||||
|
@@ -50,10 +50,6 @@ opendialog open_folder_dialog =
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TOOLBAR_H 100
|
|
||||||
#define LISTX 0
|
|
||||||
#define LISTY TOOLBAR_H
|
|
||||||
|
|
||||||
//===================================================//
|
//===================================================//
|
||||||
// //
|
// //
|
||||||
// RESULTS //
|
// RESULTS //
|
||||||
@@ -95,9 +91,7 @@ void SearchThread()
|
|||||||
{
|
{
|
||||||
int prev_first, prev_cur_y;
|
int prev_first, prev_cur_y;
|
||||||
|
|
||||||
#ifndef __COFF__
|
|
||||||
load_dll(Proc_lib, #OpenDialog_init,0);
|
load_dll(Proc_lib, #OpenDialog_init,0);
|
||||||
#endif
|
|
||||||
OpenDialog_init stdcall (#open_folder_dialog);
|
OpenDialog_init stdcall (#open_folder_dialog);
|
||||||
|
|
||||||
if (!ESBYTE[path]) strcpy(path, "/sys");
|
if (!ESBYTE[path]) strcpy(path, "/sys");
|
||||||
@@ -107,28 +101,43 @@ void SearchThread()
|
|||||||
loop() switch(@WaitEvent())
|
loop() switch(@WaitEvent())
|
||||||
{
|
{
|
||||||
case evMouse:
|
case evMouse:
|
||||||
|
|
||||||
edit_box_mouse stdcall (#edit_name);
|
edit_box_mouse stdcall (#edit_name);
|
||||||
edit_box_mouse stdcall (#edit_path);
|
edit_box_mouse stdcall (#edit_path);
|
||||||
|
|
||||||
|
|
||||||
|
prev_cur_y = select_list.cur_y;
|
||||||
|
|
||||||
if (SelectList_ProcessMouse()) {
|
if (SelectList_ProcessMouse()) {
|
||||||
SelectList_Draw();
|
SelectList_Draw();
|
||||||
} else {
|
} else {
|
||||||
SelectList_DrawLine(select_list.cur_y);
|
SelectList_DrawLine(select_list.cur_y);
|
||||||
}
|
|
||||||
if (mouse.key&MOUSE_RIGHT) && (mouse.up) && (select_list.MouseOver()) EventOpenFile(false);
|
if (select_list.MouseOver(mouse.x, mouse.y))
|
||||||
break;
|
{
|
||||||
|
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;
|
||||||
case evButton:
|
case evButton:
|
||||||
switch (@GetButtonID()) {
|
switch (@GetButtonID()) {
|
||||||
case 1: @ExitProcess(); break;
|
case 1: @ExitProcess(); break;
|
||||||
case BTN_SEARCH: EventSearch(); break;
|
case BTN_SEARCH: EventSearch(); break;
|
||||||
case BTN_CHOOSE_PATH: EventChooseSearchInPath();
|
case BTN_CHOOSE_PATH: EventChooseSearchInPath();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
break;
|
||||||
case evKey:
|
case evKey:
|
||||||
@GetKeys();
|
GetKeys();
|
||||||
edit_box_key_c stdcall (#edit_name);
|
edit_box_key_c stdcall (#edit_name, key_editbox);
|
||||||
edit_box_key_c stdcall (#edit_path);
|
edit_box_key_c stdcall (#edit_path, key_editbox);
|
||||||
if (key_scancode == SCAN_CODE_TAB) {
|
if (key_scancode == SCAN_CODE_TAB) {
|
||||||
if (edit_name.flags & ed_focus) {
|
if (edit_name.flags & ed_focus) {
|
||||||
edit_name.flags >< edit_path.flags;
|
edit_name.flags >< edit_path.flags;
|
||||||
@@ -143,7 +152,7 @@ void SearchThread()
|
|||||||
if (edit_name.flags & ed_focus) || (edit_path.flags & ed_focus) {
|
if (edit_name.flags & ed_focus) || (edit_path.flags & ed_focus) {
|
||||||
if (SCAN_CODE_ENTER == key_scancode) EventSearch();
|
if (SCAN_CODE_ENTER == key_scancode) EventSearch();
|
||||||
} else {
|
} else {
|
||||||
if (SCAN_CODE_ENTER == key_scancode) EventOpenFile(true);
|
if (SCAN_CODE_ENTER == key_scancode) EventRunFile();
|
||||||
prev_first = select_list.first;
|
prev_first = select_list.first;
|
||||||
prev_cur_y = select_list.cur_y;
|
prev_cur_y = select_list.cur_y;
|
||||||
if (select_list.ProcessKey(key_scancode)) {
|
if (select_list.ProcessKey(key_scancode)) {
|
||||||
@@ -169,17 +178,24 @@ void SearchThread()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define TOOLBAR_H 100
|
||||||
|
#define PAD 10
|
||||||
|
#define LISTX PAD
|
||||||
|
#define LISTY TOOLBAR_H
|
||||||
|
|
||||||
void draw_window_search()
|
void draw_window_search()
|
||||||
{
|
{
|
||||||
SelectList_Init(LISTX, LISTY, Form.cwidth-scroll1.size_x-1, Form.cheight-TOOLBAR_H-1);
|
SelectList_Init(LISTX, LISTY, Form.cwidth-scroll1.size_x-LISTX-LISTX, Form.cheight-TOOLBAR_H-PAD);
|
||||||
SelectList_Draw();
|
SelectList_Draw();
|
||||||
DrawBar(0, TOOLBAR_H-1, Form.cwidth, 1, sc.line);
|
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, 0, Form.cwidth, TOOLBAR_H-1, sc.work);
|
DrawBar(0, 0, Form.cwidth, TOOLBAR_H-1, sc.work);
|
||||||
DrawEditBox(#edit_name);
|
DrawEditBox(#edit_name);
|
||||||
WriteText(edit_name.left-2, edit_name.top-20, 0x90, sc.work_text, T_SEARCH_NAME);
|
WriteText(edit_name.left-2, edit_name.top-20, 0x90, sc.work_text, T_SEARCH_NAME);
|
||||||
edit_path.width = Form.cwidth - 314;
|
edit_path.width = Form.cwidth - 314;
|
||||||
|
DrawStandartCaptButton(PAD, 63, BTN_SEARCH, T_BUTTON_SEARCH);
|
||||||
DrawFileBox(#edit_path, T_SEARCH_PATH, BTN_CHOOSE_PATH);
|
DrawFileBox(#edit_path, T_SEARCH_PATH, BTN_CHOOSE_PATH);
|
||||||
DrawStandartCaptButton(10, 63, BTN_SEARCH, T_BUTTON_SEARCH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectList_DrawLine(dword i)
|
void SelectList_DrawLine(dword i)
|
||||||
@@ -224,6 +240,12 @@ void SelectList_LineChanged()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getfullpath(dword to, path, name) {
|
||||||
|
strcpy(to, path);
|
||||||
|
chrcat(to, '/');
|
||||||
|
strcat(to, name);
|
||||||
|
}
|
||||||
|
|
||||||
//===================================================//
|
//===================================================//
|
||||||
// //
|
// //
|
||||||
// EVENTS //
|
// EVENTS //
|
||||||
@@ -238,22 +260,21 @@ void EventChooseSearchInPath()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void getfullpath(dword to, path, name) {
|
void EventShowFileInFolder()
|
||||||
strcpy(to, path);
|
|
||||||
chrcat(to, '/');
|
|
||||||
strcat(to, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EventOpenFile(int run_file_not_show_in_folder)
|
|
||||||
{
|
{
|
||||||
char full_path[4096];
|
char full_path[4096];
|
||||||
int pos = select_list.cur_y;
|
int pos = select_list.cur_y;
|
||||||
getfullpath(#full_path, results.path.get(pos), results.name.get(pos));
|
getfullpath(#full_path, results.path.get(pos), results.name.get(pos));
|
||||||
if (run_file_not_show_in_folder) {
|
RunProgram(#program_path, #full_path);
|
||||||
RunProgram("/sys/@open", #full_path);
|
}
|
||||||
} else {
|
|
||||||
RunProgram("/sys/file managers/eolite", #full_path);
|
void EventRunFile()
|
||||||
}
|
{
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventSearch()
|
void EventSearch()
|
||||||
|
@@ -9,7 +9,6 @@
|
|||||||
#pragma option -CPA
|
#pragma option -CPA
|
||||||
#initallvar 0
|
#initallvar 0
|
||||||
|
|
||||||
#ifndef __COFF__
|
|
||||||
#jumptomain FALSE
|
#jumptomain FALSE
|
||||||
|
|
||||||
#startaddress 0
|
#startaddress 0
|
||||||
@@ -30,17 +29,6 @@ dword I_Param = #param;
|
|||||||
dword I_Path = #program_path;
|
dword I_Path = #program_path;
|
||||||
char param[4096];
|
char param[4096];
|
||||||
char program_path[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
|
#define bool int
|
||||||
|
|
||||||
@@ -403,6 +391,7 @@ inline fastcall int TestBit( EAX, CL)
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define MINIMIZED 0x02
|
||||||
#define ROLLED_UP 0x04
|
#define ROLLED_UP 0x04
|
||||||
:void DefineAndDrawWindow(dword _x, _y, _w, _h, _window_type, _bgcolor, _title, _flags)
|
:void DefineAndDrawWindow(dword _x, _y, _w, _h, _window_type, _bgcolor, _title, _flags)
|
||||||
{
|
{
|
||||||
|
@@ -116,17 +116,10 @@
|
|||||||
EAX = 37;
|
EAX = 37;
|
||||||
EBX = 2;
|
EBX = 2;
|
||||||
$int 64
|
$int 64
|
||||||
$mov ebx, eax
|
|
||||||
$mov ecx, eax
|
|
||||||
key = EAX;
|
key = EAX;
|
||||||
$and eax, 0x00000001
|
lkm = EAX&MOUSE_LEFT;
|
||||||
$shr ebx, 1
|
pkm = EAX&MOUSE_RIGHT;
|
||||||
$and ebx, 0x00000001
|
mkm = EAX&MOUSE_MIDDLE;
|
||||||
$shr ecx, 2
|
|
||||||
$and ecx, 0x00000001
|
|
||||||
lkm = EAX;
|
|
||||||
pkm = EBX;
|
|
||||||
mkm = ECX;
|
|
||||||
|
|
||||||
//when you release the MOUSE button
|
//when you release the MOUSE button
|
||||||
// Mouse Move Event
|
// Mouse Move Event
|
||||||
|
@@ -6,37 +6,6 @@
|
|||||||
#include "../lib/kolibri.h"
|
#include "../lib/kolibri.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __COFF__
|
|
||||||
extern dword edit_box_draw;
|
|
||||||
extern dword edit_box_key_safe;
|
|
||||||
extern dword edit_box_mouse;
|
|
||||||
extern dword edit_box_set_text;
|
|
||||||
|
|
||||||
extern dword scrollbar_v_draw;
|
|
||||||
extern dword scrollbar_v_mouse;
|
|
||||||
extern dword scrollbar_h_draw;
|
|
||||||
extern dword scrollbar_h_mouse;
|
|
||||||
|
|
||||||
extern dword PathShow_prepare;
|
|
||||||
extern dword PathShow_draw;
|
|
||||||
|
|
||||||
extern dword progressbar_draw;
|
|
||||||
extern dword progressbar_progress;
|
|
||||||
|
|
||||||
extern dword frame_draw;
|
|
||||||
|
|
||||||
/*
|
|
||||||
Legacy support
|
|
||||||
For new programs need to use edit_box_key_safe (or edit_box_key_c
|
|
||||||
with a define below)
|
|
||||||
TODO: change in all cmm programs edit_box_key to edit_box_key_safe (edit_box_key_c)
|
|
||||||
See examples in eolite and imgedit
|
|
||||||
|
|
||||||
This define changed all edit_box_key_c to edit_box_key_safe identifier's
|
|
||||||
*/
|
|
||||||
#define edit_box_key_c edit_box_key_safe
|
|
||||||
|
|
||||||
#else
|
|
||||||
#ifndef INCLUDE_DLL_H
|
#ifndef INCLUDE_DLL_H
|
||||||
#include "../lib/dll.h"
|
#include "../lib/dll.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -242,5 +211,3 @@ struct frame
|
|||||||
frame_draw stdcall (#frame123);
|
frame_draw stdcall (#frame123);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -44,15 +44,14 @@ signed SelectList_ProcessMouse()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mouse.up) && (mouse.click)
|
if (mouse.up) && (select_list.ProcessMouse(mouse.x, mouse.y)) {
|
||||||
if (select_list.ProcessMouse(mouse.x, mouse.y)) {
|
SelectList_LineChanged();
|
||||||
SelectList_LineChanged();
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectList_DrawBorder() {
|
:void SelectList_DrawBorder() {
|
||||||
DrawRectangle3D(select_list.x-2, select_list.y-2,
|
DrawRectangle3D(select_list.x-2, select_list.y-2,
|
||||||
select_list.w+3+scroll1.size_x, select_list.h+3,
|
select_list.w+3+scroll1.size_x, select_list.h+3,
|
||||||
sc.dark, sc.light);
|
sc.dark, sc.light);
|
||||||
@@ -61,8 +60,8 @@ void SelectList_DrawBorder() {
|
|||||||
|
|
||||||
void SelectList_DrawScroller()
|
void SelectList_DrawScroller()
|
||||||
{
|
{
|
||||||
scroll1.bckg_col = MixColors(sc.work, 0xBBBbbb, 80);
|
scroll1.bckg_col = sc.dark; // MixColors(sc.work, 0xBBBbbb, 80);
|
||||||
scroll1.frnt_col = MixColors(sc.work,0xFFFfff,120);
|
scroll1.frnt_col = sc.light; // MixColors(sc.work,0xFFFfff,120);
|
||||||
scroll1.line_col = sc.line;
|
scroll1.line_col = sc.line;
|
||||||
|
|
||||||
scroll1.max_area = select_list.count;
|
scroll1.max_area = select_list.count;
|
||||||
|
@@ -6,7 +6,7 @@ MK_C_SYM(__ieee754_expf)
|
|||||||
fstl %st(1)
|
fstl %st(1)
|
||||||
frndint
|
frndint
|
||||||
fstl %st(2)
|
fstl %st(2)
|
||||||
fsubrp
|
fsubp
|
||||||
f2xm1
|
f2xm1
|
||||||
fld1
|
fld1
|
||||||
faddp
|
faddp
|
||||||
|
@@ -41,6 +41,7 @@ dd 1, start, init_end, end_mem, stack_top, params, 0
|
|||||||
include 'lang.inc' ; Language support for locales: ru_RU (CP866), es_ES, en_US.
|
include 'lang.inc' ; Language support for locales: ru_RU (CP866), es_ES, en_US.
|
||||||
include '../../macros.inc'
|
include '../../macros.inc'
|
||||||
include '../../proc32.inc'
|
include '../../proc32.inc'
|
||||||
|
include "../../string.inc"
|
||||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||||
include '../../dll.inc'
|
include '../../dll.inc'
|
||||||
;include '../../debug.inc'
|
;include '../../debug.inc'
|
||||||
@@ -369,6 +370,12 @@ endl
|
|||||||
|
|
||||||
mcall 30,4,,1
|
mcall 30,4,,1
|
||||||
jmp .n
|
jmp .n
|
||||||
|
@@:
|
||||||
|
stdcall string.length, pathOut
|
||||||
|
add eax, pathOut
|
||||||
|
cmpne [eax - 1], byte '/', @f
|
||||||
|
mov [eax - 1], byte 0
|
||||||
|
dec dword[edtUnpPath.size]
|
||||||
@@:
|
@@:
|
||||||
mcall 30,4,pathOut,1
|
mcall 30,4,pathOut,1
|
||||||
.n:
|
.n:
|
||||||
|
Reference in New Issue
Block a user