Subversion Repositories Kolibri OS

Rev

Rev 7781 | Rev 7813 | 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";
25
 
4042 leency 26
#elif LANG_EST
7778 leency 27
char file_actions[]=
28
"Ava           |Enter
29
Ava ...        |CrlEnt
7796 leency 30
-
7778 leency 31
Kopeeri        |Crl+C
32
Lїika          |Crl+X
33
Aseta          |Crl+V
7796 leency 34
-
7778 leency 35
Nimeta №mber   |F2
36
Kustuta        |Del
37
Properties     |F8";
38
char folder_actions[]=
39
"Ava           |Enter
7796 leency 40
-
7778 leency 41
Kopeeri        |Crl+C
42
Lїika          |Crl+X
43
Aseta          |Crl+V
7796 leency 44
-
7778 leency 45
Kustuta        |Del
46
Properties     |F8";
47
char empty_folder_actions[]=
48
"Aseta         |Crl+V";
49
 
4042 leency 50
#else
7778 leency 51
char file_actions[]=
52
"Open         |Enter
53
Open with...  |CrlEnt
7796 leency 54
-
7778 leency 55
Copy          |Crl+C
56
Cut           |Crl+X
57
Paste         |Crl+V
7796 leency 58
-
7778 leency 59
Rename        |F2
60
Delete        |Del
61
Properties    |F8";
62
char folder_actions[]=
63
"Open        |Enter
7796 leency 64
-
7778 leency 65
Copy         |Crl+C
66
Cut          |Crl+X
67
Paste        |Crl+V
7796 leency 68
-
7778 leency 69
Delete       |Del
70
Properties   |F8";
71
char empty_folder_actions[]=
72
"Paste        |Crl+V";
73
 
4042 leency 74
#endif
75
 
7778 leency 76
//Обновить папку      |F5
77
//Vфrskenda      |F5
78
//Refresh      |F5
4042 leency 79
 
7778 leency 80
enum { MENU_DIR=1, MENU_FILE, MENU_NO_FILE, MENU_BURGER };
81
 
82
bool active_menu = false;
83
 
84
void EventMenuClick(dword _id)
4042 leency 85
{
7778 leency 86
	if (active_menu == MENU_NO_FILE) switch(_id) {
87
		case 1: Paste(); break;
4042 leency 88
	}
7778 leency 89
	if (active_menu == MENU_FILE) switch(_id) {
90
		case 1: Open(0); break;
91
		case 2: ShowOpenWithDialog(); break;
92
		case 3: Copy(#file_path, NOCUT); break;
93
		case 4: Copy(#file_path, CUT); break;
94
		case 5: Paste(); break;
95
		case 6: FnProcess(2); break;
96
		case 7: Del_Form(); break;
97
		case 8: FnProcess(8); break;
4072 leency 98
	}
7778 leency 99
	if (active_menu == MENU_DIR) switch(_id) {
100
		case 1: Open(0); break;
101
		case 2: Copy(#file_path, NOCUT); break;
102
		case 3: Copy(#file_path, CUT); break;
103
		case 4: Paste(); break;
104
		case 5: Del_Form(); break;
105
		case 6: FnProcess(8); break;
106
	}
107
	active_menu = NULL;
4072 leency 108
}
4042 leency 109
 
7778 leency 110
void EventShowListMenu()
4072 leency 111
{
7778 leency 112
	dword text;
7462 leency 113
 
7778 leency 114
	pause(3);
7462 leency 115
 
7778 leency 116
	if (!files.count) {
117
		text = #empty_folder_actions;
118
		active_menu = MENU_NO_FILE;
119
	} else if (itdir) {
120
		text = #folder_actions;
121
		active_menu = MENU_DIR;
122
	} else {
123
		text = #file_actions;
124
		active_menu = MENU_FILE;
125
	}
7781 leency 126
	open_lmenu(mouse.x+Form.left+5, mouse.y+Form.top+3+skin_height, MENU_ALIGN_TOP_LEFT, NULL, text);
7778 leency 127
}
128
 
129
bool GetMenuClick()
130
{
7780 leency 131
	dword click_id;
132
	if (active_menu) && (click_id = get_menu_click()) {
133
		EventMenuClick(click_id);
7778 leency 134
		return false;
135
	}
136
	return true;
137
}
138