Subversion Repositories Kolibri OS

Rev

Rev 8953 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8953 Rev 9062
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
‘¢®©á⢠           |F1";
13
‘¢®©á⢠           |F1";
14
char empty_folder_actions[]=
14
char empty_folder_actions[]=
15
"‚áâ ¢¨âì      |Crl+V";
15
"‚áâ ¢¨âì      |Crl+V";
16
char burger_menu_items[] = 
16
char burger_menu_items[] = 
17
"®¢®¥ ®ª­®|Ctrl+N
17
"®¢®¥ ®ª­®|Ctrl+N
18
Žâªàëâì ª®­á®«ì|Ctrl+G
18
Žâªàëâì ª®­á®«ì|Ctrl+G
19
Ž¡­®¢¨âì ¯ ¯ªã|Ctrl+R
19
Ž¡­®¢¨âì ¯ ¯ªã|Ctrl+R
20
 áâனª¨|F10
20
 áâனª¨|F10
21
Ž ¯à®£à ¬¬¥";
21
Ž ¯à®£à ¬¬¥";
22
 
22
 
23
#elif LANG_EST
23
#elif LANG_EST
24
char file_actions[]= 
24
char file_actions[]= 
25
"Ava           |Enter
25
"Ava           |Enter
26
Ava ...        |CrlEnt
26
Ava ...        |CrlEnt
27
-
27
-
28
Kopeeri        |Crl+C
28
Kopeeri        |Crl+C
29
Lõika          |Crl+X
29
Lõika          |Crl+X
30
Aseta          |Crl+V
30
Aseta          |Crl+V
31
-
31
-
32
Nimeta ümber   |F2
32
Nimeta ümber   |F2
33
Kustuta        |Del
33
Kustuta        |Del
34
Properties     |F1";
34
Properties     |F1";
35
char empty_folder_actions[]=
35
char empty_folder_actions[]=
36
"Aseta         |Crl+V";
36
"Aseta         |Crl+V";
37
char burger_menu_items[] = 
37
char burger_menu_items[] = 
38
"New window|Ctrl+N
38
"New window|Ctrl+N
39
Open console here|Ctrl+G
39
Open console here|Ctrl+G
40
Värskenda|Ctrl+R
40
Värskenda|Ctrl+R
41
Settings|F10
41
Settings|F10
42
About";
42
About";
43
 
43
 
44
#else
44
#else
45
char file_actions[]= 
45
char file_actions[]= 
46
"Open         |Enter 
46
"Open         |Enter 
47
Open with...  |CrlEnt
47
Open with...  |CrlEnt
48
-
48
-
49
Copy          |Crl+C
49
Copy          |Crl+C
50
Cut           |Crl+X
50
Cut           |Crl+X
51
Paste         |Crl+V
51
Paste         |Crl+V
52
-
52
-
53
Rename        |F2
53
Rename        |F2
54
Delete        |Del
54
Delete        |Del
55
Properties    |F1";
55
Properties    |F1";
56
char empty_folder_actions[]=
56
char empty_folder_actions[]=
57
"Paste        |Crl+V";
57
"Paste        |Crl+V";
58
char burger_menu_items[] = 
58
char burger_menu_items[] = 
59
"New window|Ctrl+N
59
"New window|Ctrl+N
60
Open console here|Ctrl+G
60
Open console here|Ctrl+G
61
Refresh folder|Ctrl+R
61
Refresh folder|Ctrl+R
62
Settings|F10
62
Settings|F10
63
About";
63
About";
64
#endif
64
#endif
65
 
65
 
66
 
66
 
67
enum { MENU_FILE=1, MENU_NO_FILE, MENU_BURGER };
67
enum { MENU_FILE=1, MENU_NO_FILE, MENU_BURGER };
68
 
68
 
69
bool active_menu = false;
69
bool active_menu = false;
70
 
70
 
71
void EventMenuClick(dword _id)
71
void EventMenuClick(dword _id)
72
{
72
{
73
	if (active_menu == MENU_NO_FILE) switch(_id) {
73
	if (active_menu == MENU_NO_FILE) switch(_id) {
74
		case 1: EventPaste(#path); break;
74
		case 1: EventPaste(path); break;
75
	}
75
	}
76
	if (active_menu == MENU_FILE) switch(_id) {
76
	if (active_menu == MENU_FILE) switch(_id) {
77
		case 1: EventOpen(0); break;
77
		case 1: EventOpen(0); break;
78
		case 2: ShowOpenWithDialog(); break;
78
		case 2: ShowOpenWithDialog(); break;
79
		case 3: CopyFilesListToClipboard(COPY); break;
79
		case 3: CopyFilesListToClipboard(COPY); break;
80
		case 4: CopyFilesListToClipboard(CUT); break;
80
		case 4: CopyFilesListToClipboard(CUT); break;
81
		case 5: EventPaste(#path); break;
81
		case 5: EventPaste(path); break;
82
		case 6: FnProcess(2); break;
82
		case 6: FnProcess(2); break;
83
		case 7: ShowPopinForm(POPIN_DELETE); break;
83
		case 7: ShowPopinForm(POPIN_DELETE); break;
84
		case 8: FnProcess(1); break;
84
		case 8: FnProcess(1); break;
85
	}
85
	}
86
	if (active_menu == MENU_BURGER) switch(_id) {
86
	if (active_menu == MENU_BURGER) switch(_id) {
87
		case 1: EventOpenNewEolite(); break;
87
		case 1: EventOpenNewEolite(); break;
88
		case 2: EventOpenConsoleHere(); break;
88
		case 2: EventOpenConsoleHere(); break;
89
		case 3: EventRefreshDisksAndFolders(); break;
89
		case 3: EventRefreshDisksAndFolders(); break;
90
		case 4: FnProcess(10); break;
90
		case 4: FnProcess(10); break;
91
		case 5: EventShowAbout(); break;		
91
		case 5: EventShowAbout(); break;		
92
	}
92
	}
93
	active_menu = NULL;
93
	active_menu = NULL;
94
}
94
}
95
 
95
 
96
void EventShowListMenu()
96
void EventShowListMenu()
97
{
97
{
98
	dword text;
98
	dword text;
99
 
99
 
100
	pause(3);
100
	pause(3);
101
 
101
 
102
	if (!files.count) {
102
	if (!files.count) {
103
		text = #empty_folder_actions;
103
		text = #empty_folder_actions;
104
		active_menu = MENU_NO_FILE;
104
		active_menu = MENU_NO_FILE;
105
	} else {
105
	} else {
106
		text = #file_actions;
106
		text = #file_actions;
107
		active_menu = MENU_FILE;
107
		active_menu = MENU_FILE;
108
	}
108
	}
109
	open_lmenu(mouse.x, mouse.y+3, MENU_TOP_LEFT, NULL, text);
109
	open_lmenu(mouse.x, mouse.y+3, MENU_TOP_LEFT, NULL, text);
110
}
110
}
111
 
111
 
112
void EventShowBurgerMenu()
112
void EventShowBurgerMenu()
113
{
113
{
114
	active_menu = MENU_BURGER;
114
	active_menu = MENU_BURGER;
115
	open_lmenu(Form.cwidth-6, 35, MENU_TOP_RIGHT, NULL, #burger_menu_items);
115
	open_lmenu(Form.cwidth-6, 35, MENU_TOP_RIGHT, NULL, #burger_menu_items);
116
}
116
}
117
 
117
 
118
bool GetMenuClick()
118
bool GetMenuClick()
119
{
119
{
120
	dword click_id;
120
	dword click_id;
121
	if (active_menu) && (click_id = get_menu_click()) {
121
	if (active_menu) && (click_id = get_menu_click()) {
122
		EventMenuClick(click_id);
122
		EventMenuClick(click_id);
123
		return false;
123
		return false;
124
	}
124
	}
125
	return true;
125
	return true;
126
}
126
}