leency ff625706c0 Eolite 5.31: (#187)
- fix: editbox edit text
- fix: remove unnecessary editbox form delete popin
- add: "Copy path" menu item
- add: "Search" to a burger menu

Reviewed-on: https://git.kolibrios.org/KolibriOS/kolibrios/pulls/187
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Reviewed-by: rgimad <rgimad@noreply.localhost>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-03-31 22:40:54 +02:00

141 lines
2.7 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifdef LANG_RUS
char file_actions[]=
"Žâªàëâì |Enter
Žâªàëâì á ¯®¬®éìî |Ctrl+Ent
-
Š®¯¨à®¢ âì ¯ãâì |Ctrl+P
-
Š®¯¨à®¢ âì|Ctrl+C
ë१ âì|Ctrl+X
áâ ¢¨âì|Ctrl+V
-
<EFBFBD>¥à¥¨¬¥­®¢ âì |F2
¤ «¨âì |Del
¢®©á⢠ |F1";
char empty_folder_actions[]=
"‚áâ ¢¨âì |Ctrl+V";
char burger_menu_items[] =
"<EFBFBD>®¢®¥ ®ª­®|Ctrl+N
-
Žâªàëâì ª®­á®«ì|Ctrl+G
<EFBFBD>®¨áª|Ctrl+F
-
<EFBFBD> áâனª¨|F10
Ž ¯à®£à ¬¬¥";
#elif LANG_EST
char file_actions[]=
"Ava |Enter
Ava ... |Ctrl+Ent
-
Copy path |Ctrl+P
-
Kopeeri |Ctrl+C
Lõika |Ctrl+X
Aseta |Ctrl+V
-
Nimeta ümber |F2
Kustuta |Del
Properties |F1";
char empty_folder_actions[]=
"Aseta |Ctrl+V";
char burger_menu_items[] =
"New window|Ctrl+N
-
Open console here|Ctrl+G
Search|Ctrl+F
-
Settings|F10
About";
#else
char file_actions[]=
"Open |Enter
Open with... |Ctrl+Ent
-
Copy path |Ctrl+P
-
Copy |Ctrl+C
Cut |Ctrl+X
Paste |Ctrl+V
-
Rename |F2
Delete |Del
Properties |F1";
char empty_folder_actions[]=
"Paste |Ctrl+V";
char burger_menu_items[] =
"New window|Ctrl+N
-
Open console here|Ctrl+G
Search|Ctrl+F
-
Settings|F10
About";
#endif
enum { MENU_FILE=1, MENU_NO_FILE, MENU_BURGER };
bool active_menu = false;
void EventMenuClick(dword _id)
{
if (active_menu == MENU_NO_FILE) switch(_id) {
case 1: EventPaste(path); break;
}
if (active_menu == MENU_FILE) switch(_id) {
case 1: EventOpen(0); break;
case 2: ShowOpenWithDialog(); break;
case 3: EventCopyItemPath(); break;
case 4: CopyFilesListToClipboard(COPY); break;
case 5: CopyFilesListToClipboard(CUT); break;
case 6: EventPaste(path); break;
case 7: FnProcess(2); break;
case 8: ShowPopinForm(POPIN_DELETE); break;
case 9: FnProcess(1); break;
}
if (active_menu == MENU_BURGER) switch(_id) {
case 1: EventOpenNewEolite(); break;
case 2: EventOpenConsoleHere(); break;
case 3: EventOpenSearch(); break;
case 4: FnProcess(10); break;
case 5: EventShowAbout(); break;
}
active_menu = NULL;
}
void EventShowListMenu()
{
dword text;
pause(3);
if (!files.count) {
text = #empty_folder_actions;
active_menu = MENU_NO_FILE;
} else {
text = #file_actions;
active_menu = MENU_FILE;
}
open_lmenu(mouse.x, mouse.y+3, MENU_TOP_LEFT, NULL, text);
}
void EventShowBurgerMenu()
{
active_menu = MENU_BURGER;
open_lmenu(Form.cwidth-6, 35, MENU_TOP_RIGHT, NULL, #burger_menu_items);
}
bool GetMenuClick()
{
dword click_id;
if (active_menu) && (click_id = get_menu_click()) {
EventMenuClick(click_id);
return false;
}
return true;
}