* clear out some warnings by gcc 9.3.1.
[alpine.git] / alpine / keymenu.c
blob47350d6913c904082ad5813610637e3f3d73787e
1 #if !defined(lint) && !defined(DOS)
2 static char rcsid[] = "$Id: keymenu.c 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $";
3 #endif
5 /*
6 * ========================================================================
7 * Copyright 2013-2020 Eduardo Chappa
8 * Copyright 2006-2008 University of Washington
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * ========================================================================
19 #include "headers.h"
20 #include "keymenu.h"
21 #include "mailcmd.h"
22 #include "signal.h"
23 #include "status.h"
24 #include "../pith/bitmap.h"
25 #include "../pith/conf.h"
26 #include "../pith/state.h"
30 * We put all of the keymenu definitions here so that it is easy to
31 * share them. The names are in keymenu.h, as well. Some of these
32 * aren't easily shareable because we modify them dynamically but
33 * here they are anyway. It's not altogether clear that this is a good idea.
34 * Perhaps it would be better to just define the keymenus multiple times
35 * in different source files even though they are the same, with static
36 * declarations.
38 * The key numbers are sometimes used symbolically, like OTHER_KEY. Those
39 * are in keymenu.h, too, and are hard to use. If you change a menu here
40 * be sure to check those key numbers that go with it in keymenu.h.
43 #ifdef _WINDOWS
44 void configure_menu_items (struct key_menu *, bitmap_t);
45 #endif
49 * Macro to simplify instantiation of key_menu structs from key structs
51 #define INST_KEY_MENU(X, Y) struct key_menu X = \
52 {sizeof(Y)/(sizeof(Y[0])*12), 0, 0, Y}
54 struct key cancel_keys[] =
55 {HELP_MENU,
56 {"^C",N_("Cancel"),{MC_NONE},KS_NONE},
57 NULL_MENU,
58 NULL_MENU,
59 NULL_MENU,
60 NULL_MENU,
61 NULL_MENU,
62 NULL_MENU,
63 NULL_MENU,
64 NULL_MENU,
65 NULL_MENU,
66 NULL_MENU};
67 INST_KEY_MENU(cancel_keymenu, cancel_keys);
71 * A bunch of these are NULL_MENU because we want to change them dynamically.
73 struct key ab_keys[] =
74 {HELP_MENU,
75 NULL_MENU,
76 NULL_MENU,
77 NULL_MENU,
78 /* TRANSLATORS: go to Previous Entry */
79 {"P", N_("PrevEntry"), {MC_PREVITEM,1,{'p'}}, KS_NONE},
80 /* TRANSLATORS: go to Next Entry */
81 {"N", N_("NextEntry"), {MC_NEXTITEM,1,{'n'}}, KS_NONE},
82 PREVPAGE_MENU,
83 NEXTPAGE_MENU,
84 NULL_MENU,
85 NULL_MENU,
86 NULL_MENU,
87 WHEREIS_MENU,
89 HELP_MENU,
90 OTHER_MENU,
91 QUIT_MENU,
92 NULL_MENU,
93 LISTFLD_MENU,
94 GOTO_MENU,
95 INDEX_MENU,
96 RCOMPOSE_MENU,
97 PRYNTTXT_MENU,
98 NULL_MENU,
99 SAVE_MENU,
100 FORWARD_MENU,
102 HELP_MENU,
103 OTHER_MENU,
104 /* TRANSLATORS: Select this Entry */
105 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_NONE},
106 /* TRANSLATORS: Apply a command to several objects at once */
107 {"A",N_("Apply"),{MC_APPLY,1,{'a'}},KS_APPLY},
108 /* TRANSLATORS: Select Current entry */
109 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
110 /* TRANSLATORS: Zoom refers to zooming in on a smaller set of
111 items, like with a camera zoom lense */
112 {"Z",N_("ZoomMode"),{MC_ZOOM,1,{'z'}},KS_NONE},
113 NULL_MENU,
114 NULL_MENU,
115 NULL_MENU,
116 NULL_MENU,
117 NULL_MENU,
118 NULL_MENU,
119 NULL_MENU};
120 INST_KEY_MENU(ab_keymenu, ab_keys);
123 struct key abook_select_keys[] =
124 {HELP_MENU,
125 NULL_MENU,
126 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
127 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
128 /* TRANSLATORS: go to Previous entry */
129 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
130 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
131 PREVPAGE_MENU,
132 NEXTPAGE_MENU,
133 HOMEKEY_MENU,
134 ENDKEY_MENU,
135 NULL_MENU,
136 WHEREIS_MENU};
137 INST_KEY_MENU(abook_select_km, abook_select_keys);
140 struct key abook_view_keys[] =
141 {HELP_MENU,
142 OTHER_MENU,
143 /* TRANSLATORS: Abook is an abbreviation for Address Book */
144 {"<",N_("Abook"),{MC_EXIT,2,{'<',','}},KS_NONE},
145 {"U",N_("Update"),{MC_EDIT,1,{'u'}},KS_NONE},
146 /* TRANSLATORS: ComposeTo means to start editing a new message to
147 this address book entry */
148 {"C",N_("ComposeTo"),{MC_COMPOSE,1,{'c'}},KS_COMPOSER},
149 RCOMPOSE_MENU,
150 PREVPAGE_MENU,
151 NEXTPAGE_MENU,
152 PRYNTTXT_MENU,
153 WHEREIS_MENU,
154 /* TRANSLATORS: abbreviation for Forward as Email */
155 {"F", N_("Fwd Email"), {MC_FORWARD, 1, {'f'}}, KS_FORWARD},
156 SAVE_MENU,
158 HELP_MENU,
159 OTHER_MENU,
160 /* TRANSLATORS: View the highlighted link, for example, a URL */
161 {"V",N_("ViewLink"),{MC_VIEW_HANDLE,3,{'v',ctrl('m'),ctrl('j')}},KS_NONE},
162 NULL_MENU,
163 /* TRANSLATORS: go to the previous link, for example, the previous URL */
164 {"^B",N_("PrevLink"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
165 {"^F",N_("NextLink"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
166 NULL_MENU,
167 NULL_MENU,
168 NULL_MENU,
169 NULL_MENU,
170 NULL_MENU,
171 NULL_MENU};
172 INST_KEY_MENU(abook_view_keymenu, abook_view_keys);
175 struct key abook_text_keys[] =
176 {HELP_MENU,
177 NULL_MENU,
178 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_NONE},
179 NULL_MENU,
180 NULL_MENU,
181 NULL_MENU,
182 PREVPAGE_MENU,
183 NEXTPAGE_MENU,
184 PRYNTTXT_MENU,
185 WHEREIS_MENU,
186 FWDEMAIL_MENU,
187 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
188 INST_KEY_MENU(abook_text_km, abook_text_keys);
191 struct key ldap_view_keys[] =
192 {HELP_MENU,
193 OTHER_MENU,
194 /* TRANSLATORS: go back to the index of results instead of
195 viewing this particular entry */
196 {"<",N_("Results Index"),{MC_EXIT,2,{'<',','}},KS_NONE},
197 NULL_MENU,
198 {"C", N_("ComposeTo"), {MC_COMPOSE,1,{'c'}}, KS_COMPOSER},
199 RCOMPOSE_MENU,
200 PREVPAGE_MENU,
201 NEXTPAGE_MENU,
202 PRYNTTXT_MENU,
203 WHEREIS_MENU,
204 FWDEMAIL_MENU,
205 SAVE_MENU,
207 HELP_MENU,
208 OTHER_MENU,
209 {"V",N_("ViewLink"),{MC_VIEW_HANDLE,3,{'v',ctrl('m'),ctrl('j')}},KS_NONE},
210 NULL_MENU,
211 {"^B",N_("PrevLink"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
212 {"^F",N_("NextLink"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
213 NULL_MENU,
214 NULL_MENU,
215 NULL_MENU,
216 NULL_MENU,
217 HOMEKEY_MENU,
218 ENDKEY_MENU};
219 INST_KEY_MENU(ldap_view_keymenu, ldap_view_keys);
222 struct key context_mgr_keys[] =
223 {HELP_MENU,
224 OTHER_MENU,
225 {"<", N_("Main Menu"), {MC_MAIN,3,{'m','<',','}}, KS_EXITMODE},
226 /* TRANSLATORS: View this Collection of folders */
227 {">", "[" N_("View Cltn") "]",
228 {MC_CHOICE,5,{'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
229 PREVC_MENU,
230 NEXTC_MENU,
231 PREVPAGE_MENU,
232 NEXTPAGE_MENU,
233 NULL_MENU,
234 NULL_MENU,
235 NULL_MENU,
236 WHEREIS_MENU,
238 HELP_MENU,
239 OTHER_MENU,
240 QUIT_MENU,
241 NULL_MENU,
242 NULL_MENU,
243 GOTO_MENU,
244 CIND_MENU,
245 COMPOSE_MENU,
246 PRYNTTXT_MENU,
247 RCOMPOSE_MENU,
248 HOMEKEY_MENU,
249 ENDKEY_MENU};
250 INST_KEY_MENU(c_mgr_km, context_mgr_keys);
253 struct key context_cfg_keys[] =
254 {HELP_MENU,
255 OTHER_MENU,
256 {"E", N_("Exit Setup"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
257 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
258 PREVC_MENU,
259 NEXTC_MENU,
260 PREVPAGE_MENU,
261 NEXTPAGE_MENU,
262 /* TRANSLATORS; Add a Collection of folders */
263 {"A", N_("Add Cltn"), {MC_ADD,1,{'a'}}, KS_NONE},
264 DELC_MENU,
265 /* TRANSLATORS; Change the order of items in a list */
266 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}},KS_NONE},
267 WHEREIS_MENU,
269 HELP_MENU,
270 OTHER_MENU,
271 NULL_MENU,
272 NULL_MENU,
273 NULL_MENU,
274 NULL_MENU,
275 NULL_MENU,
276 NULL_MENU,
277 PRYNTTXT_MENU,
278 NULL_MENU,
279 HOMEKEY_MENU,
280 ENDKEY_MENU};
281 INST_KEY_MENU(c_cfg_km, context_cfg_keys);
284 struct key context_select_keys[] =
285 {HELP_MENU,
286 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
287 NULL_MENU,
288 /* TRANSLATORS: View this collection */
289 {">", "[" N_("View Cltn") "]",
290 {MC_CHOICE, 5, {'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
291 PREVC_MENU,
292 NEXTC_MENU,
293 PREVPAGE_MENU,
294 NEXTPAGE_MENU,
295 HOMEKEY_MENU,
296 ENDKEY_MENU,
297 NULL_MENU,
298 WHEREIS_MENU};
299 INST_KEY_MENU(c_sel_km, context_select_keys);
302 struct key context_fcc_keys[] =
303 {HELP_MENU,
304 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
305 NULL_MENU,
306 {">", "[" N_("View Cltn") "]",
307 {MC_CHOICE, 5, {'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
308 PREVC_MENU,
309 NEXTC_MENU,
310 PREVPAGE_MENU,
311 NEXTPAGE_MENU,
312 HOMEKEY_MENU,
313 ENDKEY_MENU,
314 NULL_MENU,
315 WHEREIS_MENU};
316 INST_KEY_MENU(c_fcc_km, context_fcc_keys);
318 struct key folder_keys[] =
319 {HELP_MENU,
320 OTHER_MENU,
321 {"<", NULL, {MC_EXIT,2,{'<',','}}, KS_NONE},
322 {">", NULL, {MC_CHOICE,2,{'>','.'}}, KS_NONE},
323 PREVF_MENU,
324 NEXTF_MENU,
325 PREVPAGE_MENU,
326 NEXTPAGE_MENU,
327 /* TRANSLATORS: make an addition, for example add a new folder
328 or a new entry in an address book */
329 {"A",N_("Add"),{MC_ADDFLDR,1,{'a'}},KS_NONE},
330 DELETE_MENU,
331 /* TRANSLATORS: change the name of something */
332 {"R",N_("Rename"),{MC_RENAMEFLDR,1,{'r'}}, KS_NONE},
333 WHEREIS_MENU,
335 HELP_MENU,
336 OTHER_MENU,
337 QUIT_MENU,
338 MAIN_MENU,
339 {"V", "[" N_("View Fldr") "]", {MC_OPENFLDR}, KS_NONE},
340 GOTO_MENU,
341 CIND_MENU,
342 COMPOSE_MENU,
343 {"%", N_("Print"), {MC_PRINTFLDR,1,{'%'}}, KS_PRINT},
344 {"Z", N_("ZoomMode"), {MC_ZOOM,1,{'z'}}, KS_NONE},
345 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_SELECT},
346 /* TRANSLATORS: Select current item */
347 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECT},
349 HELP_MENU,
350 OTHER_MENU,
351 NULL_MENU,
352 NULL_MENU,
353 NULL_MENU,
354 NULL_MENU,
355 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}},KS_NONE},
356 RCOMPOSE_MENU,
357 EXPORT_MENU,
358 /* TRANSLATORS: Import refers to bringing something in from
359 outside of alpine's normal world */
360 {"U", N_("Import"), {MC_IMPORT,1,{'u'}},KS_NONE},
361 HOMEKEY_MENU,
362 ENDKEY_MENU};
363 INST_KEY_MENU(folder_km, folder_keys);
366 struct key folder_sel_keys[] =
367 {HELP_MENU,
368 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
369 NULL_MENU,
370 {NULL, NULL, {MC_CHOICE,0}, KS_NONE},
371 PREVF_MENU,
372 NEXTF_MENU,
373 PREVPAGE_MENU,
374 NEXTPAGE_MENU,
375 {"S", N_("Select"), {MC_OPENFLDR,1,{'s'}}, KS_NONE},
376 NULL_MENU,
377 NULL_MENU,
378 WHEREIS_MENU,
380 HELP_MENU,
381 OTHER_MENU,
382 NULL_MENU,
383 NULL_MENU,
384 NULL_MENU,
385 NULL_MENU,
386 NULL_MENU,
387 NULL_MENU,
388 NULL_MENU,
389 NULL_MENU,
390 HOMEKEY_MENU,
391 ENDKEY_MENU};
392 INST_KEY_MENU(folder_sel_km, folder_sel_keys);
395 struct key folder_sela_keys[] =
396 {HELP_MENU,
397 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
398 NULL_MENU,
399 {NULL, NULL, {MC_CHOICE,0}, KS_NONE},
400 PREVF_MENU,
401 NEXTF_MENU,
402 PREVPAGE_MENU,
403 NEXTPAGE_MENU,
404 {"S", N_("Select"), {MC_OPENFLDR,1,{'s'}}, KS_NONE},
405 NULL_MENU,
406 {"A", N_("AddNew"), {MC_ADD,1,{'a'}}, KS_NONE},
407 WHEREIS_MENU,
409 HELP_MENU,
410 OTHER_MENU,
411 NULL_MENU,
412 NULL_MENU,
413 NULL_MENU,
414 NULL_MENU,
415 NULL_MENU,
416 NULL_MENU,
417 NULL_MENU,
418 NULL_MENU,
419 HOMEKEY_MENU,
420 ENDKEY_MENU};
421 INST_KEY_MENU(folder_sela_km, folder_sela_keys);
424 struct key folder_sub_keys[] =
425 {HELP_MENU,
426 /* TRANSLATORS: Subscribe to a news group */
427 {"S", N_("Subscribe"), {MC_CHOICE,1,{'s'}}, KS_NONE},
428 /* TRANSLATORS: Exit Subscribe screen */
429 {"E", N_("ExitSubscb"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
430 {NULL, "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
431 PREVF_MENU,
432 NEXTF_MENU,
433 PREVPAGE_MENU,
434 NEXTPAGE_MENU,
435 /* TRANSLATORS: List Mode in alpine is where you can select not just
436 one of something but you can select a whole list of something, for
437 example a whole list of addresses to send to. */
438 {"L", N_("List Mode"), {MC_LISTMODE, 1, {'l'}}, KS_NONE},
439 NULL_MENU,
440 NULL_MENU,
441 WHEREIS_MENU,
443 HELP_MENU,
444 OTHER_MENU,
445 NULL_MENU,
446 NULL_MENU,
447 NULL_MENU,
448 NULL_MENU,
449 NULL_MENU,
450 NULL_MENU,
451 NULL_MENU,
452 NULL_MENU,
453 HOMEKEY_MENU,
454 ENDKEY_MENU};
455 INST_KEY_MENU(folder_sub_km, folder_sub_keys);
458 struct key folder_post_keys[] =
459 {HELP_MENU,
460 NULL_MENU,
461 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
462 {"S", "[" N_("Select") "]", {MC_CHOICE, 3, {'s',ctrl('M'),ctrl('J')}}, KS_NONE},
463 PREVF_MENU,
464 NEXTF_MENU,
465 PREVPAGE_MENU,
466 NEXTPAGE_MENU,
467 HOMEKEY_MENU,
468 ENDKEY_MENU,
469 NULL_MENU,
470 WHEREIS_MENU};
471 INST_KEY_MENU(folder_post_km, folder_post_keys);
474 struct key help_keys[] =
475 {MAIN_MENU,
476 {NULL,NULL,{MC_EXIT,1,{'e'}}, KS_EXITMODE},
477 {NULL,NULL,{MC_EXIT,1,{'e'}}, KS_EXITMODE},
478 {NULL,NULL,{MC_VIEW_HANDLE,3,{'v',ctrl('m'),ctrl('j')}},KS_NONE},
479 {"^B",N_("PrevLink"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
480 {"^F",N_("NextLink"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
481 PREVPAGE_MENU,
482 NEXTPAGE_MENU,
483 PRYNTMSG_MENU,
484 {"Z",N_("Print All"),{MC_PRINTALL,1,{'z'}},KS_NONE},
485 {"N",N_("Name"),{MC_EXPORT,1,{'n'}},KS_NONE},
486 WHEREIS_MENU,
488 HELP_MENU,
489 OTHER_MENU,
490 NULL_MENU,
491 NULL_MENU,
492 NULL_MENU,
493 NULL_MENU,
494 NULL_MENU,
495 NULL_MENU,
496 NULL_MENU,
497 NULL_MENU,
498 HOMEKEY_MENU,
499 ENDKEY_MENU};
500 INST_KEY_MENU(help_keymenu, help_keys);
503 struct key rev_msg_keys[] =
504 {HELP_MENU,
505 OTHER_MENU,
506 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
507 NULL_MENU,
508 {"T",NULL,{MC_TOGGLE,1,{'t'}},KS_NONE},
509 {"D",NULL,{MC_JUMP,1,{'d'}},KS_NONE},
510 PREVPAGE_MENU,
511 NEXTPAGE_MENU,
512 PRYNTTXT_MENU,
513 WHEREIS_MENU,
514 FWDEMAIL_MENU,
515 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
517 HELP_MENU,
518 OTHER_MENU,
519 NULL_MENU,
520 NULL_MENU,
521 NULL_MENU,
522 NULL_MENU,
523 NULL_MENU,
524 NULL_MENU,
525 NULL_MENU,
526 NULL_MENU,
527 HOMEKEY_MENU,
528 ENDKEY_MENU};
529 INST_KEY_MENU(rev_msg_keymenu, rev_msg_keys);
532 struct key ans_certfail_keys[] =
533 {NULL_MENU,
534 NULL_MENU,
535 NULL_MENU,
536 /* TRANSLATORS: Continue means to keep going. The user is paused to read
537 something and has to tell us to continue when they are finished. */
538 {"C","[" N_("Continue") "]",{MC_YES,3,{'c',ctrl('J'),ctrl('M')}},KS_NONE},
539 NULL_MENU,
540 NULL_MENU,
541 PREVPAGE_MENU,
542 NEXTPAGE_MENU,
543 NULL_MENU,
544 NULL_MENU,
545 NULL_MENU,
546 NULL_MENU};
547 INST_KEY_MENU(ans_certfail_keymenu, ans_certfail_keys);
550 struct key ans_certquery_keys[] =
551 {HELP_MENU,
552 NULL_MENU,
553 {"Y",N_("Yes, continue"),{MC_YES,1,{'y'}},KS_NONE},
554 {"D","[" N_("Details") "]",{MC_VIEW_HANDLE,3,{'d',ctrl('M'),ctrl('J')}},KS_NONE},
555 {"N",N_("No"),{MC_NO,1,{'n'}},KS_NONE},
556 NULL_MENU,
557 PREVPAGE_MENU,
558 NEXTPAGE_MENU,
559 PRYNTTXT_MENU,
560 WHEREIS_MENU,
561 FWDEMAIL_MENU,
562 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
563 INST_KEY_MENU(ans_certquery_keymenu, ans_certquery_keys);
565 struct key oauth2_alpine_auth_keys[] =
566 {HELP_MENU,
567 NULL_MENU,
568 {"C",N_("Enter Code"),{MC_YES,1,{'c'}},KS_NONE},
569 {"V","[" N_("View URL") "]",{MC_VIEW_HANDLE,3,{'v',ctrl('M'),ctrl('J')}},KS_NONE},
570 {"E",N_("Exit"),{MC_NO,1,{'e'}},KS_NONE},
571 NULL_MENU,
572 PREVPAGE_MENU,
573 NEXTPAGE_MENU,
574 PRYNTTXT_MENU,
575 WHEREIS_MENU,
576 FWDEMAIL_MENU,
577 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
578 INST_KEY_MENU(oauth2_auth_keymenu, oauth2_alpine_auth_keys);
580 struct key oauth2_device_alpine_auth_keys[] =
581 {HELP_MENU,
582 NULL_MENU,
583 NULL_MENU,
584 {"V","[" N_("View URL") "]",{MC_VIEW_HANDLE,3,{'v',ctrl('M'),ctrl('J')}},KS_NONE},
585 {"E",N_("Exit"),{MC_NO,1,{'e'}},KS_NONE},
586 NULL_MENU,
587 PREVPAGE_MENU,
588 NEXTPAGE_MENU,
589 PRYNTTXT_MENU,
590 WHEREIS_MENU,
591 FWDEMAIL_MENU,
592 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
593 INST_KEY_MENU(oauth2_device_auth_keymenu, oauth2_alpine_auth_keys);
595 struct key forge_keys[] =
596 {HELP_MENU,
597 NULL_MENU,
598 {"Y",N_("Yes, continue"),{MC_YES,1,{'y'}},KS_NONE},
599 {"N",N_("No"),{MC_NO,1,{'n'}},KS_NONE},
600 NULL_MENU,
601 NULL_MENU,
602 PREVPAGE_MENU,
603 NEXTPAGE_MENU,
604 PRYNTTXT_MENU,
605 WHEREIS_MENU,
606 FWDEMAIL_MENU,
607 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
608 INST_KEY_MENU(forge_keymenu, forge_keys);
611 struct key listmgr_keys[] =
612 {HELP_MENU,
613 NULL_MENU,
614 /* TRANSLATORS: Exit Command List */
615 {"E",N_("Exit CmdList"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
616 {"Ret","[" N_("Try Command") "]",{MC_VIEW_HANDLE,3,
617 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
618 /* TRANSLATORS: go to Previous Command in list */
619 {"^B",N_("Prev Cmd"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
620 /* TRANSLATORS: go to Next Command in list */
621 {"^F",N_("Next Cmd"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
622 PREVPAGE_MENU,
623 NEXTPAGE_MENU,
624 PRYNTTXT_MENU,
625 WHEREIS_MENU,
626 HOMEKEY_MENU,
627 ENDKEY_MENU};
628 INST_KEY_MENU(listmgr_keymenu, listmgr_keys);
631 struct key index_keys[] =
632 {HELP_MENU,
633 OTHER_MENU,
634 {"<", NULL, {MC_FOLDERS,2,{'<',','}}, KS_NONE},
635 VIEWMSG_MENU,
636 PREVMSG_MENU,
637 NEXTMSG_MENU,
638 PREVPAGE_MENU,
639 NEXTPAGE_MENU,
640 DELETE_MENU,
641 UNDELETE_MENU,
642 REPLY_MENU,
643 FORWARD_MENU,
645 HELP_MENU,
646 OTHER_MENU,
647 MAIN_MENU,
648 QUIT_MENU,
649 COMPOSE_MENU,
650 GOTO_MENU,
651 TAB_MENU,
652 WHEREIS_MENU,
653 PRYNTMSG_MENU,
654 TAKE_MENU,
655 SAVE_MENU,
656 EXPORT_MENU,
658 HELP_MENU,
659 OTHER_MENU,
660 {"X",NULL,{MC_EXPUNGE,1,{'x'}},KS_NONE},
661 /* TRANSLATORS: this stands for unexclude which is the opposite
662 of the exclude command. Exclude eliminates some messages from
663 the view and unexclude gets them back. */
664 {"&",N_("unXclude"),{MC_UNEXCLUDE,1,{'&'}},KS_NONE},
665 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_SELECT},
666 {"A",N_("Apply"),{MC_APPLY,1,{'a'}},KS_APPLY},
667 FLDRSORT_MENU,
668 JUMP_MENU,
669 HDRMODE_MENU,
670 BOUNCE_MENU,
671 FLAG_MENU,
672 PIPE_MENU,
674 HELP_MENU,
675 OTHER_MENU,
676 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
677 {"Z",N_("ZoomMode"),{MC_ZOOM,1,{'z'}},KS_ZOOM},
678 LISTFLD_MENU,
679 RCOMPOSE_MENU,
680 HOMEKEY_MENU,
681 ENDKEY_MENU,
682 NULL_MENU,
683 /* TRANSLATORS: toggles a collapsed view or an expanded view
684 of a message thread on and off */
685 {"/",N_("Collapse/Expand"),{MC_COLLAPSE,1,{'/'}},KS_NONE},
686 {"@", N_("Quota"), {MC_QUOTA,1,{'@'}}, KS_NONE},
687 NULL_MENU};
688 INST_KEY_MENU(index_keymenu, index_keys);
691 struct key simple_index_keys[] =
692 {HELP_MENU,
693 {"E",N_("ExitSelect"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
694 NULL_MENU,
695 {"S","[" N_("Select") "]",{MC_SELECT,3,{'s',ctrl('M'),ctrl('J')}},KS_SELECT},
696 PREVMSG_MENU,
697 NEXTMSG_MENU,
698 PREVPAGE_MENU,
699 NEXTPAGE_MENU,
700 DELETE_MENU,
701 UNDELETE_MENU,
702 WHEREIS_MENU,
703 NULL_MENU};
704 INST_KEY_MENU(simple_index_keymenu, simple_index_keys);
707 struct key thread_keys[] =
708 {HELP_MENU,
709 OTHER_MENU,
710 /* TRANSLATORS: go to the Folder List */
711 {"<", N_("FldrList"), {MC_FOLDERS,2,{'<',','}}, KS_NONE},
712 /* TRANSLATORS: View a Thread of messages */
713 {">", "[" N_("ViewThd") "]", {MC_VIEW_ENTRY,5,{'v','.','>',ctrl('M'),ctrl('J')}},
714 KS_VIEW},
715 /* TRANSLATORS: go to the Previous Thread */
716 {"P", N_("PrevThd"), {MC_PREVITEM, 1, {'p'}}, KS_PREVMSG},
717 /* TRANSLATORS: go to the Next Thread */
718 {"N", N_("NextThd"), {MC_NEXTITEM, 1, {'n'}}, KS_NEXTMSG},
719 PREVPAGE_MENU,
720 NEXTPAGE_MENU,
721 DELETE_MENU,
722 UNDELETE_MENU,
723 REPLY_MENU,
724 FORWARD_MENU,
726 HELP_MENU,
727 OTHER_MENU,
728 MAIN_MENU,
729 QUIT_MENU,
730 COMPOSE_MENU,
731 GOTO_MENU,
732 TAB_MENU,
733 WHEREIS_MENU,
734 PRYNTMSG_MENU,
735 TAKE_MENU,
736 SAVE_MENU,
737 EXPORT_MENU,
739 HELP_MENU,
740 OTHER_MENU,
741 {"X",NULL,{MC_EXPUNGE,1,{'x'}},KS_NONE},
742 {"&",N_("unXclude"),{MC_UNEXCLUDE,1,{'&'}},KS_NONE},
743 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_SELECT},
744 {"A",N_("Apply"),{MC_APPLY,1,{'a'}},KS_APPLY},
745 FLDRSORT_MENU,
746 JUMP_MENU,
747 HDRMODE_MENU,
748 BOUNCE_MENU,
749 FLAG_MENU,
750 PIPE_MENU,
752 HELP_MENU,
753 OTHER_MENU,
754 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
755 {"Z",N_("ZoomMode"),{MC_ZOOM,1,{'z'}},KS_ZOOM},
756 LISTFLD_MENU,
757 RCOMPOSE_MENU,
758 HOMEKEY_MENU,
759 ENDKEY_MENU,
760 NULL_MENU,
761 {"/",N_("Collapse/Expand"),{MC_COLLAPSE,1,{'/'}},KS_NONE},
762 {"@", N_("Quota"), {MC_QUOTA,1,{'@'}}, KS_NONE},
763 NULL_MENU};
764 INST_KEY_MENU(thread_keymenu, thread_keys);
767 struct key att_index_keys[] =
768 {HELP_MENU,
769 OTHER_MENU,
770 {"<",NULL,{MC_EXIT,2,{'<',','}},KS_EXITMODE},
771 {">","[" N_("View") "]",{MC_VIEW_ATCH,5,{'v','>','.',ctrl('M'),ctrl('J')}},
772 KS_VIEW},
773 /* TRANSLATORS: go to Previous Attachment */
774 {"P", N_("PrevAttch"),{MC_PREVITEM,4,{'p',ctrl('B'),ctrl('P'),KEY_UP}},
775 KS_PREVMSG},
776 /* TRANSLATORS: go to Next Attachment */
777 {"N", N_("NextAtch"),
778 {MC_NEXTITEM, 5, {'n','\t',ctrl('F'),ctrl('N'), KEY_DOWN}},
779 KS_NEXTMSG},
780 PREVPAGE_MENU,
781 NEXTPAGE_MENU,
782 DELETE_MENU,
783 UNDELETE_MENU,
784 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
785 {NULL, NULL, {MC_EXPORT, 1, {'e'}}, KS_EXPORT},
787 HELP_MENU,
788 OTHER_MENU,
789 MAIN_MENU,
790 QUIT_MENU,
791 PIPE_MENU,
792 BOUNCE_MENU,
793 /* TRANSLATORS: About Attachment, a short description of the attachment */
794 {"A",N_("AboutAttch"),{MC_ABOUTATCH,1,{'a'}},KS_NONE},
795 WHEREIS_MENU,
796 {"%", N_("Print"), {MC_PRINTMSG,1,{'%'}}, KS_PRINT},
797 INDEX_MENU,
798 REPLY_MENU,
799 FORWARD_MENU,
801 HELP_MENU,
802 OTHER_MENU,
803 HDRMODE_MENU,
804 {"X",N_("eXternal"),{MC_EXTERNAL,1,{'x'}},KS_NONE},
805 NULL_MENU,
806 NULL_MENU,
807 NULL_MENU,
808 NULL_MENU,
809 NULL_MENU,
810 NULL_MENU,
811 NULL_MENU,
812 NULL_MENU};
813 INST_KEY_MENU(att_index_keymenu, att_index_keys);
816 struct key att_view_keys[] =
817 {HELP_MENU,
818 OTHER_MENU,
819 {"<",NULL,{MC_EXIT,2,{'<',','}},KS_EXITMODE},
820 /* TRANSLATORS: View highlighted URL */
821 {"Ret","[" N_("View Hilite") "]",{MC_VIEW_HANDLE,3,
822 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
823 /* TRANSLATORS: go to Previous URL */
824 {"^B",N_("Prev URL"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
825 /* TRANSLATORS: go to Next URL */
826 {"^F",N_("Next URL"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
827 PREVPAGE_MENU,
828 NEXTPAGE_MENU,
829 DELETE_MENU,
830 UNDELETE_MENU,
831 SAVE_MENU,
832 EXPORT_MENU,
834 HELP_MENU,
835 OTHER_MENU,
836 MAIN_MENU,
837 QUIT_MENU,
838 PIPE_MENU,
839 BOUNCE_MENU,
840 HDRMODE_MENU,
841 WHEREIS_MENU,
842 {"%", N_("Print"), {MC_PRINTMSG,1,{'%'}}, KS_PRINT},
843 NULL_MENU,
844 REPLY_MENU,
845 FORWARD_MENU,
847 HELP_MENU,
848 OTHER_MENU,
849 HOMEKEY_MENU,
850 ENDKEY_MENU,
851 NULL_MENU,
852 NULL_MENU,
853 #ifdef SMIME
854 {"^D","Decrypt", {MC_DECRYPT,1,{ctrl('d')}},KS_NONE},
855 {"^E","Security", {MC_SECURITY,1,{ctrl('e')}},KS_NONE},
856 #else
857 NULL_MENU,
858 NULL_MENU,
859 #endif
860 NULL_MENU,
861 NULL_MENU,
862 NULL_MENU,
863 NULL_MENU};
864 INST_KEY_MENU(att_view_keymenu, att_view_keys);
867 struct key view_keys[] =
868 {HELP_MENU,
869 OTHER_MENU,
870 /* TRANSLATORS: go to Message Index */
871 {"<",N_("MsgIndex"),{MC_INDEX,3,{'i','<',','}},KS_FLDRINDEX},
872 /* TRANSLATORS: View the Attachment */
873 {">",N_("ViewAttch"),{MC_VIEW_ATCH,3,{'v','>','.'}},KS_NONE},
874 PREVMSG_MENU,
875 NEXTMSG_MENU,
876 PREVPAGE_MENU,
877 NEXTPAGE_MENU,
878 DELETE_MENU,
879 UNDELETE_MENU,
880 REPLY_MENU,
881 FORWARD_MENU,
883 HELP_MENU,
884 OTHER_MENU,
885 MAIN_MENU,
886 QUIT_MENU,
887 LISTFLD_MENU,
888 GOTO_MENU,
889 COMPOSE_MENU,
890 WHEREIS_MENU,
891 PRYNTMSG_MENU,
892 TAKE_MENU,
893 SAVE_MENU,
894 EXPORT_MENU,
896 HELP_MENU,
897 OTHER_MENU,
898 /* TRANSLATORS: View the highlighted URL */
899 {"Ret","[" N_("View Hilite") "]",{MC_VIEW_HANDLE,3,
900 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
901 /* TRANSLATORS: Select the current item */
902 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
903 /* TRANSLATORS: go to previous URL */
904 {"^B",N_("Prev URL"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
905 /* TRANSLATORS: go to next URL */
906 {"^F",N_("Next URL"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
907 JUMP_MENU,
908 TAB_MENU,
909 HDRMODE_MENU,
910 BOUNCE_MENU,
911 FLAG_MENU,
912 PIPE_MENU,
914 HELP_MENU,
915 OTHER_MENU,
916 HOMEKEY_MENU,
917 ENDKEY_MENU,
918 RCOMPOSE_MENU,
919 {"A",N_("TogglePreferPlain"),{MC_TOGGLE,1,{'a'}},KS_NONE},
920 #ifdef SMIME
921 {"^D","Decrypt", {MC_DECRYPT,1,{ctrl('d')}},KS_NONE},
922 {"^E","Security", {MC_SECURITY,1,{ctrl('e')}},KS_NONE},
923 #else
924 NULL_MENU,
925 NULL_MENU,
926 #endif
927 NULL_MENU,
928 NULL_MENU,
929 NULL_MENU,
930 NULL_MENU};
931 INST_KEY_MENU(view_keymenu, view_keys);
934 struct key simple_text_keys[] =
935 {HELP_MENU,
936 OTHER_MENU,
937 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
938 NULL_MENU,
939 NULL_MENU,
940 NULL_MENU,
941 PREVPAGE_MENU,
942 NEXTPAGE_MENU,
943 PRYNTTXT_MENU,
944 WHEREIS_MENU,
945 FWDEMAIL_MENU,
946 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
948 HELP_MENU,
949 OTHER_MENU,
950 NULL_MENU,
951 NULL_MENU,
952 NULL_MENU,
953 NULL_MENU,
954 NULL_MENU,
955 NULL_MENU,
956 NULL_MENU,
957 NULL_MENU,
958 HOMEKEY_MENU,
959 ENDKEY_MENU};
960 INST_KEY_MENU(simple_text_keymenu, simple_text_keys);
963 struct key oe_keys[] =
964 {{"^G",N_("Help"),{MC_NONE},KS_SCREENHELP},
965 {"^C",N_("Cancel"),{MC_NONE},KS_NONE},
966 {"^T","xxx",{MC_NONE},KS_NONE},
967 /* TRANSLATORS: The user is entering characters, for example, the
968 name of a folder. Accept means the user is done and wants to
969 accept what is currently displayed. */
970 {"Ret",N_("Accept"),{MC_NONE},KS_NONE},
971 NULL_MENU,
972 NULL_MENU,
973 NULL_MENU,
974 NULL_MENU,
975 NULL_MENU,
976 NULL_MENU,
977 NULL_MENU,
978 NULL_MENU};
979 INST_KEY_MENU(oe_keymenu, oe_keys);
982 struct key choose_setup_keys[] =
983 {HELP_MENU,
984 OTHER_MENU,
985 {"E",N_("Exit Setup"),{MC_EXIT,2,{'e',ctrl('C')}},KS_EXITMODE},
986 {"P",N_("Printer"),{MC_PRINTER,1,{'p'}},KS_NONE},
987 /* TRANSLATORS: Change password */
988 {"N",N_("Newpassword"),{MC_PASSWD,1,{'n'}},KS_NONE},
989 /* TRANSLATORS: Configure Alpine */
990 {"C",N_("Config"),{MC_CONFIG,1,{'c'}},KS_NONE},
991 /* TRANSLATORS: Edit signature block */
992 {"S",N_("Signature"),{MC_SIG,1,{'s'}},KS_NONE},
993 /* TRANSLATORS: configure address books */
994 {"A",N_("AddressBooks"),{MC_ABOOKS,1,{'a'}},KS_NONE},
995 /* TRANSLATORS: configure collection lists */
996 {"L",N_("collectionList"),{MC_CLISTS,1,{'l'}},KS_NONE},
997 /* TRANSLATORS: configure rules, an alpine concept */
998 {"R",N_("Rules"),{MC_RULES,1,{'r'}},KS_NONE},
999 /* TRANSLATORS: configure directory servers */
1000 {"D",N_("Directory"),{MC_DIRECTORY,1,{'d'}},KS_NONE},
1001 /* TRANSLATORS: configure color */
1002 {"K",N_("Kolor"),{MC_KOLOR,1,{'k'}},KS_NONE},
1004 HELP_MENU,
1005 OTHER_MENU,
1006 NULL_MENU,
1007 /* TRANSLATORS: remote configuration setup */
1008 {"Z",N_("RemoteConfigSetup"),{MC_REMOTE,1,{'z'}},KS_NONE},
1009 /* TRANSLATORS: configure S/MIME */
1010 {"M",N_("S/Mime"),{MC_SECURITY,1,{'m'}},KS_NONE},
1011 {"U",N_("xoaUth2"),{MC_XOAUTH2,1,{'u'}},KS_NONE},
1012 PREVPAGE_MENU,
1013 NEXTPAGE_MENU,
1014 NULL_MENU,
1015 NULL_MENU,
1016 HOMEKEY_MENU,
1017 ENDKEY_MENU};
1018 INST_KEY_MENU(choose_setup_keymenu, choose_setup_keys);
1021 struct key main_keys[] =
1022 {HELP_MENU,
1023 OTHER_MENU,
1024 NULL_MENU,
1025 NULL_MENU,
1026 /* TRANSLATORS: go to Previous Command in list */
1027 {"P",N_("PrevCmd"),{MC_PREVITEM,3,{'p',ctrl('P'),KEY_UP}},KS_NONE},
1028 {"N",N_("NextCmd"),{MC_NEXTITEM,3,{'n',ctrl('N'),KEY_DOWN}},KS_NONE},
1029 NULL_MENU,
1030 NULL_MENU,
1031 /* TRANSLATORS: show release notes */
1032 {"R",N_("RelNotes"),{MC_RELNOTES,1,{'r'}},KS_NONE},
1033 /* TRANSLATORS: lock keyboard */
1034 {"K",N_("KBLock"),{MC_KBLOCK,1,{'k'}},KS_NONE},
1035 NULL_MENU,
1036 NULL_MENU,
1038 HELP_MENU,
1039 OTHER_MENU,
1040 QUIT_MENU,
1041 COMPOSE_MENU,
1042 LISTFLD_MENU,
1043 GOTO_MENU,
1044 {"I",N_("Index"),{MC_INDEX,1,{'i'}},KS_FLDRINDEX},
1045 /* TRANSLATORS: go to the Journal. The Journal shows past
1046 messages that alpine has shown the user. */
1047 {"J",N_("Journal"),{MC_JOURNAL,1,{'j'}},KS_REVIEW},
1048 /* TRANSLATORS: go to the Setup screen */
1049 {"S",N_("Setup"),{MC_SETUP,1,{'s'}},KS_NONE},
1050 /* TRANSLATORS: go to the address book screen */
1051 {"A",N_("AddrBook"),{MC_ADDRBOOK,1,{'a'}},KS_ADDRBOOK},
1052 RCOMPOSE_MENU,
1053 NULL_MENU};
1054 INST_KEY_MENU(main_keymenu, main_keys);
1057 struct key simple_file_keys[] =
1058 {HELP_MENU,
1059 OTHER_MENU,
1060 {"Q",N_("Quit Viewer"),{MC_EXIT,1,{'q'}},KS_NONE},
1061 NULL_MENU,
1062 NULL_MENU,
1063 NULL_MENU,
1064 PREVPAGE_MENU,
1065 NEXTPAGE_MENU,
1066 PRYNTTXT_MENU,
1067 WHEREIS_MENU,
1068 FWDEMAIL_MENU,
1069 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
1071 HELP_MENU,
1072 OTHER_MENU,
1073 NULL_MENU,
1074 NULL_MENU,
1075 NULL_MENU,
1076 NULL_MENU,
1077 NULL_MENU,
1078 NULL_MENU,
1079 NULL_MENU,
1080 NULL_MENU,
1081 HOMEKEY_MENU,
1082 ENDKEY_MENU};
1083 INST_KEY_MENU(simple_file_keymenu, simple_file_keys);
1086 struct key nuov_keys[] =
1087 {HELP_MENU,
1088 OTHER_MENU,
1089 {"E",NULL,{MC_EXIT,1,{'e'}},KS_NONE},
1090 {"V",N_("ViewLink"),{MC_VIEW_HANDLE,3,{'v',ctrl('m'),ctrl('j')}},KS_NONE},
1091 NULL_MENU,
1092 NULL_MENU,
1093 PREVPAGE_MENU,
1094 NEXTPAGE_MENU,
1095 PRYNTMSG_MENU,
1096 NULL_MENU,
1097 /* TRANSLATORS: show release notes */
1098 {"R",N_("RelNotes"),{MC_RELNOTES,1,{'r'}},KS_NONE},
1099 NULL_MENU,
1101 HELP_MENU,
1102 OTHER_MENU,
1103 NULL_MENU,
1104 NULL_MENU,
1105 NULL_MENU,
1106 NULL_MENU,
1107 NULL_MENU,
1108 NULL_MENU,
1109 NULL_MENU,
1110 NULL_MENU,
1111 HOMEKEY_MENU,
1112 ENDKEY_MENU};
1113 INST_KEY_MENU(nuov_keymenu, nuov_keys);
1116 struct key modal_message_keys[] =
1117 {NULL_MENU,
1118 NULL_MENU,
1119 {"Ret",N_("Finished"),{MC_EXIT,2,{ctrl('m'),ctrl('j')}},KS_NONE},
1120 NULL_MENU,
1121 NULL_MENU,
1122 NULL_MENU,
1123 PREVPAGE_MENU,
1124 NEXTPAGE_MENU,
1125 NULL_MENU,
1126 NULL_MENU,
1127 HOMEKEY_MENU,
1128 ENDKEY_MENU};
1129 INST_KEY_MENU(modal_message_keymenu, modal_message_keys);
1132 struct key ta_keys_lm[] =
1133 {HELP_MENU,
1134 WHEREIS_MENU,
1135 TA_EXIT_MENU,
1136 /* TRANSLATORS: Take this address into the address book */
1137 {"T", N_("Take"), {MC_TAKE,1,{'t'}}, KS_NONE},
1138 TA_PREV_MENU,
1139 TA_NEXT_MENU,
1140 PREVPAGE_MENU,
1141 NEXTPAGE_MENU,
1142 {"X","[" N_("Set/Unset") "]", {MC_CHOICE,3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
1143 {"A", N_("SetAll"),{MC_SELALL,1,{'a'}},KS_NONE},
1144 {"U",N_("UnSetAll"),{MC_UNSELALL,1,{'u'}},KS_NONE},
1145 /* TRANSLATORS: The Take Address screen has a Single mode and a
1146 List mode. This command causes us to go into Single mode. */
1147 {"S",N_("SinglMode"),{MC_LISTMODE,1,{'s'}},KS_NONE}};
1148 INST_KEY_MENU(ta_keymenu_lm, ta_keys_lm);
1151 struct key ta_keys_sm[] =
1152 {HELP_MENU,
1153 WHEREIS_MENU,
1154 TA_EXIT_MENU,
1155 {"T","[" N_("Take") "]",{MC_TAKE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
1156 TA_PREV_MENU,
1157 TA_NEXT_MENU,
1158 PREVPAGE_MENU,
1159 NEXTPAGE_MENU,
1160 NULL_MENU,
1161 NULL_MENU,
1162 NULL_MENU,
1163 /* TRANSLATORS: The Take Address screen has a Single mode and a
1164 List mode. This command causes us to go into List mode. */
1165 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE}};
1166 INST_KEY_MENU(ta_keymenu_sm, ta_keys_sm);
1169 struct key pipe_cancel_keys[] =
1170 {NULL_MENU,
1171 {"^C",N_("Stop Waiting"),{MC_NONE},KS_NONE},
1172 NULL_MENU,
1173 NULL_MENU,
1174 NULL_MENU,
1175 NULL_MENU,
1176 NULL_MENU,
1177 NULL_MENU,
1178 NULL_MENU,
1179 NULL_MENU,
1180 NULL_MENU,
1181 NULL_MENU};
1182 INST_KEY_MENU(pipe_cancel_keymenu, pipe_cancel_keys);
1185 struct key color_pattern_keys[] =
1186 {HELP_MENU,
1187 OTHER_MENU,
1188 EXIT_SETUP_MENU,
1189 /* TRANSLATORS: Change Value */
1190 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1191 PREV_MENU,
1192 NEXT_MENU,
1193 PREVPAGE_MENU,
1194 NEXTPAGE_MENU,
1195 NULL_MENU,
1196 /* TRANSLATORS: Delete Value */
1197 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1198 PRYNTTXT_MENU,
1199 WHEREIS_MENU,
1201 HELP_MENU,
1202 OTHER_MENU,
1203 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
1204 NULL_MENU,
1205 NULL_MENU,
1206 NULL_MENU,
1207 NULL_MENU,
1208 NULL_MENU,
1209 NULL_MENU,
1210 NULL_MENU,
1211 HOMEKEY_MENU,
1212 ENDKEY_MENU};
1213 INST_KEY_MENU(color_pattern_keymenu, color_pattern_keys);
1216 struct key hdr_color_checkbox_keys[] =
1217 {HELP_MENU,
1218 NULL_MENU,
1219 EXIT_SETUP_MENU,
1220 TOGGLEB_MENU,
1221 PREV_MENU,
1222 NEXT_MENU,
1223 PREVPAGE_MENU,
1224 NEXTPAGE_MENU,
1225 HOMEKEY_MENU,
1226 ENDKEY_MENU,
1227 PRYNTTXT_MENU,
1228 WHEREIS_MENU};
1229 INST_KEY_MENU(hdr_color_checkbox_keymenu, hdr_color_checkbox_keys);
1232 struct key kw_color_checkbox_keys[] =
1233 {HELP_MENU,
1234 NULL_MENU,
1235 EXIT_SETUP_MENU,
1236 TOGGLEC_MENU,
1237 PREV_MENU,
1238 NEXT_MENU,
1239 PREVPAGE_MENU,
1240 NEXTPAGE_MENU,
1241 HOMEKEY_MENU,
1242 ENDKEY_MENU,
1243 PRYNTTXT_MENU,
1244 WHEREIS_MENU};
1245 INST_KEY_MENU(kw_color_checkbox_keymenu, kw_color_checkbox_keys);
1248 struct key selectable_bold_checkbox_keys[] =
1249 {HELP_MENU,
1250 NULL_MENU,
1251 EXIT_SETUP_MENU,
1252 TOGGLED_MENU,
1253 PREV_MENU,
1254 NEXT_MENU,
1255 PREVPAGE_MENU,
1256 NEXTPAGE_MENU,
1257 HOMEKEY_MENU,
1258 ENDKEY_MENU,
1259 PRYNTTXT_MENU,
1260 WHEREIS_MENU};
1261 INST_KEY_MENU(selectable_bold_checkbox_keymenu, selectable_bold_checkbox_keys);
1264 struct key flag_keys[] =
1265 {HELP_MENU,
1266 {"A", N_("Add KW"), {MC_ADD,1,{'a'}}, KS_NONE},
1267 /* TRANSLATORS: Exit from the Flags screen */
1268 {"E", N_("Exit Flags"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1269 TOGGLE_MENU,
1270 PREV_MENU,
1271 NEXT_MENU,
1272 PREVPAGE_MENU,
1273 NEXTPAGE_MENU,
1274 HOMEKEY_MENU,
1275 ENDKEY_MENU,
1276 PRYNTTXT_MENU,
1277 WHEREIS_MENU};
1278 INST_KEY_MENU(flag_keymenu, flag_keys);
1281 struct key addr_select_keys[] =
1282 {HELP_MENU,
1283 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1284 NULL_MENU,
1285 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1286 PREV_MENU,
1287 NEXT_MENU,
1288 PREVPAGE_MENU,
1289 NEXTPAGE_MENU,
1290 HOMEKEY_MENU,
1291 ENDKEY_MENU,
1292 NULL_MENU,
1293 WHEREIS_MENU};
1294 INST_KEY_MENU(addr_s_km, addr_select_keys);
1297 struct key addr_select_with_goback_keys[] =
1298 {HELP_MENU,
1299 NULL_MENU,
1300 /* TRANSLATORS: go to address book list */
1301 {"<", N_("AddressBkList"), {MC_ADDRBOOK,2,{'<',','}}, KS_NONE},
1302 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1303 PREV_MENU,
1304 NEXT_MENU,
1305 PREVPAGE_MENU,
1306 NEXTPAGE_MENU,
1307 HOMEKEY_MENU,
1308 ENDKEY_MENU,
1309 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1310 WHEREIS_MENU};
1311 INST_KEY_MENU(addr_s_km_with_goback, addr_select_with_goback_keys);
1313 static struct key addr_select_with_view_keys[] =
1314 {HELP_MENU,
1315 RCOMPOSE_MENU,
1316 {"<", N_("AddressBkList"), {MC_ADDRBOOK,2,{'<',','}}, KS_NONE},
1317 {">", "[" N_("View") "]",
1318 {MC_VIEW_TEXT,5,{'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
1319 PREV_MENU,
1320 NEXT_MENU,
1321 PREVPAGE_MENU,
1322 NEXTPAGE_MENU,
1323 /* TRANSLATORS: compose a message to the current address */
1324 {"C", N_("ComposeTo"), {MC_COMPOSE,1,{'c'}}, KS_COMPOSER},
1325 FWDEMAIL_MENU,
1326 SAVE_MENU,
1327 WHEREIS_MENU,
1329 HELP_MENU,
1330 OTHER_MENU,
1331 NULL_MENU,
1332 NULL_MENU,
1333 NULL_MENU,
1334 NULL_MENU,
1335 NULL_MENU,
1336 NULL_MENU,
1337 NULL_MENU,
1338 NULL_MENU,
1339 HOMEKEY_MENU,
1340 ENDKEY_MENU};
1341 INST_KEY_MENU(addr_s_km_with_view, addr_select_with_view_keys);
1344 struct key addr_select_for_url_keys[] =
1345 {HELP_MENU,
1346 RCOMPOSE_MENU,
1347 {"<", N_("Exit Viewer"), {MC_ADDRBOOK,3,{'<',',','e'}}, KS_NONE},
1348 {">", "[" N_("View") "]",
1349 {MC_VIEW_TEXT,5,{'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
1350 PREV_MENU,
1351 NEXT_MENU,
1352 PREVPAGE_MENU,
1353 NEXTPAGE_MENU,
1354 {"C", N_("ComposeTo"), {MC_COMPOSE,1,{'c'}}, KS_COMPOSER},
1355 FWDEMAIL_MENU,
1356 SAVE_MENU,
1357 WHEREIS_MENU,
1359 HELP_MENU,
1360 OTHER_MENU,
1361 NULL_MENU,
1362 NULL_MENU,
1363 NULL_MENU,
1364 NULL_MENU,
1365 NULL_MENU,
1366 NULL_MENU,
1367 NULL_MENU,
1368 NULL_MENU,
1369 HOMEKEY_MENU,
1370 ENDKEY_MENU};
1371 INST_KEY_MENU(addr_s_km_for_url, addr_select_for_url_keys);
1374 struct key addr_select_exit_keys[] =
1375 {NULL_MENU,
1376 NULL_MENU,
1377 {"E", "[" N_("Exit") "]", {MC_EXIT,3,{'e',ctrl('M'),ctrl('J')}},
1378 KS_EXITMODE},
1379 NULL_MENU,
1380 NULL_MENU,
1381 NULL_MENU,
1382 NULL_MENU,
1383 NULL_MENU,
1384 NULL_MENU,
1385 NULL_MENU,
1386 NULL_MENU,
1387 NULL_MENU};
1388 INST_KEY_MENU(addr_s_km_exit, addr_select_exit_keys);
1391 struct key addr_select_goback_keys[] =
1392 {NULL_MENU,
1393 NULL_MENU,
1394 {"E", "[" N_("Exit") "]", {MC_ADDRBOOK,3,{'e',ctrl('M'),ctrl('J')}},
1395 KS_EXITMODE},
1396 NULL_MENU,
1397 NULL_MENU,
1398 NULL_MENU,
1399 NULL_MENU,
1400 NULL_MENU,
1401 NULL_MENU,
1402 NULL_MENU,
1403 NULL_MENU,
1404 NULL_MENU};
1405 INST_KEY_MENU(addr_s_km_goback, addr_select_goback_keys);
1408 struct key config_text_keys[] =
1409 {HELP_MENU,
1410 OTHER_MENU,
1411 EXIT_SETUP_MENU,
1412 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1413 PREV_MENU,
1414 NEXT_MENU,
1415 PREVPAGE_MENU,
1416 NEXTPAGE_MENU,
1417 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1418 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1419 PRYNTTXT_MENU,
1420 WHEREIS_MENU,
1422 HELP_MENU,
1423 OTHER_MENU,
1424 NULL_MENU,
1425 NULL_MENU,
1426 NULL_MENU,
1427 NULL_MENU,
1428 NULL_MENU,
1429 NULL_MENU,
1430 NULL_MENU,
1431 NULL_MENU,
1432 HOMEKEY_MENU,
1433 ENDKEY_MENU};
1434 INST_KEY_MENU(config_text_keymenu, config_text_keys);
1436 struct key config_xoauth2_text_keys[] =
1437 {HELP_MENU,
1438 OTHER_MENU,
1439 EXIT_SETUP_MENU,
1440 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1441 PREV_MENU,
1442 NEXT_MENU,
1443 PREVPAGE_MENU,
1444 NEXTPAGE_MENU,
1445 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1446 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1447 PRYNTTXT_MENU,
1448 WHEREIS_MENU,
1450 HELP_MENU,
1451 OTHER_MENU,
1452 {"^A", N_("Add Server"), {MC_XSADD,1,{ctrl('A')}}, KS_NONE},
1453 {"^D", N_("Del Server"), {MC_XSDELETE,1,{ctrl('d')}}, KS_NONE},
1454 NULL_MENU,
1455 {"^H", N_("Conf Help"), {MC_XSHELP,1,{ctrl('h')}}, KS_NONE},
1456 NULL_MENU,
1457 NULL_MENU,
1458 NULL_MENU,
1459 NULL_MENU,
1460 HOMEKEY_MENU,
1461 ENDKEY_MENU};
1462 INST_KEY_MENU(config_xoauth2_text_keymenu, config_xoauth2_text_keys);
1465 struct key config_text_to_charsets_keys[] =
1466 {HELP_MENU,
1467 OTHER_MENU,
1468 EXIT_SETUP_MENU,
1469 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1470 PREV_MENU,
1471 NEXT_MENU,
1472 PREVPAGE_MENU,
1473 NEXTPAGE_MENU,
1474 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1475 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1476 PRYNTTXT_MENU,
1477 WHEREIS_MENU,
1479 HELP_MENU,
1480 OTHER_MENU,
1481 NULL_MENU,
1482 NULL_MENU,
1483 /* TRANSLATORS: go to list of keywords */
1484 {"T", N_("ToCharsets"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1485 NULL_MENU,
1486 NULL_MENU,
1487 NULL_MENU,
1488 NULL_MENU,
1489 NULL_MENU,
1490 HOMEKEY_MENU,
1491 ENDKEY_MENU};
1492 INST_KEY_MENU(config_text_to_charsets_keymenu, config_text_to_charsets_keys);
1495 struct key direct_config_keys[] =
1496 {HELP_MENU,
1497 NULL_MENU,
1498 {"E", N_("Exit Setup"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1499 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1500 /* TRANSLATORS: go to previous LDAP directory server in the list */
1501 {"P", N_("PrevDir"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1502 {"N", N_("NextDir"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1503 PREVPAGE_MENU,
1504 NEXTPAGE_MENU,
1505 /* TRANSLATORS: add a directory server to configuration */
1506 {"A", N_("Add Dir"), {MC_ADD,1,{'a'}}, KS_NONE},
1507 /* TRANSLATORS: delete a directory */
1508 {"D", N_("Del Dir"), {MC_DELETE,1,{'d'}}, KS_NONE},
1509 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1510 WHEREIS_MENU,
1512 HELP_MENU,
1513 OTHER_MENU,
1514 NULL_MENU,
1515 NULL_MENU,
1516 NULL_MENU,
1517 NULL_MENU,
1518 NULL_MENU,
1519 NULL_MENU,
1520 NULL_MENU,
1521 NULL_MENU,
1522 HOMEKEY_MENU,
1523 ENDKEY_MENU};
1524 INST_KEY_MENU(dir_conf_km, direct_config_keys);
1527 struct key sel_from_list_keys[] =
1528 {HELP_MENU,
1529 NULL_MENU,
1530 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1531 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1532 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1533 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1534 PREVPAGE_MENU,
1535 NEXTPAGE_MENU,
1536 HOMEKEY_MENU,
1537 ENDKEY_MENU,
1538 PRYNTTXT_MENU,
1539 WHEREIS_MENU};
1540 INST_KEY_MENU(sel_from_list, sel_from_list_keys);
1543 struct key sel_from_list_keys_ctrlc[] =
1544 {HELP_MENU,
1545 NULL_MENU,
1546 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1547 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1548 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1549 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1550 PREVPAGE_MENU,
1551 NEXTPAGE_MENU,
1552 HOMEKEY_MENU,
1553 ENDKEY_MENU,
1554 PRYNTTXT_MENU,
1555 WHEREIS_MENU};
1556 INST_KEY_MENU(sel_from_list_ctrlc, sel_from_list_keys_ctrlc);
1559 struct key sel_from_list_keys_sm[] =
1560 {HELP_MENU,
1561 OTHER_MENU,
1562 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1563 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1564 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1565 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1566 PREVPAGE_MENU,
1567 NEXTPAGE_MENU,
1568 NULL_MENU,
1569 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE},
1570 PRYNTTXT_MENU,
1571 WHEREIS_MENU,
1573 HELP_MENU,
1574 OTHER_MENU,
1575 NULL_MENU,
1576 NULL_MENU,
1577 NULL_MENU,
1578 NULL_MENU,
1579 NULL_MENU,
1580 NULL_MENU,
1581 NULL_MENU,
1582 NULL_MENU,
1583 HOMEKEY_MENU,
1584 ENDKEY_MENU};
1585 INST_KEY_MENU(sel_from_list_sm, sel_from_list_keys_sm);
1588 struct key sel_from_list_keys_sm_ctrlc[] =
1589 {HELP_MENU,
1590 OTHER_MENU,
1591 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1592 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1593 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1594 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1595 PREVPAGE_MENU,
1596 NEXTPAGE_MENU,
1597 NULL_MENU,
1598 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE},
1599 PRYNTTXT_MENU,
1600 WHEREIS_MENU,
1602 HELP_MENU,
1603 OTHER_MENU,
1604 NULL_MENU,
1605 NULL_MENU,
1606 NULL_MENU,
1607 NULL_MENU,
1608 NULL_MENU,
1609 NULL_MENU,
1610 NULL_MENU,
1611 NULL_MENU,
1612 HOMEKEY_MENU,
1613 ENDKEY_MENU};
1614 INST_KEY_MENU(sel_from_list_sm_ctrlc, sel_from_list_keys_sm_ctrlc);
1617 struct key sel_from_list_keys_lm[] =
1618 {HELP_MENU,
1619 OTHER_MENU,
1620 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1621 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1622 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1623 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1624 PREVPAGE_MENU,
1625 NEXTPAGE_MENU,
1626 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1627 {"1",N_("SinglMode"),{MC_LISTMODE,1,{'1'}},KS_NONE},
1628 PRYNTTXT_MENU,
1629 WHEREIS_MENU,
1631 HELP_MENU,
1632 OTHER_MENU,
1633 NULL_MENU,
1634 NULL_MENU,
1635 NULL_MENU,
1636 NULL_MENU,
1637 NULL_MENU,
1638 NULL_MENU,
1639 NULL_MENU,
1640 NULL_MENU,
1641 HOMEKEY_MENU,
1642 ENDKEY_MENU};
1643 INST_KEY_MENU(sel_from_list_lm, sel_from_list_keys_lm);
1646 struct key sel_from_list_keys_lm_ctrlc[] =
1647 {HELP_MENU,
1648 OTHER_MENU,
1649 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1650 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1651 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1652 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1653 PREVPAGE_MENU,
1654 NEXTPAGE_MENU,
1655 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1656 {"1",N_("SinglMode"),{MC_LISTMODE,1,{'1'}},KS_NONE},
1657 PRYNTTXT_MENU,
1658 WHEREIS_MENU,
1660 HELP_MENU,
1661 OTHER_MENU,
1662 NULL_MENU,
1663 NULL_MENU,
1664 NULL_MENU,
1665 NULL_MENU,
1666 NULL_MENU,
1667 NULL_MENU,
1668 NULL_MENU,
1669 NULL_MENU,
1670 HOMEKEY_MENU,
1671 ENDKEY_MENU};
1672 INST_KEY_MENU(sel_from_list_lm_ctrlc, sel_from_list_keys_lm_ctrlc);
1675 struct key sel_from_list_keys_olm[] =
1676 {HELP_MENU,
1677 OTHER_MENU,
1678 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1679 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1680 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1681 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1682 PREVPAGE_MENU,
1683 NEXTPAGE_MENU,
1684 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1685 NULL_MENU,
1686 PRYNTTXT_MENU,
1687 WHEREIS_MENU,
1689 HELP_MENU,
1690 OTHER_MENU,
1691 NULL_MENU,
1692 NULL_MENU,
1693 NULL_MENU,
1694 NULL_MENU,
1695 NULL_MENU,
1696 NULL_MENU,
1697 NULL_MENU,
1698 NULL_MENU,
1699 HOMEKEY_MENU,
1700 ENDKEY_MENU};
1701 INST_KEY_MENU(sel_from_list_olm, sel_from_list_keys_olm);
1704 struct key sel_from_list_keys_olm_ctrlc[] =
1705 {HELP_MENU,
1706 OTHER_MENU,
1707 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1708 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1709 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1710 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1711 PREVPAGE_MENU,
1712 NEXTPAGE_MENU,
1713 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1714 NULL_MENU,
1715 PRYNTTXT_MENU,
1716 WHEREIS_MENU,
1718 HELP_MENU,
1719 OTHER_MENU,
1720 NULL_MENU,
1721 NULL_MENU,
1722 NULL_MENU,
1723 NULL_MENU,
1724 NULL_MENU,
1725 NULL_MENU,
1726 NULL_MENU,
1727 NULL_MENU,
1728 HOMEKEY_MENU,
1729 ENDKEY_MENU};
1730 INST_KEY_MENU(sel_from_list_olm_ctrlc, sel_from_list_keys_olm_ctrlc);
1733 #ifndef DOS
1735 struct key printer_edit_keys[] =
1736 {HELP_MENU,
1737 PRYNTTXT_MENU,
1738 EXIT_SETUP_MENU,
1739 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1740 PREV_MENU,
1741 NEXT_MENU,
1742 PREVPAGE_MENU,
1743 NEXTPAGE_MENU,
1744 /* TRANSLATORS: add a printer to configuration */
1745 {"A", N_("Add Printer"), {MC_ADD,1,{'a'}}, KS_NONE},
1746 /* TRANSLATORS: delete a printer from configuration */
1747 {"D", N_("DeletePrint"), {MC_DELETE,1,{'d'}}, KS_NONE},
1748 {"C", N_("Change"), {MC_EDIT,1,{'c'}}, KS_NONE},
1749 WHEREIS_MENU,
1751 HELP_MENU,
1752 OTHER_MENU,
1753 NULL_MENU,
1754 NULL_MENU,
1755 NULL_MENU,
1756 NULL_MENU,
1757 NULL_MENU,
1758 NULL_MENU,
1759 NULL_MENU,
1760 NULL_MENU,
1761 HOMEKEY_MENU,
1762 ENDKEY_MENU};
1763 INST_KEY_MENU(printer_edit_keymenu, printer_edit_keys);
1766 struct key printer_select_keys[] =
1767 {HELP_MENU,
1768 PRYNTTXT_MENU,
1769 EXIT_SETUP_MENU,
1770 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1771 PREV_MENU,
1772 NEXT_MENU,
1773 PREVPAGE_MENU,
1774 NEXTPAGE_MENU,
1775 HOMEKEY_MENU,
1776 ENDKEY_MENU,
1777 NULL_MENU,
1778 WHEREIS_MENU};
1779 INST_KEY_MENU(printer_select_keymenu, printer_select_keys);
1781 #endif /* !DOS */
1784 struct key role_select_keys[] =
1785 {HELP_MENU,
1786 NULL_MENU,
1787 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1788 NULL_MENU,
1789 /* TRANSLATORS: go to previous Role in list */
1790 {"P", N_("PrevRole"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1791 {"N", N_("NextRole"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1792 PREVPAGE_MENU,
1793 NEXTPAGE_MENU,
1794 HOMEKEY_MENU,
1795 ENDKEY_MENU,
1796 {"D", "", {MC_TOGGLE, 1, {'d'}}, KS_NONE},
1797 WHEREIS_MENU};
1798 INST_KEY_MENU(role_select_km, role_select_keys);
1800 struct key xoauth2_flow_select_keys[] =
1801 {HELP_MENU,
1802 NULL_MENU,
1803 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1804 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1805 {"P", N_("PrevFlow"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1806 {"N", N_("NextFlow"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1807 PREVPAGE_MENU,
1808 NEXTPAGE_MENU,
1809 HOMEKEY_MENU,
1810 ENDKEY_MENU,
1811 NULL_MENU,
1812 WHEREIS_MENU};
1813 INST_KEY_MENU(xoauth2_flow_select_km, xoauth2_flow_select_keys);
1815 struct key xoauth2_id_select_keys[] =
1816 {HELP_MENU,
1817 NULL_MENU,
1818 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1819 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1820 {"P", N_("PrevID"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1821 {"N", N_("NextID"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1822 PREVPAGE_MENU,
1823 NEXTPAGE_MENU,
1824 HOMEKEY_MENU,
1825 ENDKEY_MENU,
1826 NULL_MENU,
1827 WHEREIS_MENU};
1828 INST_KEY_MENU(xoauth2_id_select_km, xoauth2_id_select_keys);
1831 struct key role_config_keys[] =
1832 {HELP_MENU,
1833 OTHER_MENU,
1834 {"E", N_("Exit Setup"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1835 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1836 /* TRANSLATORS: go to previous Rule in list */
1837 {"P", N_("PrevRule"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1838 {"N", N_("NextRule"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1839 PREVPAGE_MENU,
1840 NEXTPAGE_MENU,
1841 {"A", N_("Add"), {MC_ADD,1,{'a'}}, KS_NONE},
1842 {"D", N_("Delete"), {MC_DELETE,1,{'d'}}, KS_NONE},
1843 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1844 WHEREIS_MENU,
1846 HELP_MENU,
1847 OTHER_MENU,
1848 NULL_MENU,
1849 NULL_MENU,
1850 /* TRANSLATORS: Include a File from filesystem */
1851 {"I", N_("IncludeFile"), {MC_ADDFILE,1,{'i'}}, KS_NONE},
1852 {"X", N_("eXcludeFile"), {MC_DELFILE,1,{'x'}}, KS_NONE},
1853 NULL_MENU,
1854 NULL_MENU,
1855 {"R", N_("Replicate"), {MC_COPY,1,{'r'}}, KS_NONE},
1856 NULL_MENU,
1857 HOMEKEY_MENU,
1858 ENDKEY_MENU};
1859 INST_KEY_MENU(role_conf_km, role_config_keys);
1862 struct key config_text_wshuf_keys[] =
1863 {HELP_MENU,
1864 OTHER_MENU,
1865 EXIT_SETUP_MENU,
1866 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1867 PREV_MENU,
1868 NEXT_MENU,
1869 PREVPAGE_MENU,
1870 NEXTPAGE_MENU,
1871 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1872 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1873 PRYNTTXT_MENU,
1874 WHEREIS_MENU,
1876 HELP_MENU,
1877 OTHER_MENU,
1878 NULL_MENU,
1879 NULL_MENU,
1880 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1881 NULL_MENU,
1882 NULL_MENU,
1883 NULL_MENU,
1884 NULL_MENU,
1885 NULL_MENU,
1886 HOMEKEY_MENU,
1887 ENDKEY_MENU};
1888 INST_KEY_MENU(config_text_wshuf_keymenu, config_text_wshuf_keys);
1890 struct key config_xoauth2_wshuf_keys[] =
1891 {HELP_MENU,
1892 OTHER_MENU,
1893 EXIT_SETUP_MENU,
1894 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1895 PREV_MENU,
1896 NEXT_MENU,
1897 PREVPAGE_MENU,
1898 NEXTPAGE_MENU,
1899 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1900 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1901 PRYNTTXT_MENU,
1902 WHEREIS_MENU,
1904 HELP_MENU,
1905 OTHER_MENU,
1906 {"^A", N_("Add Server"), {MC_XSADD,1,{ctrl('A')}}, KS_NONE},
1907 {"^D", N_("Del Server"), {MC_XSDELETE,1,{ctrl('d')}}, KS_NONE},
1908 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1909 {"^H", N_("Conf Help"), {MC_XSHELP,1,{ctrl('h')}}, KS_NONE},
1910 NULL_MENU,
1911 NULL_MENU,
1912 NULL_MENU,
1913 NULL_MENU,
1914 HOMEKEY_MENU,
1915 ENDKEY_MENU};
1916 INST_KEY_MENU(config_xoauth2_wshuf_keymenu, config_xoauth2_wshuf_keys);
1918 struct key config_text_wshufandfldr_keys[] =
1919 {HELP_MENU,
1920 OTHER_MENU,
1921 EXIT_SETUP_MENU,
1922 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1923 PREV_MENU,
1924 NEXT_MENU,
1925 PREVPAGE_MENU,
1926 NEXTPAGE_MENU,
1927 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1928 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1929 PRYNTTXT_MENU,
1930 WHEREIS_MENU,
1932 HELP_MENU,
1933 OTHER_MENU,
1934 NULL_MENU,
1935 NULL_MENU,
1936 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1937 {"T", N_("ToFldrs"), {MC_CHOICE,2,{'t', ctrl('T')}}, KS_NONE},
1938 NULL_MENU,
1939 NULL_MENU,
1940 NULL_MENU,
1941 NULL_MENU,
1942 HOMEKEY_MENU,
1943 ENDKEY_MENU};
1944 INST_KEY_MENU(config_text_wshufandfldr_keymenu, config_text_wshufandfldr_keys);
1947 struct key config_role_file_keys[] =
1948 {HELP_MENU,
1949 OTHER_MENU,
1950 EXIT_SETUP_MENU,
1951 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1952 PREV_MENU,
1953 NEXT_MENU,
1954 PREVPAGE_MENU,
1955 NEXTPAGE_MENU,
1956 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1957 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1958 PRYNTTXT_MENU,
1959 WHEREIS_MENU,
1961 HELP_MENU,
1962 OTHER_MENU,
1963 NULL_MENU,
1964 NULL_MENU,
1965 /* TRANSLATORS: go to list of Files */
1966 {"T", N_("ToFiles"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1967 /* TRANSLATORS: edit a file */
1968 {"F", N_("editFile"), {MC_EDITFILE, 1, {'f'}}, KS_NONE},
1969 NULL_MENU,
1970 NULL_MENU,
1971 NULL_MENU,
1972 NULL_MENU,
1973 HOMEKEY_MENU,
1974 ENDKEY_MENU};
1975 INST_KEY_MENU(config_role_file_keymenu, config_role_file_keys);
1978 struct key config_role_file_res_keys[] =
1979 {HELP_MENU,
1980 OTHER_MENU,
1981 EXIT_SETUP_MENU,
1982 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1983 PREV_MENU,
1984 NEXT_MENU,
1985 PREVPAGE_MENU,
1986 NEXTPAGE_MENU,
1987 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1988 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1989 PRYNTTXT_MENU,
1990 WHEREIS_MENU,
1992 HELP_MENU,
1993 OTHER_MENU,
1994 NULL_MENU,
1995 NULL_MENU,
1996 {"T", N_("ToFiles"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1997 NULL_MENU,
1998 NULL_MENU,
1999 NULL_MENU,
2000 NULL_MENU,
2001 NULL_MENU,
2002 HOMEKEY_MENU,
2003 ENDKEY_MENU};
2004 INST_KEY_MENU(config_role_file_res_keymenu, config_role_file_res_keys);
2007 struct key config_role_keyword_keys[] =
2008 {HELP_MENU,
2009 OTHER_MENU,
2010 EXIT_SETUP_MENU,
2011 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2012 PREV_MENU,
2013 NEXT_MENU,
2014 PREVPAGE_MENU,
2015 NEXTPAGE_MENU,
2016 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2017 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2018 PRYNTTXT_MENU,
2019 WHEREIS_MENU,
2021 HELP_MENU,
2022 OTHER_MENU,
2023 NULL_MENU,
2024 NULL_MENU,
2025 /* TRANSLATORS: go to list of keywords */
2026 {"T", N_("ToKeywords"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2027 NULL_MENU,
2028 NULL_MENU,
2029 NULL_MENU,
2030 NULL_MENU,
2031 NULL_MENU,
2032 HOMEKEY_MENU,
2033 ENDKEY_MENU};
2034 INST_KEY_MENU(config_role_keyword_keymenu, config_role_keyword_keys);
2037 struct key config_role_keyword_keys_not[] =
2038 {HELP_MENU,
2039 OTHER_MENU,
2040 EXIT_SETUP_MENU,
2041 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2042 PREV_MENU,
2043 NEXT_MENU,
2044 PREVPAGE_MENU,
2045 NEXTPAGE_MENU,
2046 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2047 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2048 PRYNTTXT_MENU,
2049 WHEREIS_MENU,
2051 HELP_MENU,
2052 OTHER_MENU,
2053 NULL_MENU,
2054 NULL_MENU,
2055 {"T", N_("ToKeywords"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2056 NULL_MENU,
2057 /* TRANSLATORS: toggle between NOT and not NOT, turn NOT on or off */
2058 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2059 NULL_MENU,
2060 NULL_MENU,
2061 NULL_MENU,
2062 HOMEKEY_MENU,
2063 ENDKEY_MENU};
2064 INST_KEY_MENU(config_role_keyword_keymenu_not, config_role_keyword_keys_not);
2067 struct key config_role_charset_keys_not[] =
2068 {HELP_MENU,
2069 OTHER_MENU,
2070 EXIT_SETUP_MENU,
2071 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2072 PREV_MENU,
2073 NEXT_MENU,
2074 PREVPAGE_MENU,
2075 NEXTPAGE_MENU,
2076 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2077 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2078 PRYNTTXT_MENU,
2079 WHEREIS_MENU,
2081 HELP_MENU,
2082 OTHER_MENU,
2083 NULL_MENU,
2084 NULL_MENU,
2085 /* TRANSLATORS: go to list of character sets */
2086 {"T", N_("ToCharSets"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2087 NULL_MENU,
2088 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2089 NULL_MENU,
2090 NULL_MENU,
2091 NULL_MENU,
2092 HOMEKEY_MENU,
2093 ENDKEY_MENU};
2094 INST_KEY_MENU(config_role_charset_keymenu_not, config_role_charset_keys_not);
2097 struct key config_role_keys[] =
2098 {HELP_MENU,
2099 OTHER_MENU,
2100 EXIT_SETUP_MENU,
2101 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2102 PREV_MENU,
2103 NEXT_MENU,
2104 PREVPAGE_MENU,
2105 NEXTPAGE_MENU,
2106 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2107 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2108 PRYNTTXT_MENU,
2109 WHEREIS_MENU,
2111 HELP_MENU,
2112 OTHER_MENU,
2113 NULL_MENU,
2114 NULL_MENU,
2115 NULL_MENU,
2116 NULL_MENU,
2117 NULL_MENU,
2118 NULL_MENU,
2119 NULL_MENU,
2120 NULL_MENU,
2121 HOMEKEY_MENU,
2122 ENDKEY_MENU};
2123 INST_KEY_MENU(config_role_keymenu, config_role_keys);
2126 struct key config_role_keys_not[] =
2127 {HELP_MENU,
2128 OTHER_MENU,
2129 EXIT_SETUP_MENU,
2130 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2131 PREV_MENU,
2132 NEXT_MENU,
2133 PREVPAGE_MENU,
2134 NEXTPAGE_MENU,
2135 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2136 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2137 PRYNTTXT_MENU,
2138 WHEREIS_MENU,
2140 HELP_MENU,
2141 OTHER_MENU,
2142 NULL_MENU,
2143 NULL_MENU,
2144 NULL_MENU,
2145 /* TRANSLATORS: add extra headers to list */
2146 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2147 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2148 NULL_MENU,
2149 NULL_MENU,
2150 NULL_MENU,
2151 HOMEKEY_MENU,
2152 ENDKEY_MENU};
2153 INST_KEY_MENU(config_role_keymenu_not, config_role_keys_not);
2156 struct key config_role_keys_extra[] =
2157 {HELP_MENU,
2158 NULL_MENU,
2159 EXIT_SETUP_MENU,
2160 {"X", "[" N_("eXtraHdr") "]", {MC_ADDHDR, 3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
2161 PREV_MENU,
2162 NEXT_MENU,
2163 PREVPAGE_MENU,
2164 NEXTPAGE_MENU,
2165 HOMEKEY_MENU,
2166 ENDKEY_MENU,
2167 PRYNTTXT_MENU,
2168 WHEREIS_MENU};
2169 INST_KEY_MENU(config_role_keymenu_extra, config_role_keys_extra);
2172 struct key config_role_addr_pat_keys[] =
2173 {HELP_MENU,
2174 OTHER_MENU,
2175 EXIT_SETUP_MENU,
2176 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2177 PREV_MENU,
2178 NEXT_MENU,
2179 PREVPAGE_MENU,
2180 NEXTPAGE_MENU,
2181 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2182 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2183 PRYNTTXT_MENU,
2184 WHEREIS_MENU,
2186 HELP_MENU,
2187 OTHER_MENU,
2188 NULL_MENU,
2189 NULL_MENU,
2190 /* TRANSLATORS: go to address book to get address */
2191 {"T", N_("ToAddrBk"), {MC_CHOICEB, 2, {'t', ctrl('T')}}, KS_NONE},
2192 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2193 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2194 NULL_MENU,
2195 NULL_MENU,
2196 NULL_MENU,
2197 HOMEKEY_MENU,
2198 ENDKEY_MENU};
2199 INST_KEY_MENU(config_role_addr_pat_keymenu, config_role_addr_pat_keys);
2202 struct key config_role_xtrahdr_keys[] =
2203 {HELP_MENU,
2204 OTHER_MENU,
2205 EXIT_SETUP_MENU,
2206 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2207 PREV_MENU,
2208 NEXT_MENU,
2209 PREVPAGE_MENU,
2210 NEXTPAGE_MENU,
2211 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2212 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2213 PRYNTTXT_MENU,
2214 WHEREIS_MENU,
2216 HELP_MENU,
2217 OTHER_MENU,
2218 NULL_MENU,
2219 NULL_MENU,
2220 NULL_MENU,
2221 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2222 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2223 NULL_MENU,
2224 /* TRANSLATORS: remove a header we previously added */
2225 {"R", N_("RemoveHdr"), {MC_DELHDR, 1, {'r'}}, KS_NONE},
2226 NULL_MENU,
2227 HOMEKEY_MENU,
2228 ENDKEY_MENU};
2229 INST_KEY_MENU(config_role_xtrahdr_keymenu, config_role_xtrahdr_keys);
2232 struct key config_role_addr_act_keys[] =
2233 {HELP_MENU,
2234 OTHER_MENU,
2235 EXIT_SETUP_MENU,
2236 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2237 PREV_MENU,
2238 NEXT_MENU,
2239 PREVPAGE_MENU,
2240 NEXTPAGE_MENU,
2241 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2242 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2243 PRYNTTXT_MENU,
2244 WHEREIS_MENU,
2246 HELP_MENU,
2247 OTHER_MENU,
2248 NULL_MENU,
2249 NULL_MENU,
2250 {"T", N_("ToAddrBk"), {MC_CHOICEC, 2, {'t', ctrl('T')}}, KS_NONE},
2251 NULL_MENU,
2252 NULL_MENU,
2253 NULL_MENU,
2254 NULL_MENU,
2255 NULL_MENU,
2256 HOMEKEY_MENU,
2257 ENDKEY_MENU};
2258 INST_KEY_MENU(config_role_addr_act_keymenu, config_role_addr_act_keys);
2261 struct key config_role_patfolder_keys[] =
2262 {HELP_MENU,
2263 OTHER_MENU,
2264 EXIT_SETUP_MENU,
2265 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2266 PREV_MENU,
2267 NEXT_MENU,
2268 PREVPAGE_MENU,
2269 NEXTPAGE_MENU,
2270 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2271 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2272 PRYNTTXT_MENU,
2273 WHEREIS_MENU,
2275 HELP_MENU,
2276 OTHER_MENU,
2277 NULL_MENU,
2278 NULL_MENU,
2279 /* TRANSLATORS: go to list of folders */
2280 {"T", N_("ToFldrs"), {MC_CHOICED, 2, {'t', ctrl('T')}}, KS_NONE},
2281 NULL_MENU,
2282 NULL_MENU,
2283 NULL_MENU,
2284 NULL_MENU,
2285 NULL_MENU,
2286 HOMEKEY_MENU,
2287 ENDKEY_MENU};
2288 INST_KEY_MENU(config_role_patfolder_keymenu, config_role_patfolder_keys);
2291 struct key config_role_actionfolder_keys[] =
2292 {HELP_MENU,
2293 OTHER_MENU,
2294 EXIT_SETUP_MENU,
2295 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2296 PREV_MENU,
2297 NEXT_MENU,
2298 PREVPAGE_MENU,
2299 NEXTPAGE_MENU,
2300 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2301 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2302 PRYNTTXT_MENU,
2303 WHEREIS_MENU,
2305 HELP_MENU,
2306 OTHER_MENU,
2307 NULL_MENU,
2308 NULL_MENU,
2309 {"T", N_("ToFldrs"), {MC_CHOICEE, 2, {'t', ctrl('T')}}, KS_NONE},
2310 NULL_MENU,
2311 NULL_MENU,
2312 NULL_MENU,
2313 NULL_MENU,
2314 NULL_MENU,
2315 HOMEKEY_MENU,
2316 ENDKEY_MENU};
2317 INST_KEY_MENU(config_role_actionfolder_keymenu, config_role_actionfolder_keys);
2320 struct key config_role_inick_keys[] =
2321 {HELP_MENU,
2322 OTHER_MENU,
2323 EXIT_SETUP_MENU,
2324 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2325 PREV_MENU,
2326 NEXT_MENU,
2327 PREVPAGE_MENU,
2328 NEXTPAGE_MENU,
2329 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2330 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2331 PRYNTTXT_MENU,
2332 WHEREIS_MENU,
2334 HELP_MENU,
2335 OTHER_MENU,
2336 NULL_MENU,
2337 NULL_MENU,
2338 /* TRANSLATORS: go to list of nicknames */
2339 {"T", N_("ToNicks"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2340 NULL_MENU,
2341 NULL_MENU,
2342 NULL_MENU,
2343 NULL_MENU,
2344 NULL_MENU,
2345 HOMEKEY_MENU,
2346 ENDKEY_MENU};
2347 INST_KEY_MENU(config_role_inick_keymenu, config_role_inick_keys);
2350 struct key config_role_afrom_keys[] =
2351 {HELP_MENU,
2352 OTHER_MENU,
2353 EXIT_SETUP_MENU,
2354 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2355 PREV_MENU,
2356 NEXT_MENU,
2357 PREVPAGE_MENU,
2358 NEXTPAGE_MENU,
2359 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2360 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2361 PRYNTTXT_MENU,
2362 WHEREIS_MENU,
2364 HELP_MENU,
2365 OTHER_MENU,
2366 NULL_MENU,
2367 NULL_MENU,
2368 /* TRANSLATORS: go to list of address books */
2369 {"T", N_("ToAbookList"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2370 NULL_MENU,
2371 NULL_MENU,
2372 NULL_MENU,
2373 NULL_MENU,
2374 NULL_MENU,
2375 HOMEKEY_MENU,
2376 ENDKEY_MENU};
2377 INST_KEY_MENU(config_role_afrom_keymenu, config_role_afrom_keys);
2380 struct key config_checkbox_keys[] =
2381 {HELP_MENU,
2382 NULL_MENU,
2383 EXIT_SETUP_MENU,
2384 TOGGLE_MENU,
2385 PREV_MENU,
2386 NEXT_MENU,
2387 PREVPAGE_MENU,
2388 NEXTPAGE_MENU,
2389 HOMEKEY_MENU,
2390 ENDKEY_MENU,
2391 PRYNTTXT_MENU,
2392 WHEREIS_MENU};
2393 INST_KEY_MENU(config_checkbox_keymenu, config_checkbox_keys);
2396 struct key config_radiobutton_keys[] =
2397 {HELP_MENU,
2398 NULL_MENU,
2399 EXIT_SETUP_MENU,
2400 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2401 PREV_MENU,
2402 NEXT_MENU,
2403 PREVPAGE_MENU,
2404 NEXTPAGE_MENU,
2405 HOMEKEY_MENU,
2406 ENDKEY_MENU,
2407 PRYNTTXT_MENU,
2408 WHEREIS_MENU};
2409 INST_KEY_MENU(config_radiobutton_keymenu, config_radiobutton_keys);
2412 struct key config_yesno_keys[] =
2413 {HELP_MENU,
2414 NULL_MENU,
2415 EXIT_SETUP_MENU,
2416 {"C", "[" N_("Change") "]", {MC_TOGGLE,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2417 PREV_MENU,
2418 NEXT_MENU,
2419 PREVPAGE_MENU,
2420 NEXTPAGE_MENU,
2421 HOMEKEY_MENU,
2422 ENDKEY_MENU,
2423 PRYNTTXT_MENU,
2424 WHEREIS_MENU};
2425 INST_KEY_MENU(config_yesno_keymenu, config_yesno_keys);
2428 struct key color_changing_keys[] =
2429 {HELP_MENU,
2430 NULL_MENU,
2431 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2432 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2433 PREV_MENU,
2434 NEXT_MENU,
2435 PREVPAGE_MENU,
2436 NEXTPAGE_MENU,
2437 HOMEKEY_MENU,
2438 ENDKEY_MENU,
2439 PRYNTTXT_MENU,
2440 WHEREIS_MENU};
2441 INST_KEY_MENU(color_changing_keymenu, color_changing_keys);
2444 struct key custom_color_changing_keys[] =
2445 {HELP_MENU,
2446 NULL_MENU,
2447 /* TRANSLATORS: go to color configuration screen */
2448 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2449 {"*", "[" N_("Select") "]", {MC_CHOICEB,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2450 PREV_MENU,
2451 NEXT_MENU,
2452 PREVPAGE_MENU,
2453 NEXTPAGE_MENU,
2454 HOMEKEY_MENU,
2455 ENDKEY_MENU,
2456 PRYNTTXT_MENU,
2457 WHEREIS_MENU};
2458 INST_KEY_MENU(custom_color_changing_keymenu, custom_color_changing_keys);
2461 struct key kw_color_changing_keys[] =
2462 {HELP_MENU,
2463 NULL_MENU,
2464 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2465 {"*", "[" N_("Select") "]", {MC_CHOICEC,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2466 PREV_MENU,
2467 NEXT_MENU,
2468 PREVPAGE_MENU,
2469 NEXTPAGE_MENU,
2470 HOMEKEY_MENU,
2471 ENDKEY_MENU,
2472 PRYNTTXT_MENU,
2473 WHEREIS_MENU};
2474 INST_KEY_MENU(kw_color_changing_keymenu, kw_color_changing_keys);
2477 #ifdef _WINDOWS
2479 struct key color_rgb_changing_keys[] =
2480 {HELP_MENU,
2481 OTHER_MENU,
2482 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2483 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2484 PREV_MENU,
2485 NEXT_MENU,
2486 PREVPAGE_MENU,
2487 NEXTPAGE_MENU,
2488 {"C", N_("Customize"), {MC_RGB1,1,{'c'}},KS_NONE},
2489 NULL_MENU,
2490 PRYNTTXT_MENU,
2491 WHEREIS_MENU,
2493 HELP_MENU,
2494 OTHER_MENU,
2495 NULL_MENU,
2496 NULL_MENU,
2497 NULL_MENU,
2498 NULL_MENU,
2499 NULL_MENU,
2500 NULL_MENU,
2501 NULL_MENU,
2502 NULL_MENU,
2503 HOMEKEY_MENU,
2504 ENDKEY_MENU};
2505 INST_KEY_MENU(color_rgb_keymenu, color_rgb_changing_keys);
2508 struct key custom_rgb_changing_keys[] =
2509 {HELP_MENU,
2510 OTHER_MENU,
2511 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2512 {"*", "[" N_("Select") "]", {MC_CHOICEB,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2513 PREV_MENU,
2514 NEXT_MENU,
2515 PREVPAGE_MENU,
2516 NEXTPAGE_MENU,
2517 {"C", N_("Customize"), {MC_RGB2,1,{'c'}},KS_NONE},
2518 NULL_MENU,
2519 PRYNTTXT_MENU,
2520 WHEREIS_MENU,
2522 HELP_MENU,
2523 OTHER_MENU,
2524 NULL_MENU,
2525 NULL_MENU,
2526 NULL_MENU,
2527 NULL_MENU,
2528 NULL_MENU,
2529 NULL_MENU,
2530 NULL_MENU,
2531 NULL_MENU,
2532 HOMEKEY_MENU,
2533 ENDKEY_MENU};
2534 INST_KEY_MENU(custom_rgb_keymenu, custom_rgb_changing_keys);
2537 struct key kw_rgb_changing_keys[] =
2538 {HELP_MENU,
2539 OTHER_MENU,
2540 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2541 {"*", "[" N_("Select") "]", {MC_CHOICEC,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2542 PREV_MENU,
2543 NEXT_MENU,
2544 PREVPAGE_MENU,
2545 NEXTPAGE_MENU,
2546 {"C", N_("Customize"), {MC_RGB3,1,{'c'}},KS_NONE},
2547 NULL_MENU,
2548 PRYNTTXT_MENU,
2549 WHEREIS_MENU,
2551 HELP_MENU,
2552 OTHER_MENU,
2553 NULL_MENU,
2554 NULL_MENU,
2555 NULL_MENU,
2556 NULL_MENU,
2557 NULL_MENU,
2558 NULL_MENU,
2559 NULL_MENU,
2560 NULL_MENU,
2561 HOMEKEY_MENU,
2562 ENDKEY_MENU};
2563 INST_KEY_MENU(kw_rgb_keymenu, kw_rgb_changing_keys);
2565 #endif
2568 struct key color_setting_keys[] =
2569 {HELP_MENU,
2570 OTHER_MENU,
2571 EXIT_SETUP_MENU,
2572 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2573 PREV_MENU,
2574 NEXT_MENU,
2575 PREVPAGE_MENU,
2576 NEXTPAGE_MENU,
2577 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2578 /* TRANSLATORS: restore defaults */
2579 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2580 PRYNTTXT_MENU,
2581 WHEREIS_MENU,
2583 HELP_MENU,
2584 OTHER_MENU,
2585 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2586 NULL_MENU,
2587 NULL_MENU,
2588 NULL_MENU,
2589 NULL_MENU,
2590 NULL_MENU,
2591 NULL_MENU,
2592 NULL_MENU,
2593 HOMEKEY_MENU,
2594 ENDKEY_MENU};
2595 INST_KEY_MENU(color_setting_keymenu, color_setting_keys);
2598 struct key custom_color_setting_keys[] =
2599 {HELP_MENU,
2600 OTHER_MENU,
2601 EXIT_SETUP_MENU,
2602 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2603 PREV_MENU,
2604 NEXT_MENU,
2605 PREVPAGE_MENU,
2606 NEXTPAGE_MENU,
2607 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2608 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2609 PRYNTTXT_MENU,
2610 WHEREIS_MENU,
2612 HELP_MENU,
2613 OTHER_MENU,
2614 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2615 NULL_MENU,
2616 {"D", N_("DeleteHdr"), {MC_DELETE,1,{'d'}}, KS_NONE},
2617 /* TRANSLATORS: shuffle headers (change the order of headers) */
2618 {"$", N_("ShuffleHdr"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
2619 NULL_MENU,
2620 NULL_MENU,
2621 NULL_MENU,
2622 NULL_MENU,
2623 HOMEKEY_MENU,
2624 ENDKEY_MENU};
2625 INST_KEY_MENU(custom_color_setting_keymenu, custom_color_setting_keys);
2628 struct key role_color_setting_keys[] =
2629 {HELP_MENU,
2630 NULL_MENU,
2631 EXIT_SETUP_MENU,
2632 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2633 PREV_MENU,
2634 NEXT_MENU,
2635 PREVPAGE_MENU,
2636 NEXTPAGE_MENU,
2637 HOMEKEY_MENU,
2638 ENDKEY_MENU,
2639 PRYNTTXT_MENU,
2640 WHEREIS_MENU};
2641 INST_KEY_MENU(role_color_setting_keymenu, role_color_setting_keys);
2644 struct key kw_color_setting_keys[] =
2645 {HELP_MENU,
2646 OTHER_MENU,
2647 EXIT_SETUP_MENU,
2648 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2649 PREV_MENU,
2650 NEXT_MENU,
2651 PREVPAGE_MENU,
2652 NEXTPAGE_MENU,
2653 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2654 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2655 PRYNTTXT_MENU,
2656 WHEREIS_MENU,
2658 HELP_MENU,
2659 OTHER_MENU,
2660 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2661 NULL_MENU,
2662 NULL_MENU,
2663 NULL_MENU,
2664 NULL_MENU,
2665 NULL_MENU,
2666 NULL_MENU,
2667 NULL_MENU,
2668 HOMEKEY_MENU,
2669 ENDKEY_MENU};
2670 INST_KEY_MENU(kw_color_setting_keymenu, kw_color_setting_keys);
2673 struct key take_export_keys_sm[] =
2674 {HELP_MENU,
2675 WHEREIS_MENU,
2676 /* TRANSLATORS: exit the Take Address screen */
2677 {"<",N_("ExitTake"), {MC_EXIT,4,{'e',ctrl('C'),'<',','}}, KS_EXITMODE},
2678 {"T","[" N_("Take") "]",{MC_TAKE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
2679 PREV_MENU,
2680 NEXT_MENU,
2681 PREVPAGE_MENU,
2682 NEXTPAGE_MENU,
2683 NULL_MENU,
2684 NULL_MENU,
2685 NULL_MENU,
2686 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE}};
2687 INST_KEY_MENU(take_export_keymenu_sm, take_export_keys_sm);
2690 struct key take_export_keys_lm[] =
2691 {HELP_MENU,
2692 WHEREIS_MENU,
2693 {"<",N_("ExitTake"), {MC_EXIT,4,{'e',ctrl('C'),'<',','}}, KS_EXITMODE},
2694 {"T",N_("Take"), {MC_TAKE,1,{'t'}}, KS_NONE},
2695 PREV_MENU,
2696 NEXT_MENU,
2697 PREVPAGE_MENU,
2698 NEXTPAGE_MENU,
2699 {"X","[" N_("Set/Unset") "]", {MC_CHOICE,3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
2700 {"A", N_("SetAll"),{MC_SELALL,1,{'a'}},KS_NONE},
2701 {"U",N_("UnSetAll"),{MC_UNSELALL,1,{'u'}},KS_NONE},
2702 {"S",N_("SinglMode"),{MC_LISTMODE,1,{'s'}},KS_NONE}};
2703 INST_KEY_MENU(take_export_keymenu_lm, take_export_keys_lm);
2706 struct key smime_info_keys[] =
2707 {HELP_MENU,
2708 OTHER_MENU,
2709 {"<","Back",{MC_VIEW_TEXT,2,{'<',','}},KS_EXITMODE},
2710 NULL_MENU,
2711 NULL_MENU,
2712 NULL_MENU,
2713 PREVPAGE_MENU,
2714 NEXTPAGE_MENU,
2715 NULL_MENU,
2716 NULL_MENU,
2717 NULL_MENU,
2718 NULL_MENU,
2720 HELP_MENU,
2721 OTHER_MENU,
2722 MAIN_MENU,
2723 QUIT_MENU,
2724 NULL_MENU,
2725 NULL_MENU,
2726 NULL_MENU,
2727 NULL_MENU,
2728 NULL_MENU,
2729 INDEX_MENU,
2730 NULL_MENU,
2731 NULL_MENU};
2732 INST_KEY_MENU(smime_info_keymenu, smime_info_keys);
2735 struct key config_smime_helper_keys[] =
2736 {HELP_MENU,
2737 WHEREIS_MENU,
2738 EXIT_SETUP_MENU,
2739 {"T","[" N_("Transfer") "]", {MC_CHOICE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
2740 PREV_MENU,
2741 NEXT_MENU,
2742 PREVPAGE_MENU,
2743 NEXTPAGE_MENU,
2744 NULL_MENU,
2745 NULL_MENU,
2746 HOMEKEY_MENU,
2747 ENDKEY_MENU};
2748 INST_KEY_MENU(config_smime_helper_keymenu, config_smime_helper_keys);
2750 struct key config_smime_manage_certs_menu_keys[] =
2751 {HELP_MENU,
2752 WHEREIS_MENU,
2753 EXIT_SETUP_MENU,
2754 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
2755 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2756 NULL_MENU,
2757 PREV_MENU,
2758 NEXT_MENU,
2759 PREVPAGE_MENU,
2760 NEXTPAGE_MENU,
2761 HOMEKEY_MENU,
2762 ENDKEY_MENU};
2763 INST_KEY_MENU(config_smime_manage_certs_menu_keymenu, config_smime_manage_certs_menu_keys);
2765 struct key config_smime_add_certs_keys[] =
2766 {HELP_MENU,
2767 NULL_MENU,
2768 EXIT_SETUP_MENU,
2769 {"I", N_("Import Cert"), {MC_IMPORT,3,{'i', ctrl('M'), ctrl('J')}}, KS_NONE},
2770 NULL_MENU,
2771 NULL_MENU,
2772 NULL_MENU,
2773 NULL_MENU,
2774 NULL_MENU,
2775 NULL_MENU,
2776 NULL_MENU,
2777 NULL_MENU};
2778 INST_KEY_MENU(config_smime_add_certs_keymenu, config_smime_add_certs_keys);
2780 struct key config_smime_add_new_key[] =
2781 {HELP_MENU,
2782 NULL_MENU,
2783 EXIT_SETUP_MENU,
2784 {"I", N_("Import Key"), {MC_IMPORT,3,{'i', ctrl('M'), ctrl('J')}}, KS_NONE},
2785 {"C", N_("Create Key"), {MC_ADD,1,{'c'}}, KS_NONE},
2786 NULL_MENU,
2787 NULL_MENU,
2788 NULL_MENU,
2789 NULL_MENU,
2790 NULL_MENU,
2791 NULL_MENU,
2792 NULL_MENU};
2793 INST_KEY_MENU(config_smime_add_new_key_keymenu, config_smime_add_new_key);
2795 struct key config_smime_manage_certs_work_keys[] =
2796 {HELP_MENU,
2797 OTHER_MENU,
2798 EXIT_SETUP_MENU,
2799 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2800 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2801 NULL_MENU,
2802 {"D", N_("Delete"), {MC_DELETE,1,{'d'}}, KS_NONE},
2803 {"U", N_("Undelete"), {MC_UNDELETE,1,{'u'}}, KS_NONE},
2804 {"X", N_("Expunge"), {MC_EXPUNGE,1,{'x'}}, KS_NONE},
2805 NULL_MENU,
2806 NULL_MENU,
2807 WHEREIS_MENU,
2809 PREV_MENU,
2810 NEXT_MENU,
2811 PREVPAGE_MENU,
2812 NEXTPAGE_MENU,
2813 NULL_MENU,
2814 NULL_MENU,
2815 NULL_MENU,
2816 NULL_MENU,
2817 NULL_MENU,
2818 NULL_MENU,
2819 HOMEKEY_MENU,
2820 ENDKEY_MENU};
2821 INST_KEY_MENU(config_smime_manage_certs_work_keymenu, config_smime_manage_certs_work_keys);
2823 struct key config_smime_view_cert[] =
2824 {HELP_MENU,
2825 NULL_MENU,
2826 EXIT_SETUP_MENU,
2827 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2828 {"D", N_("Delete pwd"), {MC_DELETE,1,{'d'}},KS_NONE},
2829 NULL_MENU,
2830 NULL_MENU,
2831 NULL_MENU,
2832 NULL_MENU,
2833 NULL_MENU,
2834 NULL_MENU,
2835 NULL_MENU};
2836 INST_KEY_MENU(config_smime_manage_view_cert_keymenu, config_smime_view_cert);
2838 struct key config_smime_view_cert_no_delete[] =
2839 {HELP_MENU,
2840 NULL_MENU,
2841 EXIT_SETUP_MENU,
2842 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2843 NULL_MENU,
2844 NULL_MENU,
2845 NULL_MENU,
2846 NULL_MENU,
2847 NULL_MENU,
2848 NULL_MENU,
2849 NULL_MENU,
2850 NULL_MENU};
2851 INST_KEY_MENU(config_smime_manage_view_cert_keymenu_no_delete, config_smime_view_cert_no_delete);
2853 struct key smime_certificate_info_keys[] =
2854 {HELP_MENU,
2855 OTHER_MENU,
2856 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
2857 {"T",N_("Trust Cert"), {MC_TRUST,1,{'t'}},KS_NONE},
2858 {"D",N_("Delete"), {MC_DELETE,1,{'d'}},KS_NONE},
2859 {"U",N_("Undelete"), {MC_UNDELETE,1,{'u'}},KS_NONE},
2860 {"B",N_("Public Key"), {MC_PUBLIC,1,{'b'}},KS_NONE},
2861 {"R",N_("Private Key"),{MC_PRIVATE,1,{'r'}},KS_NONE},
2862 NULL_MENU,
2863 NULL_MENU,
2864 NULL_MENU,
2865 NULL_MENU,
2867 HELP_MENU,
2868 OTHER_MENU,
2869 PREVPAGE_MENU,
2870 NEXTPAGE_MENU,
2871 PRYNTTXT_MENU,
2872 WHEREIS_MENU,
2873 NULL_MENU,
2874 NULL_MENU,
2875 NULL_MENU,
2876 NULL_MENU,
2877 HOMEKEY_MENU,
2878 ENDKEY_MENU};
2879 INST_KEY_MENU(smime_certificate_info_keymenu, smime_certificate_info_keys);
2882 struct key config_smime_manage_password_file_menu_keys[] =
2883 {HELP_MENU,
2884 WHEREIS_MENU,
2885 EXIT_SETUP_MENU,
2886 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
2887 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2888 NULL_MENU,
2889 PREV_MENU,
2890 NEXT_MENU,
2891 PREVPAGE_MENU,
2892 NEXTPAGE_MENU,
2893 HOMEKEY_MENU,
2894 ENDKEY_MENU};
2895 INST_KEY_MENU(config_smime_manage_password_file_menu_keymenu, config_smime_manage_password_file_menu_keys);
2900 * Internal prototypes
2902 void output_keymenu(struct key_menu *, bitmap_t, int, int);
2903 void format_keymenu(struct key_menu *, bitmap_t, int);
2904 void menu_clear_cmd_binding(struct key_menu *, int);
2905 #ifdef MOUSE
2906 void print_inverted_label(int, MENUITEM *);
2907 #endif
2910 /* Saved key menu drawing state */
2911 static struct {
2912 struct key_menu *km;
2913 int row,
2914 column,
2915 blanked;
2916 bitmap_t bitmap;
2917 } km_state;
2921 * Longest label that can be displayed in keymenu
2923 #define MAX_LABEL 40
2924 #define MAX_KEYNAME 3
2925 static struct key last_time_buf[12];
2926 static int keymenu_is_dirty = 1;
2928 void
2929 mark_keymenu_dirty(void)
2931 keymenu_is_dirty = 1;
2936 * Write an already formatted key_menu to the screen
2938 * Args: km -- key_menu structure
2939 * bm -- bitmap, 0's mean don't draw this key
2940 * row -- the row on the screen to begin on, negative values
2941 * are counted from the bottom of the screen up
2942 * column -- column on the screen to begin on
2944 * The bits in the bitmap are used from least significant to most significant,
2945 * not left to right. So, if you write out the bitmap in the normal way, for
2946 * example,
2947 * bm[0] = 0x5, bm[1] = 0x8, bm[2] = 0x21, bm[3] = bm[4] = bm[5] = 0
2948 * 0000 0101 0000 1000 0010 0001 ...
2949 * means that menu item 0 (first row, first column) is set, item 1 (2nd row,
2950 * first column) is not set, item 2 is set, items 3-10 are not set, item 11
2951 * (2nd row, 6th and last column) is set. In the second menu (the second set
2952 * of 12 bits) items 0-3 are unset, 4 is set, 5-8 unset, 9 set, 10-11 unset.
2953 * That uses up bm[0] - bm[2].
2954 * Just to make sure, here it is drawn out for the first set of 12 items in
2955 * the first keymenu (0-11)
2956 * bm[0] x x x x x x x x bm[1] x x x x x x x x
2957 * 7 6 5 4 3 2 1 0 1110 9 8
2959 void
2960 output_keymenu(struct key_menu *km, unsigned char *bm, int row, int column)
2962 #ifdef __CYGWIN__
2963 extern char term_name[];
2964 #endif
2965 register struct key *k;
2966 struct key *last_time;
2967 int i, j,
2968 ufk, /* using function keys */
2969 real_row,
2970 max_column, /* number of columns on screen */
2971 off; /* offset into keymap */
2972 struct variable *vars = ps_global->vars;
2973 COLOR_PAIR *lastc=NULL, *label_color=NULL, *name_color=NULL;
2974 #ifdef MOUSE
2975 /* 6's are for UTF-8 */
2976 char keystr[6*MAX_KEYNAME + 6*MAX_LABEL + 2];
2977 #endif
2979 off = km->which * 12;
2980 max_column = ps_global->ttyo->screen_cols;
2982 if((ps_global->ttyo->screen_rows - FOOTER_ROWS(ps_global)) < 0
2983 || max_column <= 0){
2984 keymenu_is_dirty = 1;
2985 return;
2989 real_row = row > 0 ? row : ps_global->ttyo->screen_rows + row;
2991 if(pico_usingcolor()){
2992 lastc = pico_get_cur_color();
2993 if(lastc && VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR &&
2994 pico_is_good_color(VAR_KEYLABEL_FORE_COLOR) &&
2995 pico_is_good_color(VAR_KEYLABEL_BACK_COLOR)){
2996 label_color = new_color_pair(VAR_KEYLABEL_FORE_COLOR,
2997 VAR_KEYLABEL_BACK_COLOR);
2998 if(label_color)
2999 (void)pico_set_colorp(label_color, PSC_NONE);
3002 if(label_color && VAR_KEYNAME_FORE_COLOR && VAR_KEYNAME_BACK_COLOR &&
3003 pico_is_good_color(VAR_KEYNAME_FORE_COLOR) &&
3004 pico_is_good_color(VAR_KEYNAME_BACK_COLOR)){
3005 name_color = new_color_pair(VAR_KEYNAME_FORE_COLOR,
3006 VAR_KEYNAME_BACK_COLOR);
3010 if(keymenu_is_dirty){
3011 ClearLines(real_row, real_row+1);
3012 keymenu_is_dirty = 0;
3013 /* first time through, set up storage */
3014 if(!last_time_buf[0].name){
3015 for(i = 0; i < 12; i++){
3016 last_time = &last_time_buf[i];
3017 last_time->name = (char *) fs_get(6*MAX_KEYNAME + 1);
3018 last_time->label = (char *) fs_get(6*MAX_LABEL + 1);
3022 for(i = 0; i < 12; i++)
3023 last_time_buf[i].column = -1;
3026 for(i = 0; i < 12; i++){
3027 int e;
3029 e = off + i;
3030 dprint((9, "%2d %-7.7s %-10.10s %d\n", i,
3031 km == NULL ? "(no km)"
3032 : km->keys[e].name == NULL ? "(null)"
3033 : km->keys[e].name,
3034 km == NULL ? "(no km)"
3035 : km->keys[e].label == NULL ? "(null)"
3036 : km->keys[e].label, km ? km->keys[e].column : 0));
3037 #ifdef MOUSE
3038 register_key(i, NO_OP_COMMAND, "", NULL, 0, 0, 0, NULL, NULL);
3039 #endif
3042 ufk = F_ON(F_USE_FK, ps_global);
3043 dprint((9, "row: %d, real_row: %d, column: %d\n", row,
3044 real_row, column));
3046 for(i = 0; i < 2; i++){
3047 int c, el, empty, fkey, last_in_row, fix_start;
3048 short next_col;
3049 char temp[6*MAX_SCREEN_COLS+1];
3050 char temp2[6*MAX_SCREEN_COLS+1];
3051 char this_label[6*MAX_LABEL+1];
3053 j = 6*i - 1;
3054 #ifndef __CYGWIN__
3055 if(i == 1 && !label_color)
3056 #else
3057 if(i == 1 && (!label_color || !struncmp(term_name,"cygwin", 6)))
3058 #endif
3059 max_column--; /* Some terminals scroll if you write in the
3060 lower right hand corner. If user has a
3061 label_color set we'll take our chances.
3062 Otherwise, we'd get one cell of Normal. */
3065 * k is the key struct we're working on
3066 * c is the column number
3067 * el is an index into the whole keys array
3068 * Last_time_buf is ordered strangely. It goes row by row instead
3069 * of down each column like km does. J is an index into it.
3071 for(c = 0, el = off+i, k = &km->keys[el];
3072 k < &km->keys[off+12] && c < max_column;
3073 k += 2, el += 2){
3075 if(k->column > max_column)
3076 break;
3078 j++;
3079 if(ufk)
3080 fkey = 1 + k - &km->keys[off];
3082 empty = (!bitnset(el,bm) || !(k->name && *k->name));
3083 last_time = &last_time_buf[j];
3084 if(k+2 < &km->keys[off+12]){
3085 last_in_row = 0;
3086 next_col = last_time_buf[j+1].column;
3087 fix_start = (k == &km->keys[off] ||
3088 k == &km->keys[off+1]) ? k->column : 0;
3090 else{
3091 last_in_row = 1;
3092 fix_start = 0;
3096 * Make sure there is a space between this label and
3097 * the next name. That is, we prefer a space to the
3098 * extra character of the label because the space
3099 * separates the commands and looks nicer.
3101 if(k->label){
3102 size_t l;
3103 char tmp_label[6*MAX_LABEL+1];
3105 if(k->label[0] == '[' && k->label[(l=strlen(k->label))-1] == ']' && l > 2){
3107 * Can't write in k->label, which might be a constant array.
3109 strncpy(tmp_label, &k->label[1], MIN(sizeof(tmp_label),l-2));
3110 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3112 snprintf(this_label, sizeof(this_label), "[%s]", _(tmp_label));
3114 else
3115 strncpy(this_label, _(k->label), sizeof(this_label));
3117 this_label[sizeof(this_label)-1] = '\0';
3118 if(!last_in_row){
3119 int trunc;
3121 trunc = (k+2)->column - k->column
3122 - ((k->name ? utf8_width(k->name) : 0) + 1);
3124 * trunc columns available for label but we don't want the label
3125 * to go all the way to the edge
3127 if(utf8_width(this_label) >= trunc){
3128 if(trunc > 1){
3129 strncpy(tmp_label, this_label, sizeof(tmp_label));
3130 tmp_label[sizeof(tmp_label)-1] = '\0';
3131 l = utf8_pad_to_width(this_label, tmp_label, sizeof(this_label)-2, trunc-1, 1);
3132 this_label[l++] = SPACE;
3133 this_label[l] = '\0';;
3135 else if(trunc == 1)
3136 this_label[0] = SPACE;
3137 else
3138 this_label[0] = '\0';
3140 this_label[sizeof(this_label)-1] = '\0';
3144 else
3145 this_label[0] = '\0';
3147 if(!(k->column == last_time->column
3148 && (last_in_row || (k+2)->column <= next_col)
3149 && ((empty && !*last_time->label && !*last_time->name)
3150 || (!empty
3151 && this_label && !strcmp(this_label,last_time->label)
3152 && ((k->name && !strcmp(k->name,last_time->name))
3153 || ufk))))){
3154 if(empty){
3155 /* blank out key with spaces */
3156 strncpy(temp, repeat_char(
3157 ((last_in_row || (k+2)->column > max_column)
3158 ? max_column
3159 : (k+2)->column) -
3160 (fix_start
3162 : k->column),
3163 SPACE), sizeof(temp));
3164 temp[sizeof(temp)-1] = '\0';
3165 last_time->column = k->column;
3166 *last_time->name = '\0';
3167 *last_time->label = '\0';
3168 MoveCursor(real_row + i, column + (fix_start ? 0 : k->column));
3169 Write_to_screen(temp);
3170 c = (fix_start ? 0 : k->column) + strlen(temp);
3172 else{
3173 /* make sure extra space before key name is there */
3174 if(fix_start){
3175 strncpy(temp, repeat_char(k->column, SPACE), sizeof(temp));
3176 temp[sizeof(temp)-1] = '\0';
3177 MoveCursor(real_row + i, column + 0);
3178 Write_to_screen(temp);
3181 /* short name of the key */
3182 if(ufk)
3183 snprintf(temp, sizeof(temp), "F%d", fkey);
3184 else
3185 strncpy(temp, k->name, sizeof(temp));
3187 temp[sizeof(temp)-1] = '\0';
3188 last_time->column = k->column;
3189 strncpy(last_time->name, temp, 6*MAX_KEYNAME);
3190 last_time->name[6*MAX_KEYNAME] = '\0';
3191 /* make sure name not too long */
3192 #ifdef MOUSE
3193 strncpy(keystr, temp, sizeof(keystr));
3194 keystr[sizeof(keystr)-1] = '\0';
3195 #endif
3196 MoveCursor(real_row + i, column + k->column);
3197 if(!empty){
3198 if(name_color)
3199 (void)pico_set_colorp(name_color, PSC_NONE);
3200 else
3201 StartInverse();
3204 Write_to_screen(temp);
3205 c = k->column + utf8_width(temp);
3206 if(!empty){
3207 if(!name_color)
3208 EndInverse();
3211 /* now the space after the name and the label */
3212 temp[0] = '\0';
3213 if(c < max_column){
3214 temp[0] = SPACE;
3215 temp[1] = '\0';
3216 strncat(temp, this_label, sizeof(temp)-strlen(temp)-1);
3218 /* Don't run over the right hand edge */
3219 if(utf8_width(temp) > max_column - c){
3220 size_t l;
3222 l = utf8_pad_to_width(temp2, temp, sizeof(temp2)-1, max_column-c, 1);
3223 temp2[l] = '\0';
3224 strncpy(temp, temp2, sizeof(temp));
3225 temp[sizeof(temp)-1] = '\0';
3228 c += utf8_width(temp);
3231 #ifdef MOUSE
3232 strncat(keystr, temp, sizeof(keystr)-strlen(keystr)-1);
3233 keystr[sizeof(keystr)-1] = '\0';
3234 #endif
3235 /* fill out rest of this key with spaces */
3236 if(c < max_column){
3237 if(last_in_row){
3238 strncat(temp, repeat_char(max_column - c, SPACE), sizeof(temp)-strlen(temp)-1);
3239 c = max_column;
3241 else{
3242 if(c < (k+2)->column){
3243 strncat(temp,
3244 repeat_char((k+2)->column - c, SPACE), sizeof(temp)-strlen(temp)-1);
3245 c = (k+2)->column;
3249 temp[sizeof(temp)-1] = '\0';
3252 strncpy(last_time->label, this_label, 6*MAX_LABEL);
3253 last_time->label[6*MAX_LABEL] = '\0';
3254 if(label_color)
3255 (void)pico_set_colorp(label_color, PSC_NONE);
3257 Write_to_screen(temp);
3260 #ifdef MOUSE
3261 else if(!empty)
3262 /* fill in what register_key needs from cached data */
3263 snprintf(keystr, sizeof(keystr), "%s %s", last_time->name, last_time->label);
3265 if(!empty){
3266 int len;
3269 * If label ends in space,
3270 * don't register the space part of label.
3272 len = strlen(keystr);
3273 while(keystr[len-1] == SPACE)
3274 len--;
3275 len--;
3277 register_key(j, ufk ? PF1 + fkey - 1
3278 : (k->name[0] == '^')
3279 ? ctrl(k->name[1])
3280 : (!strucmp(k->name, "ret"))
3281 ? ctrl('M')
3282 : (!strucmp(k->name, "tab"))
3283 ? '\t'
3284 : (!strucmp(k->name, "spc"))
3285 ? SPACE
3286 : (!strucmp(k->name, HISTORY_UP_KEYNAME))
3287 ? KEY_UP
3288 : (!strucmp(k->name, HISTORY_DOWN_KEYNAME))
3289 ? KEY_DOWN
3290 : (k->bind.nch)
3291 ? ((isascii((int) k->bind.ch[0]) && islower((int) k->bind.ch[0]))
3292 ? toupper((unsigned char) k->bind.ch[0])
3293 : k->bind.ch[0])
3294 : k->name[0],
3295 keystr, print_inverted_label,
3296 real_row+i, k->column, len,
3297 name_color, label_color);
3299 #endif
3303 while(++j < 6*(i+1))
3304 last_time_buf[j].column = -1;
3307 fflush(stdout);
3308 if(lastc){
3309 (void)pico_set_colorp(lastc, PSC_NONE);
3310 free_color_pair(&lastc);
3311 if(label_color)
3312 free_color_pair(&label_color);
3313 if(name_color)
3314 free_color_pair(&name_color);
3320 * Clear the key menu lines.
3322 void
3323 blank_keymenu(int row, int column)
3325 struct variable *vars = ps_global->vars;
3326 COLOR_PAIR *lastc;
3328 if(FOOTER_ROWS(ps_global) > 1){
3329 km_state.blanked = 1;
3330 km_state.row = row;
3331 km_state.column = column;
3332 MoveCursor(row, column);
3333 lastc = pico_set_colors(VAR_KEYLABEL_FORE_COLOR,
3334 VAR_KEYLABEL_BACK_COLOR, PSC_NORM|PSC_RET);
3336 CleartoEOLN();
3337 MoveCursor(row+1, column);
3338 CleartoEOLN();
3339 fflush(stdout);
3340 if(lastc){
3341 (void)pico_set_colorp(lastc, PSC_NONE);
3342 free_color_pair(&lastc);
3348 void
3349 draw_cancel_keymenu(void)
3351 bitmap_t bitmap;
3353 setbitmap(bitmap);
3354 draw_keymenu(&cancel_keymenu, bitmap, ps_global->ttyo->screen_cols,
3355 1-FOOTER_ROWS(ps_global), 0, FirstMenu);
3359 void
3360 clearfooter(struct pine *ps)
3362 ClearLines(ps->ttyo->screen_rows - 3, ps->ttyo->screen_rows - 1);
3363 mark_keymenu_dirty();
3364 mark_status_unknown();
3369 * Calculate formatting for key menu at bottom of screen
3371 * Args: km -- The key_menu structure to format
3372 * bm -- Bitmap indicating which menu items should be displayed. If
3373 * an item is NULL, that also means it shouldn't be displayed.
3374 * Sometimes the bitmap will be turned on in that case and just
3375 * rely on the NULL entry.
3376 * width -- the screen width to format it at
3378 * If already formatted for this particular screen width and the requested
3379 * bitmap and formatted bitmap agree, return.
3381 * The formatting results in the column field in the key_menu being
3382 * filled in. The column field is the column to start the label at, the
3383 * name of the key; after that is the label for the key. The basic idea
3384 * is to line up the end of the names and beginning of the labels. If
3385 * the name is too long and shifting it left would run into previous
3386 * label, then shift the whole menu right, or at least that entry if
3387 * things following are short enough to fit back into the regular
3388 * spacing. This has to be calculated and not fixed so it can cope with
3389 * screen resize.
3391 void
3392 format_keymenu(struct key_menu *km, unsigned char *bm, int width)
3394 int spacing[7], w[6], min_w[6], tw[6], extra[6], ufk, i, set;
3396 /* already formatted? */
3397 if(!km || (width == km->width &&
3398 km->how_many <= km->formatted_hm &&
3399 !memcmp(km->bitmap, bm, BM_SIZE)))
3400 return;
3403 * If we're in the initial command sequence we may be using function
3404 * keys instead of alphas, or vice versa, so we want to recalculate
3405 * the formatting next time through.
3407 if((F_ON(F_USE_FK,ps_global) && ps_global->orig_use_fkeys) ||
3408 (F_OFF(F_USE_FK,ps_global) && !ps_global->orig_use_fkeys)){
3409 km->width = width;
3410 km->formatted_hm = km->how_many;
3411 memcpy(km->bitmap, bm, BM_SIZE);
3414 ufk = F_ON(F_USE_FK,ps_global); /* ufk = "Using Function Keys" */
3416 /* set up "ideal" columns to start in, plus fake 7th column start */
3417 for(i = 0; i < 7; i++)
3418 spacing[i] = (i * width) / 6;
3420 /* Loop thru each set of 12 menus */
3421 for(set = 0; set < km->how_many; set++){
3422 int k_top, k_bot, top_name_width, bot_name_width,
3423 top_label_width, bot_label_width, done, offset, next_one;
3424 struct key *keytop, *keybot;
3426 offset = set * 12; /* offset into keymenu */
3429 * Find the required widths for each box.
3431 for(i = 0; i < 6; i++){
3432 k_top = offset + i*2;
3433 k_bot = k_top + 1;
3434 keytop = &km->keys[k_top];
3435 keybot = &km->keys[k_bot];
3438 * The width of a box is the max width of top or bottom name,
3439 * plus 1 space, plus the max width of top or bottom label.
3441 * ? HelpInfo
3442 * ^C Cancel
3443 * ||||||||||| = 2 + 1 + 8 = 11
3445 * Then we adjust that by adding one space after the box to
3446 * separate it from the next box. The last box doesn't need that
3447 * but we may need an extra space for last box to avoid putting
3448 * a character in the lower right hand cell of display.
3449 * We also have a minimum label width (if screen is really narrow)
3450 * of 3, so at least "Hel" and "Can" shows and the rest gets
3451 * truncated off right hand side.
3454 top_name_width = (keytop->name && bitnset(k_top,bm))
3455 ? (ufk ? (i >= 5 ? 3 : 2)
3456 : utf8_width(keytop->name)) : 0;
3457 bot_name_width = (keybot->name && bitnset(k_bot,bm))
3458 ? (ufk ? (i >= 4 ? 3 : 2)
3459 : utf8_width(keybot->name)) : 0;
3461 * Labels are complicated by the fact that we want to look
3462 * up their translation, but also by the fact that we surround
3463 * the word with brackets like [ViewMsg] when the command is
3464 * the default. We want to look up the translation of the
3465 * part inside the brackets, not the whole thing.
3467 if(keytop->label && bitnset(k_top,bm)){
3468 char tmp_label[6*MAX_LABEL+1];
3469 size_t l;
3471 if(keytop->label[0] == '[' && keytop->label[(l=strlen(keytop->label))-1] == ']' && l > 2){
3473 * Can't write in k->label, which might be a constant array.
3475 strncpy(tmp_label, &keytop->label[1], MIN(sizeof(tmp_label),l-2));
3476 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3478 top_label_width = 2 + utf8_width(_(tmp_label));
3480 else
3481 top_label_width = utf8_width(_(keytop->label));
3483 else
3484 top_label_width = 0;
3486 if(keybot->label && bitnset(k_bot,bm)){
3487 char tmp_label[6*MAX_LABEL+1];
3488 size_t l;
3490 if(keybot->label[0] == '[' && keybot->label[(l=strlen(keybot->label))-1] == ']' && l > 2){
3491 strncpy(tmp_label, &keybot->label[1], MIN(sizeof(tmp_label),l-2));
3492 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3494 bot_label_width = 2 + utf8_width(_(tmp_label));
3496 else
3497 bot_label_width = utf8_width(_(keybot->label));
3499 else
3500 bot_label_width = 0;
3503 * The 1 for i < 5 is the space between adjacent boxes.
3504 * The last 1 or 0 when i == 5 is so that we won't try to put
3505 * a character in the lower right cell of the display, since that
3506 * causes a linefeed on some terminals.
3508 w[i] = MAX(top_name_width, bot_name_width) + 1 +
3509 MAX(top_label_width, bot_label_width) +
3510 ((i < 5) ? 1
3511 : ((bot_label_width >= top_label_width) ? 1 : 0));
3514 * The smallest we'll squeeze a column.
3516 * X ABCDEF we'll squeeze to X ABC
3517 * YZ GHIJ YZ GHI
3519 min_w[i] = MAX(top_name_width, bot_name_width) + 1 +
3520 MIN(MAX(top_label_width, bot_label_width), 3) +
3521 ((i < 5) ? 1
3522 : ((bot_label_width >= top_label_width) ? 1 : 0));
3524 /* init trial width */
3525 tw[i] = spacing[i+1] - spacing[i];
3526 extra[i] = tw[i] - w[i]; /* negative if it doesn't fit */
3530 * See if we can fit everything on the screen.
3532 done = 0;
3533 while(!done){
3534 int smallest_extra, how_small;
3536 /* Find smallest extra */
3537 smallest_extra = -1;
3538 how_small = 100;
3539 for(i = 0; i < 6; i++){
3540 if(extra[i] < how_small){
3541 smallest_extra = i;
3542 how_small = extra[i];
3546 if(how_small >= 0) /* everything fits */
3547 done++;
3548 else{
3549 int take_from, how_close;
3552 * Find the one that is closest to the ideal width
3553 * that has some extra to spare.
3555 take_from = -1;
3556 how_close = 100;
3557 for(i = 0; i < 6; i++){
3558 if(extra[i] > 0 &&
3559 ((spacing[i+1]-spacing[i]) - tw[i]) < how_close){
3560 take_from = i;
3561 how_close = (spacing[i+1]-spacing[i]) - tw[i];
3565 if(take_from >= 0){
3567 * Found one. Take one from take_from and add it
3568 * to the smallest_extra.
3570 tw[smallest_extra]++;
3571 extra[smallest_extra]++;
3572 tw[take_from]--;
3573 extra[take_from]--;
3575 else{
3576 int used_width;
3579 * Oops. Not enough space to fit everything in.
3580 * Some of the labels are truncated. Some may even be
3581 * truncated past the minimum. We make sure that each
3582 * field is at least its minimum size, and then we cut
3583 * back those over the minimum until we can fit all the
3584 * minimal names on the screen (if possible).
3586 for(i = 0; i < 6; i++)
3587 tw[i] = MAX(tw[i], min_w[i]);
3589 used_width = 0;
3590 for(i = 0; i < 6; i++)
3591 used_width += tw[i];
3593 while(used_width > width && !done){
3594 int candidate, excess;
3597 * Find the one with the most width over it's
3598 * minimum width.
3600 candidate = -1;
3601 excess = -100;
3602 for(i = 0; i < 6; i++){
3603 if(tw[i] - min_w[i] > excess){
3604 candidate = i;
3605 excess = tw[i] - min_w[i];
3609 if(excess > 0){
3610 tw[candidate]--;
3611 used_width--;
3613 else
3614 done++;
3617 done++;
3623 * Assign the format we came up with to the keymenu.
3625 next_one = 0;
3626 for(i = 0; i < 6; i++){
3627 k_top = offset + i*2;
3628 k_bot = k_top + 1;
3629 keytop = &km->keys[k_top];
3630 keybot = &km->keys[k_bot];
3631 top_name_width = (keytop->name && bitnset(k_top,bm))
3632 ? (ufk ? (i >= 5 ? 3 : 2)
3633 : utf8_width(keytop->name)) : 0;
3634 bot_name_width = (keybot->name && bitnset(k_bot,bm))
3635 ? (ufk ? (i >= 4 ? 3 : 2)
3636 : utf8_width(keybot->name)) : 0;
3638 if(top_name_width >= bot_name_width){
3639 keytop->column = next_one;
3640 keybot->column = next_one + (top_name_width - bot_name_width);
3642 else{
3643 keytop->column = next_one + (bot_name_width - top_name_width);
3644 keybot->column = next_one;
3647 next_one += tw[i];
3654 * Draw the key menu at bottom of screen
3656 * Args: km -- key_menu structure
3657 * bitmap -- which fields are active
3658 * width -- the screen width to format it at
3659 * row -- where to put it
3660 * column -- where to put it
3661 * what -- this is an enum telling us whether to display the
3662 * first menu (first set of 12 keys), or to display the same
3663 * one we displayed last time, or to display a particular
3664 * one (which), or to display the next one.
3666 * Fields are inactive if *either* the corresponding bitmap entry is 0 *or*
3667 * the actual entry in the key_menu is NULL. Therefore, it is sometimes
3668 * useful to just turn on all the bits in a bitmap and let the NULLs take
3669 * care of it. On the other hand, the bitmap gives a convenient method
3670 * for turning some keys on or off dynamically or due to options.
3671 * Both methods are used about equally.
3673 * Also saves the state for a possible redraw later.
3675 * Row should usually be a negative number. If row is 0, the menu is not
3676 * drawn.
3678 void
3679 draw_keymenu(struct key_menu *km, unsigned char *bitmap, int width, int row,
3680 int column, OtherMenu what)
3682 #ifdef _WINDOWS
3683 configure_menu_items (km, bitmap);
3684 #endif
3685 format_keymenu(km, bitmap, width);
3687 /*--- save state for a possible redraw ---*/
3688 km_state.km = km;
3689 km_state.row = row;
3690 km_state.column = column;
3691 memcpy(km_state.bitmap, bitmap, BM_SIZE);
3693 if(row == 0)
3694 return;
3696 if(km_state.blanked)
3697 keymenu_is_dirty = 1;
3699 if(what == FirstMenu || what == SecondMenu || what == ThirdMenu ||
3700 what == FourthMenu || what == MenuNotSet){
3701 if(what == FirstMenu || what == MenuNotSet)
3702 km->which = 0;
3703 else if(what == SecondMenu)
3704 km->which = 1;
3705 else if(what == ThirdMenu)
3706 km->which = 2;
3707 else if(what == FourthMenu)
3708 km->which = 3;
3710 if(km->which >= km->how_many)
3711 km->which = 0;
3713 else if(what == NextMenu)
3714 km->which = (km->which + 1) % km->how_many;
3715 /* else what must be SameMenu */
3717 output_keymenu(km, bitmap, row, column);
3719 km_state.blanked = 0;
3723 void
3724 redraw_keymenu(void)
3726 if(km_state.blanked)
3727 blank_keymenu(km_state.row, km_state.column);
3728 else
3729 draw_keymenu(km_state.km, km_state.bitmap, ps_global->ttyo->screen_cols,
3730 km_state.row, km_state.column, SameMenu);
3735 * end_keymenu - free resources associated with keymenu display cache
3737 void
3738 end_keymenu(void)
3740 int i;
3742 for(i = 0; i < 12; i++){
3743 if(last_time_buf[i].name)
3744 fs_give((void **) &last_time_buf[i].name);
3746 if(last_time_buf[i].label)
3747 fs_give((void **) &last_time_buf[i].label);
3752 /*----------------------------------------------------------------------
3753 Reveal Keymenu to Pine Command mappings
3755 Args:
3757 ----*/
3759 menu_command(UCS keystroke, struct key_menu *menu)
3761 int i, n;
3763 if(keystroke == KEY_UTF8 || keystroke == KEY_UNKNOWN)
3764 return(MC_UTF8);
3766 if(!menu)
3767 return(MC_UNKNOWN);
3769 if(F_ON(F_USE_FK,ps_global)){
3770 /* No alpha commands permitted in function key mode */
3771 if(keystroke < 0x80 && isalpha((unsigned char) keystroke))
3772 return(MC_UNKNOWN);
3774 /* Tres simple: compute offset, and test */
3775 if(keystroke >= F1 && keystroke <= F12){
3776 n = (menu->which * 12) + (keystroke - F1);
3777 if(bitnset(n, menu->bitmap))
3778 return(menu->keys[n].bind.cmd);
3781 else if(keystroke >= F1 && keystroke <= F12)
3782 return(MC_UNKNOWN);
3784 /* if ascii, coerce lower case */
3785 if(keystroke < 0x80 && isupper((unsigned char) keystroke))
3786 keystroke = tolower((unsigned char) keystroke);
3788 /* keep this here for Windows port */
3789 if((keystroke = validatekeys(keystroke)) == KEY_JUNK)
3790 return(MC_UNKNOWN);
3792 /* Scan the list for any keystroke/command binding */
3793 if(keystroke != NO_OP_COMMAND)
3794 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3795 if(bitnset(i, menu->bitmap))
3796 for(n = menu->keys[i].bind.nch - 1; n >= 0; n--)
3797 if(keystroke == menu->keys[i].bind.ch[n])
3798 return(menu->keys[i].bind.cmd);
3801 * If explicit mapping failed, check feature mappings and
3802 * hardwired defaults...
3804 if(F_ON(F_ENABLE_PRYNT,ps_global)
3805 && (keystroke == 'y' || keystroke == 'Y')){
3806 /* SPECIAL CASE: Scan the list for print bindings */
3807 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3808 if(bitnset(i, menu->bitmap))
3809 if(menu->keys[i].bind.cmd == MC_PRINTMSG
3810 || menu->keys[i].bind.cmd == MC_PRINTTXT)
3811 return(menu->keys[i].bind.cmd);
3814 if(F_ON(F_ENABLE_LESSTHAN_EXIT,ps_global)
3815 && (keystroke == '<' || keystroke == ','
3816 || (F_ON(F_ARROW_NAV,ps_global) && keystroke == KEY_LEFT))){
3817 /* SPECIAL CASE: Scan the list for MC_EXIT bindings */
3818 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3819 if(bitnset(i, menu->bitmap))
3820 if(menu->keys[i].bind.cmd == MC_EXIT)
3821 return(MC_EXIT);
3825 * If no match after scanning bindings, try universally
3826 * bound keystrokes...
3828 switch(keystroke){
3829 case KEY_MOUSE :
3830 return(MC_MOUSE);
3832 case ctrl('P') :
3833 case KEY_UP :
3834 return(MC_CHARUP);
3836 case ctrl('N') :
3837 case KEY_DOWN :
3838 return(MC_CHARDOWN);
3840 case ctrl('F') :
3841 case KEY_RIGHT :
3842 return(MC_CHARRIGHT);
3844 case ctrl('B') :
3845 case KEY_LEFT :
3846 return(MC_CHARLEFT);
3848 case ctrl('A') :
3849 return(MC_GOTOBOL);
3851 case ctrl('E') :
3852 return(MC_GOTOEOL);
3854 case ctrl('L') :
3855 return(MC_REPAINT);
3857 case KEY_RESIZE :
3858 return(MC_RESIZE);
3860 case NO_OP_IDLE:
3861 case NO_OP_COMMAND:
3862 if(USER_INPUT_TIMEOUT(ps_global))
3863 user_input_timeout_exit(ps_global->hours_to_timeout); /* no return */
3865 return(MC_NONE);
3867 default :
3868 break;
3871 return(MC_UNKNOWN); /* utter failure */
3876 /*----------------------------------------------------------------------
3877 Set up a binding for cmd, with one key bound to it.
3878 Use menu_add_binding to add more keys to this binding.
3880 Args: menu -- the keymenu
3881 key -- the initial key to bind to
3882 cmd -- the command to initialize to
3883 name -- a pointer to the string to point name to
3884 label -- a pointer to the string to point label to
3885 keynum -- which key in the keys array to initialize
3887 For translation purposes, the label in the calling routine
3888 should be wrapped in an N_() macro.
3890 ----*/
3891 void
3892 menu_init_binding(struct key_menu *menu, UCS key, int cmd, char *name, char *label, int keynum)
3894 /* if ascii, coerce to lower case */
3895 if(key < 0x80 && isupper((unsigned char)key))
3896 key = tolower((unsigned char)key);
3898 /* remove binding from any other key */
3899 menu_clear_cmd_binding(menu, cmd);
3901 menu->keys[keynum].name = name;
3902 menu->keys[keynum].label = label;
3903 menu->keys[keynum].bind.cmd = cmd;
3904 menu->keys[keynum].bind.nch = 0;
3905 menu->keys[keynum].bind.ch[menu->keys[keynum].bind.nch++] = key;
3909 /*----------------------------------------------------------------------
3910 Add a key/command binding to the given keymenu structure
3912 Args:
3914 ----*/
3915 void
3916 menu_add_binding(struct key_menu *menu, UCS key, int cmd)
3918 int i, n;
3920 /* NOTE: cmd *MUST* already have had a binding */
3921 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3922 if(menu->keys[i].bind.cmd == cmd){
3923 for(n = menu->keys[i].bind.nch - 1;
3924 n >= 0 && key != menu->keys[i].bind.ch[n];
3925 n--)
3928 /* if ascii, coerce to lower case */
3929 if(key < 0x80 && isupper((unsigned char)key))
3930 key = tolower((unsigned char)key);
3932 if(n < 0) /* not already bound, bind it */
3933 menu->keys[i].bind.ch[menu->keys[i].bind.nch++] = key;
3935 break;
3940 /*----------------------------------------------------------------------
3941 REMOVE a key/command binding from the given keymenu structure
3943 Args:
3945 ----*/
3947 menu_clear_binding(struct key_menu *menu, UCS key)
3949 int i, n;
3951 /* if ascii, coerce to lower case */
3952 if(key < 0x80 && isupper((unsigned char)key))
3953 key = tolower((unsigned char)key);
3955 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3956 for(n = menu->keys[i].bind.nch - 1; n >= 0; n--)
3957 if(key == menu->keys[i].bind.ch[n]){
3958 int cmd = menu->keys[i].bind.cmd;
3960 for(--menu->keys[i].bind.nch; n < menu->keys[i].bind.nch; n++)
3961 menu->keys[i].bind.ch[n] = menu->keys[i].bind.ch[n+1];
3963 return(cmd);
3966 return(MC_UNKNOWN);
3970 void
3971 menu_clear_cmd_binding(struct key_menu *menu, int cmd)
3973 int i;
3975 for(i = (menu->how_many * 12) - 1; i >= 0; i--){
3976 if(cmd == menu->keys[i].bind.cmd){
3977 menu->keys[i].name = NULL;
3978 menu->keys[i].label = NULL;
3979 menu->keys[i].bind.cmd = 0;
3980 menu->keys[i].bind.nch = 0;
3981 menu->keys[i].bind.ch[0] = 0;
3988 menu_binding_index(struct key_menu *menu, int cmd)
3990 int i;
3992 for(i = 0; i < menu->how_many * 12; i++)
3993 if(cmd == menu->keys[i].bind.cmd)
3994 return(i);
3996 return(-1);
4000 #ifdef MOUSE
4002 * print_inverted_label - highlight the label of the given menu item.
4003 * (callback from pico mouse routines)
4005 * So far, this is only
4006 * ever called with the top left row equal to the bottom right row.
4007 * If you change that you probably need to fix it.
4009 void
4010 print_inverted_label(int state, MENUITEM *m)
4012 unsigned i, j, k;
4013 int col_offsetwid, col_offsetchars, do_color = 0, skipwid = 0, skipchars = 0, len, c;
4014 char prename[100];
4015 char namepart[100];
4016 char labelpart[100];
4017 char *lp, *label;
4018 COLOR_PAIR *name_color = NULL, *label_color = NULL, *lastc = NULL;
4019 struct variable *vars = ps_global->vars;
4021 if(m->label && (lp=strchr(m->label, ' '))){
4022 char save;
4024 save = *lp;
4025 *lp = '\0';
4026 col_offsetwid = utf8_width(m->label);
4027 col_offsetchars = lp - m->label;
4028 *lp = save;
4030 else
4031 col_offsetwid = col_offsetchars = 0;
4033 if(pico_usingcolor() && ((VAR_KEYLABEL_FORE_COLOR &&
4034 VAR_KEYLABEL_BACK_COLOR) ||
4035 (VAR_KEYNAME_FORE_COLOR &&
4036 VAR_KEYNAME_BACK_COLOR))){
4037 lastc = pico_get_cur_color();
4039 if(VAR_KEYNAME_FORE_COLOR && VAR_KEYNAME_BACK_COLOR){
4040 name_color = state ? new_color_pair(VAR_KEYNAME_BACK_COLOR,
4041 VAR_KEYNAME_FORE_COLOR)
4042 : new_color_pair(VAR_KEYNAME_FORE_COLOR,
4043 VAR_KEYNAME_BACK_COLOR);
4045 else if(VAR_REV_FORE_COLOR && VAR_REV_BACK_COLOR)
4046 name_color = new_color_pair(VAR_REV_FORE_COLOR, VAR_REV_BACK_COLOR);
4048 if(VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR){
4049 label_color = state ? new_color_pair(VAR_KEYLABEL_BACK_COLOR,
4050 VAR_KEYLABEL_FORE_COLOR)
4051 : new_color_pair(VAR_KEYLABEL_FORE_COLOR,
4052 VAR_KEYLABEL_BACK_COLOR);
4054 else if(VAR_REV_FORE_COLOR && VAR_REV_BACK_COLOR){
4055 label_color = state ? new_color_pair(VAR_REV_FORE_COLOR,
4056 VAR_REV_BACK_COLOR)
4057 : new_color_pair(VAR_NORM_FORE_COLOR,
4058 VAR_NORM_BACK_COLOR);
4062 * See if we can grok all these colors. If not, we're going to
4063 * punt and pretend there are no colors at all.
4065 if(!pico_is_good_colorpair(name_color) ||
4066 !pico_is_good_colorpair(label_color)){
4067 if(name_color)
4068 free_color_pair(&name_color);
4069 if(label_color)
4070 free_color_pair(&label_color);
4071 if(lastc)
4072 free_color_pair(&lastc);
4074 else{
4075 do_color++;
4076 (void)pico_set_colorp(label_color, PSC_NONE);
4077 if(!(VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR)){
4078 if(state)
4079 StartInverse();
4080 else
4081 EndInverse();
4086 if(!do_color){
4088 * Command name's already inverted, leave it.
4090 skipwid = state ? 0 : col_offsetwid;
4091 skipchars = state ? 0 : col_offsetchars;
4092 if(state)
4093 StartInverse();
4094 else
4095 EndInverse();
4098 MoveCursor((int)(m->tl.r), (int)(m->tl.c) + skipwid);
4100 label = m->label ? m->label : "";
4101 len = strlen(label);
4104 * this is a bit complicated by the fact that we have to keep track of
4105 * the screenwidth as we print the label, because the screenwidth might
4106 * not be the same as the number of characters.
4107 * UNTESTED SINCE switching to UTF-8 *
4109 for(i = m->tl.r; i <= m->br.r; i++){
4110 /* collect part before name */
4111 for(k=0, j = m->tl.c + skipchars; j < MIN(m->lbl.c,m->br.c); j++){
4112 if(k < sizeof(prename))
4113 prename[k++] = ' ';
4116 if(k < sizeof(prename))
4117 prename[k] = '\0';
4119 /* collect name part */
4120 for(k=0; j < MIN(m->lbl.c+col_offsetchars,m->br.c); j++){
4121 c = (i == m->lbl.r &&
4122 j - m->lbl.c < len) ? label[j - m->lbl.c] : ' ';
4123 if(k < sizeof(namepart))
4124 namepart[k++] = c;
4127 if(k < sizeof(namepart))
4128 namepart[k] = '\0';
4130 /* collect label part */
4131 for(k=0; j <= m->br.c; j++){
4132 c = (i == m->lbl.r &&
4133 j - m->lbl.c < len) ? label[j - m->lbl.c] : ' ';
4134 if(k < sizeof(labelpart))
4135 labelpart[k++] = c;
4138 if(k < sizeof(labelpart))
4139 labelpart[k] = '\0';
4142 if(prename)
4143 Write_to_screen(prename);
4145 if(namepart){
4146 if(name_color && col_offsetchars)
4147 (void) pico_set_colorp(name_color, PSC_NONE);
4149 Write_to_screen(namepart);
4152 if(labelpart){
4153 if(name_color && col_offsetchars){
4154 if(label_color)
4155 (void) pico_set_colorp(label_color, PSC_NONE);
4156 else{
4157 if(state)
4158 StartInverse();
4159 else
4160 EndInverse();
4164 Write_to_screen(labelpart);
4167 if(do_color){
4168 if(lastc){
4169 (void)pico_set_colorp(lastc, PSC_NONE);
4170 free_color_pair(&lastc);
4172 else if(state)
4173 EndInverse();
4174 else
4175 pico_set_normal_color();
4177 if(name_color)
4178 free_color_pair(&name_color);
4179 if(label_color)
4180 free_color_pair(&label_color);
4182 else{
4183 if(state)
4184 EndInverse();
4187 #endif /* MOUSE */
4190 #ifdef _WINDOWS
4192 * This function scans the key menu and calls mswin.c functions
4193 * to build a corresponding windows menu.
4195 void
4196 configure_menu_items (struct key_menu *km, bitmap_t bitmap)
4198 int i;
4199 struct key *k;
4200 UCS key;
4202 mswin_menuitemclear ();
4204 if(!km)
4205 return;
4207 for (i = 0, k = km->keys ; i < km->how_many * 12; i++, k++) {
4208 if (k->name != NULL && k->label != NULL && bitnset (i, bitmap) &&
4209 k->menuitem != KS_NONE) {
4211 if (k->name[0] == '^')
4212 key = ctrl(k->name[1]);
4213 else if (strcmp(k->name, "Ret") == 0)
4214 key = '\r';
4215 else if (strcmp(k->name, "Spc") == 0)
4216 key = ' ';
4217 else
4218 key = k->name[0];
4220 mswin_menuitemadd (key, k->label, k->menuitem, 0);
4224 #endif