Subversion Repositories Kolibri OS

Rev

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