Rev 7813 | Rev 8020 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4042 | leency | 1 | #ifdef LANG_RUS |
7778 | leency | 2 | |
3 | char file_actions[]= |
||
4 | "Открыть |Enter |
||
5 | Открыть с помощью |CrlEnt |
||
7796 | leency | 6 | - |
7778 | leency | 7 | Копировать |Crl+C |
8 | Вырезать |Crl+X |
||
9 | Вставить |Crl+V |
||
7796 | leency | 10 | - |
7778 | leency | 11 | Переименовать |F2 |
12 | Удалить |Del |
||
13 | Свойства |F8"; |
||
14 | char folder_actions[]= |
||
15 | "Открыть |Enter |
||
7796 | leency | 16 | - |
7778 | leency | 17 | Копировать |Crl+C |
18 | Вырезать |Crl+X |
||
19 | Вставить |Crl+V |
||
7796 | leency | 20 | - |
7778 | leency | 21 | Удалить |Del |
22 | Свойства |F8"; |
||
23 | char empty_folder_actions[]= |
||
24 | "Вставить |Crl+V"; |
||
7813 | leency | 25 | char burger_menu_items[] = |
26 | "Новое окно|Ctrl+N |
||
27 | Открыть консоль|Ctrl+G |
||
28 | Обновить папку|F5 |
||
29 | О программе|F1"; |
||
7778 | leency | 30 | |
4042 | leency | 31 | #elif LANG_EST |
7778 | leency | 32 | char file_actions[]= |
33 | "Ava |Enter |
||
34 | Ava ... |CrlEnt |
||
7796 | leency | 35 | - |
7778 | leency | 36 | Kopeeri |Crl+C |
37 | Lїika |Crl+X |
||
38 | Aseta |Crl+V |
||
7796 | leency | 39 | - |
7778 | leency | 40 | Nimeta №mber |F2 |
41 | Kustuta |Del |
||
42 | Properties |F8"; |
||
43 | char folder_actions[]= |
||
44 | "Ava |Enter |
||
7796 | leency | 45 | - |
7778 | leency | 46 | Kopeeri |Crl+C |
47 | Lїika |Crl+X |
||
48 | Aseta |Crl+V |
||
7796 | leency | 49 | - |
7778 | leency | 50 | Kustuta |Del |
51 | Properties |F8"; |
||
52 | char empty_folder_actions[]= |
||
53 | "Aseta |Crl+V"; |
||
7813 | leency | 54 | char burger_menu_items[] = |
55 | "New window|Ctrl+N |
||
56 | Open console here|Ctrl+G |
||
57 | Vфrskenda|F5 |
||
58 | About|F1"; |
||
7778 | leency | 59 | |
4042 | leency | 60 | #else |
7778 | leency | 61 | char file_actions[]= |
62 | "Open |Enter |
||
63 | Open with... |CrlEnt |
||
7796 | leency | 64 | - |
7778 | leency | 65 | Copy |Crl+C |
66 | Cut |Crl+X |
||
67 | Paste |Crl+V |
||
7796 | leency | 68 | - |
7778 | leency | 69 | Rename |F2 |
70 | Delete |Del |
||
71 | Properties |F8"; |
||
72 | char folder_actions[]= |
||
73 | "Open |Enter |
||
7796 | leency | 74 | - |
7778 | leency | 75 | Copy |Crl+C |
76 | Cut |Crl+X |
||
77 | Paste |Crl+V |
||
7796 | leency | 78 | - |
7778 | leency | 79 | Delete |Del |
80 | Properties |F8"; |
||
81 | char empty_folder_actions[]= |
||
82 | "Paste |Crl+V"; |
||
7813 | leency | 83 | char burger_menu_items[] = |
84 | "New window|Ctrl+N |
||
85 | Open console here|Ctrl+G |
||
86 | Refresh folder|F5 |
||
87 | About|F1"; |
||
4042 | leency | 88 | #endif |
89 | |||
90 | |||
7778 | leency | 91 | enum { MENU_DIR=1, MENU_FILE, MENU_NO_FILE, MENU_BURGER }; |
92 | |||
93 | bool active_menu = false; |
||
94 | |||
95 | void EventMenuClick(dword _id) |
||
4042 | leency | 96 | { |
7778 | leency | 97 | if (active_menu == MENU_NO_FILE) switch(_id) { |
7878 | leency | 98 | case 1: EventPaste(); break; |
4042 | leency | 99 | } |
7778 | leency | 100 | if (active_menu == MENU_FILE) switch(_id) { |
101 | case 1: Open(0); break; |
||
102 | case 2: ShowOpenWithDialog(); break; |
||
7878 | leency | 103 | case 3: EventCopy(NOCUT); break; |
104 | case 4: EventCopy(CUT); break; |
||
105 | case 5: EventPaste(); break; |
||
7778 | leency | 106 | case 6: FnProcess(2); break; |
107 | case 7: Del_Form(); break; |
||
108 | case 8: FnProcess(8); break; |
||
4072 | leency | 109 | } |
7778 | leency | 110 | if (active_menu == MENU_DIR) switch(_id) { |
111 | case 1: Open(0); break; |
||
7878 | leency | 112 | case 2: EventCopy(NOCUT); break; |
113 | case 3: EventCopy(CUT); break; |
||
114 | case 4: EventPaste(); break; |
||
7778 | leency | 115 | case 5: Del_Form(); break; |
116 | case 6: FnProcess(8); break; |
||
117 | } |
||
7813 | leency | 118 | if (active_menu == MENU_BURGER) switch(_id) { |
119 | case 1: EventOpenNewEolite(); break; |
||
120 | case 2: EventOpenConsoleHere(); break; |
||
121 | case 3: EventRefreshDisksAndFolders(); break; |
||
122 | case 4: FnProcess(1); break; |
||
123 | } |
||
7778 | leency | 124 | active_menu = NULL; |
4072 | leency | 125 | } |
4042 | leency | 126 | |
7778 | leency | 127 | void EventShowListMenu() |
4072 | leency | 128 | { |
7778 | leency | 129 | dword text; |
7462 | leency | 130 | |
7778 | leency | 131 | pause(3); |
7462 | leency | 132 | |
7778 | leency | 133 | if (!files.count) { |
134 | text = #empty_folder_actions; |
||
135 | active_menu = MENU_NO_FILE; |
||
136 | } else if (itdir) { |
||
137 | text = #folder_actions; |
||
138 | active_menu = MENU_DIR; |
||
139 | } else { |
||
140 | text = #file_actions; |
||
141 | active_menu = MENU_FILE; |
||
142 | } |
||
7813 | leency | 143 | open_lmenu(mouse.x+Form.left+5, mouse.y+Form.top+3 |
144 | +skin_height, MENU_ALIGN_TOP_LEFT, NULL, text); |
||
7778 | leency | 145 | } |
146 | |||
7813 | leency | 147 | void EventShowBurgerMenu() |
148 | { |
||
149 | active_menu = MENU_BURGER; |
||
150 | open_lmenu(Form.width-10+Form.left, 35+Form.top+skin_height, |
||
151 | MENU_ALIGN_TOP_RIGHT, NULL, #burger_menu_items); |
||
152 | } |
||
153 | |||
7778 | leency | 154 | bool GetMenuClick() |
155 | { |
||
7780 | leency | 156 | dword click_id; |
157 | if (active_menu) && (click_id = get_menu_click()) { |
||
158 | EventMenuClick(click_id); |
||
7778 | leency | 159 | return false; |
160 | } |
||
161 | return true; |
||
162 | } |
||
163 |