Subversion Repositories Kolibri OS

Rev

Rev 8953 | 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
8780 leency 13
Свойства           |F1";
7778 leency 14
char empty_folder_actions[]=
15
"Вставить      |Crl+V";
7813 leency 16
char burger_menu_items[] =
17
"Новое окно|Ctrl+N
18
Открыть консоль|Ctrl+G
8854 leency 19
Обновить папку|Ctrl+R
8764 leency 20
Настройки|F10
21
О программе";
7778 leency 22
 
4042 leency 23
#elif LANG_EST
7778 leency 24
char file_actions[]=
25
"Ava           |Enter
26
Ava ...        |CrlEnt
7796 leency 27
-
7778 leency 28
Kopeeri        |Crl+C
29
Lїika          |Crl+X
30
Aseta          |Crl+V
7796 leency 31
-
7778 leency 32
Nimeta №mber   |F2
33
Kustuta        |Del
8780 leency 34
Properties     |F1";
7778 leency 35
char empty_folder_actions[]=
36
"Aseta         |Crl+V";
7813 leency 37
char burger_menu_items[] =
38
"New window|Ctrl+N
39
Open console here|Ctrl+G
8854 leency 40
Vфrskenda|Ctrl+R
8764 leency 41
Settings|F10
42
About";
7778 leency 43
 
4042 leency 44
#else
7778 leency 45
char file_actions[]=
46
"Open         |Enter
47
Open with...  |CrlEnt
7796 leency 48
-
7778 leency 49
Copy          |Crl+C
50
Cut           |Crl+X
51
Paste         |Crl+V
7796 leency 52
-
7778 leency 53
Rename        |F2
54
Delete        |Del
8780 leency 55
Properties    |F1";
7778 leency 56
char empty_folder_actions[]=
57
"Paste        |Crl+V";
7813 leency 58
char burger_menu_items[] =
59
"New window|Ctrl+N
60
Open console here|Ctrl+G
8854 leency 61
Refresh folder|Ctrl+R
8764 leency 62
Settings|F10
63
About";
4042 leency 64
#endif
65
 
66
 
8953 leency 67
enum { MENU_FILE=1, MENU_NO_FILE, MENU_BURGER };
7778 leency 68
 
69
bool active_menu = false;
70
 
71
void EventMenuClick(dword _id)
4042 leency 72
{
7778 leency 73
	if (active_menu == MENU_NO_FILE) switch(_id) {
9062 leency 74
		case 1: EventPaste(path); break;
4042 leency 75
	}
7778 leency 76
	if (active_menu == MENU_FILE) switch(_id) {
8417 leency 77
		case 1: EventOpen(0); break;
7778 leency 78
		case 2: ShowOpenWithDialog(); break;
8861 leency 79
		case 3: CopyFilesListToClipboard(COPY); break;
80
		case 4: CopyFilesListToClipboard(CUT); break;
9062 leency 81
		case 5: EventPaste(path); break;
7778 leency 82
		case 6: FnProcess(2); break;
8953 leency 83
		case 7: ShowPopinForm(POPIN_DELETE); break;
8780 leency 84
		case 8: FnProcess(1); break;
4072 leency 85
	}
7813 leency 86
	if (active_menu == MENU_BURGER) switch(_id) {
87
		case 1: EventOpenNewEolite(); break;
88
		case 2: EventOpenConsoleHere(); break;
89
		case 3: EventRefreshDisksAndFolders(); break;
8764 leency 90
		case 4: FnProcess(10); break;
8780 leency 91
		case 5: EventShowAbout(); break;
7813 leency 92
	}
7778 leency 93
	active_menu = NULL;
4072 leency 94
}
4042 leency 95
 
7778 leency 96
void EventShowListMenu()
4072 leency 97
{
7778 leency 98
	dword text;
7462 leency 99
 
7778 leency 100
	pause(3);
7462 leency 101
 
7778 leency 102
	if (!files.count) {
103
		text = #empty_folder_actions;
104
		active_menu = MENU_NO_FILE;
105
	} else {
106
		text = #file_actions;
107
		active_menu = MENU_FILE;
108
	}
8020 leency 109
	open_lmenu(mouse.x, mouse.y+3, MENU_TOP_LEFT, NULL, text);
7778 leency 110
}
111
 
7813 leency 112
void EventShowBurgerMenu()
113
{
114
	active_menu = MENU_BURGER;
8020 leency 115
	open_lmenu(Form.cwidth-6, 35, MENU_TOP_RIGHT, NULL, #burger_menu_items);
7813 leency 116
}
117
 
7778 leency 118
bool GetMenuClick()
119
{
7780 leency 120
	dword click_id;
121
	if (active_menu) && (click_id = get_menu_click()) {
122
		EventMenuClick(click_id);
7778 leency 123
		return false;
124
	}
125
	return true;
126
}
127