Subversion Repositories Kolibri OS

Rev

Rev 8020 | Rev 8764 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8020 Rev 8417
1
#ifdef LANG_RUS
1
#ifdef LANG_RUS
2
 
2
 
3
char file_actions[]= 
3
char file_actions[]= 
4
"Žâªàëâì           |Enter
4
"Žâªàëâì           |Enter
5
Žâªàëâì á ¯®¬®éìî  |CrlEnt
5
Žâªàëâì á ¯®¬®éìî  |CrlEnt
6
-
6
-
7
Š®¯¨à®¢ âì         |Crl+C
7
Š®¯¨à®¢ âì         |Crl+C
8
‚ë१ âì           |Crl+X
8
‚ë१ âì           |Crl+X
9
‚áâ ¢¨âì           |Crl+V
9
‚áâ ¢¨âì           |Crl+V
10
-
10
-
11
¥à¥¨¬¥­®¢ âì      |F2
11
¥à¥¨¬¥­®¢ âì      |F2
12
“¤ «¨âì            |Del
12
“¤ «¨âì            |Del
13
‘¢®©á⢠           |F8";
13
‘¢®©á⢠           |F8";
14
char folder_actions[]=
14
char folder_actions[]=
15
"Žâªàëâì       |Enter
15
"Žâªàëâì       |Enter
16
-
16
-
17
Š®¯¨à®¢ âì     |Crl+C
17
Š®¯¨à®¢ âì     |Crl+C
18
‚ë१ âì       |Crl+X
18
‚ë१ âì       |Crl+X
19
‚áâ ¢¨âì       |Crl+V
19
‚áâ ¢¨âì       |Crl+V
20
-
20
-
21
“¤ «¨âì        |Del
21
“¤ «¨âì        |Del
22
‘¢®©á⢠       |F8";
22
‘¢®©á⢠       |F8";
23
char empty_folder_actions[]=
23
char empty_folder_actions[]=
24
"‚áâ ¢¨âì      |Crl+V";
24
"‚áâ ¢¨âì      |Crl+V";
25
char burger_menu_items[] = 
25
char burger_menu_items[] = 
26
"®¢®¥ ®ª­®|Ctrl+N
26
"®¢®¥ ®ª­®|Ctrl+N
27
Žâªàëâì ª®­á®«ì|Ctrl+G
27
Žâªàëâì ª®­á®«ì|Ctrl+G
28
Ž¡­®¢¨âì ¯ ¯ªã|F5
28
Ž¡­®¢¨âì ¯ ¯ªã|F5
29
Ž ¯à®£à ¬¬¥|F1";
29
Ž ¯à®£à ¬¬¥|F1";
30
 
30
 
31
#elif LANG_EST
31
#elif LANG_EST
32
char file_actions[]= 
32
char file_actions[]= 
33
"Ava           |Enter
33
"Ava           |Enter
34
Ava ...        |CrlEnt
34
Ava ...        |CrlEnt
35
-
35
-
36
Kopeeri        |Crl+C
36
Kopeeri        |Crl+C
37
Lõika          |Crl+X
37
Lõika          |Crl+X
38
Aseta          |Crl+V
38
Aseta          |Crl+V
39
-
39
-
40
Nimeta ümber   |F2
40
Nimeta ümber   |F2
41
Kustuta        |Del
41
Kustuta        |Del
42
Properties     |F8";
42
Properties     |F8";
43
char folder_actions[]=
43
char folder_actions[]=
44
"Ava           |Enter
44
"Ava           |Enter
45
-
45
-
46
Kopeeri        |Crl+C
46
Kopeeri        |Crl+C
47
Lõika          |Crl+X
47
Lõika          |Crl+X
48
Aseta          |Crl+V
48
Aseta          |Crl+V
49
-
49
-
50
Kustuta        |Del
50
Kustuta        |Del
51
Properties     |F8";
51
Properties     |F8";
52
char empty_folder_actions[]=
52
char empty_folder_actions[]=
53
"Aseta         |Crl+V";
53
"Aseta         |Crl+V";
54
char burger_menu_items[] = 
54
char burger_menu_items[] = 
55
"New window|Ctrl+N
55
"New window|Ctrl+N
56
Open console here|Ctrl+G
56
Open console here|Ctrl+G
57
Värskenda|F5
57
Värskenda|F5
58
About|F1";
58
About|F1";
59
 
59
 
60
#else
60
#else
61
char file_actions[]= 
61
char file_actions[]= 
62
"Open         |Enter 
62
"Open         |Enter 
63
Open with...  |CrlEnt
63
Open with...  |CrlEnt
64
-
64
-
65
Copy          |Crl+C
65
Copy          |Crl+C
66
Cut           |Crl+X
66
Cut           |Crl+X
67
Paste         |Crl+V
67
Paste         |Crl+V
68
-
68
-
69
Rename        |F2
69
Rename        |F2
70
Delete        |Del
70
Delete        |Del
71
Properties    |F8";
71
Properties    |F8";
72
char folder_actions[]=
72
char folder_actions[]=
73
"Open        |Enter 
73
"Open        |Enter 
74
-
74
-
75
Copy         |Crl+C
75
Copy         |Crl+C
76
Cut          |Crl+X
76
Cut          |Crl+X
77
Paste        |Crl+V
77
Paste        |Crl+V
78
-
78
-
79
Delete       |Del
79
Delete       |Del
80
Properties   |F8";
80
Properties   |F8";
81
char empty_folder_actions[]=
81
char empty_folder_actions[]=
82
"Paste        |Crl+V";
82
"Paste        |Crl+V";
83
char burger_menu_items[] = 
83
char burger_menu_items[] = 
84
"New window|Ctrl+N
84
"New window|Ctrl+N
85
Open console here|Ctrl+G
85
Open console here|Ctrl+G
86
Refresh folder|F5
86
Refresh folder|F5
87
About|F1";
87
About|F1";
88
#endif
88
#endif
89
 
89
 
90
 
90
 
91
enum { MENU_DIR=1, MENU_FILE, MENU_NO_FILE, MENU_BURGER };
91
enum { MENU_DIR=1, MENU_FILE, MENU_NO_FILE, MENU_BURGER };
92
 
92
 
93
bool active_menu = false;
93
bool active_menu = false;
94
 
94
 
95
void EventMenuClick(dword _id)
95
void EventMenuClick(dword _id)
96
{
96
{
97
	if (active_menu == MENU_NO_FILE) switch(_id) {
97
	if (active_menu == MENU_NO_FILE) switch(_id) {
98
		case 1: EventPaste(); break;
98
		case 1: EventPaste(); break;
99
	}
99
	}
100
	if (active_menu == MENU_FILE) switch(_id) {
100
	if (active_menu == MENU_FILE) switch(_id) {
101
		case 1: Open(0); break;
101
		case 1: EventOpen(0); break;
102
		case 2: ShowOpenWithDialog(); break;
102
		case 2: ShowOpenWithDialog(); break;
103
		case 3: EventCopy(NOCUT); break;
103
		case 3: EventCopy(NOCUT); break;
104
		case 4: EventCopy(CUT); break;
104
		case 4: EventCopy(CUT); break;
105
		case 5: EventPaste(); break;
105
		case 5: EventPaste(); break;
106
		case 6: FnProcess(2); break;
106
		case 6: FnProcess(2); break;
107
		case 7: Del_Form(); break;
107
		case 7: Del_Form(); break;
108
		case 8: FnProcess(8); break;
108
		case 8: FnProcess(8); break;
109
	}
109
	}
110
	if (active_menu == MENU_DIR) switch(_id) {
110
	if (active_menu == MENU_DIR) switch(_id) {
111
		case 1: Open(0); break;
111
		case 1: EventOpen(0); break;
112
		case 2: EventCopy(NOCUT); break;
112
		case 2: EventCopy(NOCUT); break;
113
		case 3: EventCopy(CUT); break;
113
		case 3: EventCopy(CUT); break;
114
		case 4: EventPaste(); break;
114
		case 4: EventPaste(); break;
115
		case 5: Del_Form(); break;
115
		case 5: Del_Form(); break;
116
		case 6: FnProcess(8); break;
116
		case 6: FnProcess(8); break;
117
	}
117
	}
118
	if (active_menu == MENU_BURGER) switch(_id) {
118
	if (active_menu == MENU_BURGER) switch(_id) {
119
		case 1: EventOpenNewEolite(); break;
119
		case 1: EventOpenNewEolite(); break;
120
		case 2: EventOpenConsoleHere(); break;
120
		case 2: EventOpenConsoleHere(); break;
121
		case 3: EventRefreshDisksAndFolders(); break;
121
		case 3: EventRefreshDisksAndFolders(); break;
122
		case 4: FnProcess(1); break;		
122
		case 4: FnProcess(1); break;		
123
	}
123
	}
124
	active_menu = NULL;
124
	active_menu = NULL;
125
}
125
}
126
 
126
 
127
void EventShowListMenu()
127
void EventShowListMenu()
128
{
128
{
129
	dword text;
129
	dword text;
130
 
130
 
131
	pause(3);
131
	pause(3);
132
 
132
 
133
	if (!files.count) {
133
	if (!files.count) {
134
		text = #empty_folder_actions;
134
		text = #empty_folder_actions;
135
		active_menu = MENU_NO_FILE;
135
		active_menu = MENU_NO_FILE;
136
	} else if (itdir) {
136
	} else if (itdir) {
137
		text = #folder_actions;
137
		text = #folder_actions;
138
		active_menu = MENU_DIR;
138
		active_menu = MENU_DIR;
139
	} else {
139
	} else {
140
		text = #file_actions;
140
		text = #file_actions;
141
		active_menu = MENU_FILE;
141
		active_menu = MENU_FILE;
142
	}
142
	}
143
	open_lmenu(mouse.x, mouse.y+3, MENU_TOP_LEFT, NULL, text);
143
	open_lmenu(mouse.x, mouse.y+3, MENU_TOP_LEFT, NULL, text);
144
}
144
}
145
 
145
 
146
void EventShowBurgerMenu()
146
void EventShowBurgerMenu()
147
{
147
{
148
	active_menu = MENU_BURGER;
148
	active_menu = MENU_BURGER;
149
	open_lmenu(Form.cwidth-6, 35, MENU_TOP_RIGHT, NULL, #burger_menu_items);
149
	open_lmenu(Form.cwidth-6, 35, MENU_TOP_RIGHT, NULL, #burger_menu_items);
150
}
150
}
151
 
151
 
152
bool GetMenuClick()
152
bool GetMenuClick()
153
{
153
{
154
	dword click_id;
154
	dword click_id;
155
	if (active_menu) && (click_id = get_menu_click()) {
155
	if (active_menu) && (click_id = get_menu_click()) {
156
		EventMenuClick(click_id);
156
		EventMenuClick(click_id);
157
		return false;
157
		return false;
158
	}
158
	}
159
	return true;
159
	return true;
160
}
160
}