* Experimental: Alpine can pass an HTML message to an external web browser, by...
[alpine.git] / alpine / keymenu.c
blob65ba6f884a87e6b89190c516d629ee967a6278f8
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);
581 struct key forge_keys[] =
582 {HELP_MENU,
583 NULL_MENU,
584 {"Y",N_("Yes, continue"),{MC_YES,1,{'y'}},KS_NONE},
585 {"N",N_("No"),{MC_NO,1,{'n'}},KS_NONE},
586 NULL_MENU,
587 NULL_MENU,
588 PREVPAGE_MENU,
589 NEXTPAGE_MENU,
590 PRYNTTXT_MENU,
591 WHEREIS_MENU,
592 FWDEMAIL_MENU,
593 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE}};
594 INST_KEY_MENU(forge_keymenu, forge_keys);
597 struct key listmgr_keys[] =
598 {HELP_MENU,
599 NULL_MENU,
600 /* TRANSLATORS: Exit Command List */
601 {"E",N_("Exit CmdList"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
602 {"Ret","[" N_("Try Command") "]",{MC_VIEW_HANDLE,3,
603 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
604 /* TRANSLATORS: go to Previous Command in list */
605 {"^B",N_("Prev Cmd"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
606 /* TRANSLATORS: go to Next Command in list */
607 {"^F",N_("Next Cmd"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
608 PREVPAGE_MENU,
609 NEXTPAGE_MENU,
610 PRYNTTXT_MENU,
611 WHEREIS_MENU,
612 HOMEKEY_MENU,
613 ENDKEY_MENU};
614 INST_KEY_MENU(listmgr_keymenu, listmgr_keys);
617 struct key index_keys[] =
618 {HELP_MENU,
619 OTHER_MENU,
620 {"<", NULL, {MC_FOLDERS,2,{'<',','}}, KS_NONE},
621 VIEWMSG_MENU,
622 PREVMSG_MENU,
623 NEXTMSG_MENU,
624 PREVPAGE_MENU,
625 NEXTPAGE_MENU,
626 DELETE_MENU,
627 UNDELETE_MENU,
628 REPLY_MENU,
629 FORWARD_MENU,
631 HELP_MENU,
632 OTHER_MENU,
633 MAIN_MENU,
634 QUIT_MENU,
635 COMPOSE_MENU,
636 GOTO_MENU,
637 TAB_MENU,
638 WHEREIS_MENU,
639 PRYNTMSG_MENU,
640 TAKE_MENU,
641 SAVE_MENU,
642 EXPORT_MENU,
644 HELP_MENU,
645 OTHER_MENU,
646 {"X",NULL,{MC_EXPUNGE,1,{'x'}},KS_NONE},
647 /* TRANSLATORS: this stands for unexclude which is the opposite
648 of the exclude command. Exclude eliminates some messages from
649 the view and unexclude gets them back. */
650 {"&",N_("unXclude"),{MC_UNEXCLUDE,1,{'&'}},KS_NONE},
651 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_SELECT},
652 {"A",N_("Apply"),{MC_APPLY,1,{'a'}},KS_APPLY},
653 FLDRSORT_MENU,
654 JUMP_MENU,
655 HDRMODE_MENU,
656 BOUNCE_MENU,
657 FLAG_MENU,
658 PIPE_MENU,
660 HELP_MENU,
661 OTHER_MENU,
662 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
663 {"Z",N_("ZoomMode"),{MC_ZOOM,1,{'z'}},KS_ZOOM},
664 LISTFLD_MENU,
665 RCOMPOSE_MENU,
666 HOMEKEY_MENU,
667 ENDKEY_MENU,
668 NULL_MENU,
669 /* TRANSLATORS: toggles a collapsed view or an expanded view
670 of a message thread on and off */
671 {"/",N_("Collapse/Expand"),{MC_COLLAPSE,1,{'/'}},KS_NONE},
672 {"@", N_("Quota"), {MC_QUOTA,1,{'@'}}, KS_NONE},
673 NULL_MENU};
674 INST_KEY_MENU(index_keymenu, index_keys);
677 struct key simple_index_keys[] =
678 {HELP_MENU,
679 {"E",N_("ExitSelect"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
680 NULL_MENU,
681 {"S","[" N_("Select") "]",{MC_SELECT,3,{'s',ctrl('M'),ctrl('J')}},KS_SELECT},
682 PREVMSG_MENU,
683 NEXTMSG_MENU,
684 PREVPAGE_MENU,
685 NEXTPAGE_MENU,
686 DELETE_MENU,
687 UNDELETE_MENU,
688 WHEREIS_MENU,
689 NULL_MENU};
690 INST_KEY_MENU(simple_index_keymenu, simple_index_keys);
693 struct key thread_keys[] =
694 {HELP_MENU,
695 OTHER_MENU,
696 /* TRANSLATORS: go to the Folder List */
697 {"<", N_("FldrList"), {MC_FOLDERS,2,{'<',','}}, KS_NONE},
698 /* TRANSLATORS: View a Thread of messages */
699 {">", "[" N_("ViewThd") "]", {MC_VIEW_ENTRY,5,{'v','.','>',ctrl('M'),ctrl('J')}},
700 KS_VIEW},
701 /* TRANSLATORS: go to the Previous Thread */
702 {"P", N_("PrevThd"), {MC_PREVITEM, 1, {'p'}}, KS_PREVMSG},
703 /* TRANSLATORS: go to the Next Thread */
704 {"N", N_("NextThd"), {MC_NEXTITEM, 1, {'n'}}, KS_NEXTMSG},
705 PREVPAGE_MENU,
706 NEXTPAGE_MENU,
707 DELETE_MENU,
708 UNDELETE_MENU,
709 REPLY_MENU,
710 FORWARD_MENU,
712 HELP_MENU,
713 OTHER_MENU,
714 MAIN_MENU,
715 QUIT_MENU,
716 COMPOSE_MENU,
717 GOTO_MENU,
718 TAB_MENU,
719 WHEREIS_MENU,
720 PRYNTMSG_MENU,
721 TAKE_MENU,
722 SAVE_MENU,
723 EXPORT_MENU,
725 HELP_MENU,
726 OTHER_MENU,
727 {"X",NULL,{MC_EXPUNGE,1,{'x'}},KS_NONE},
728 {"&",N_("unXclude"),{MC_UNEXCLUDE,1,{'&'}},KS_NONE},
729 {";",N_("Select"),{MC_SELECT,1,{';'}},KS_SELECT},
730 {"A",N_("Apply"),{MC_APPLY,1,{'a'}},KS_APPLY},
731 FLDRSORT_MENU,
732 JUMP_MENU,
733 HDRMODE_MENU,
734 BOUNCE_MENU,
735 FLAG_MENU,
736 PIPE_MENU,
738 HELP_MENU,
739 OTHER_MENU,
740 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
741 {"Z",N_("ZoomMode"),{MC_ZOOM,1,{'z'}},KS_ZOOM},
742 LISTFLD_MENU,
743 RCOMPOSE_MENU,
744 HOMEKEY_MENU,
745 ENDKEY_MENU,
746 NULL_MENU,
747 {"/",N_("Collapse/Expand"),{MC_COLLAPSE,1,{'/'}},KS_NONE},
748 {"@", N_("Quota"), {MC_QUOTA,1,{'@'}}, KS_NONE},
749 NULL_MENU};
750 INST_KEY_MENU(thread_keymenu, thread_keys);
753 struct key att_index_keys[] =
754 {HELP_MENU,
755 OTHER_MENU,
756 {"<",NULL,{MC_EXIT,2,{'<',','}},KS_EXITMODE},
757 {">","[" N_("View") "]",{MC_VIEW_ATCH,5,{'v','>','.',ctrl('M'),ctrl('J')}},
758 KS_VIEW},
759 /* TRANSLATORS: go to Previous Attachment */
760 {"P", N_("PrevAttch"),{MC_PREVITEM,4,{'p',ctrl('B'),ctrl('P'),KEY_UP}},
761 KS_PREVMSG},
762 /* TRANSLATORS: go to Next Attachment */
763 {"N", N_("NextAtch"),
764 {MC_NEXTITEM, 5, {'n','\t',ctrl('F'),ctrl('N'), KEY_DOWN}},
765 KS_NEXTMSG},
766 PREVPAGE_MENU,
767 NEXTPAGE_MENU,
768 DELETE_MENU,
769 UNDELETE_MENU,
770 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
771 {NULL, NULL, {MC_EXPORT, 1, {'e'}}, KS_EXPORT},
773 HELP_MENU,
774 OTHER_MENU,
775 MAIN_MENU,
776 QUIT_MENU,
777 PIPE_MENU,
778 BOUNCE_MENU,
779 /* TRANSLATORS: About Attachment, a short description of the attachment */
780 {"A",N_("AboutAttch"),{MC_ABOUTATCH,1,{'a'}},KS_NONE},
781 WHEREIS_MENU,
782 {"%", N_("Print"), {MC_PRINTMSG,1,{'%'}}, KS_PRINT},
783 INDEX_MENU,
784 REPLY_MENU,
785 FORWARD_MENU,
787 HELP_MENU,
788 OTHER_MENU,
789 HDRMODE_MENU,
790 {"X",N_("eXternal"),{MC_EXTERNAL,1,{'x'}},KS_NONE},
791 NULL_MENU,
792 NULL_MENU,
793 NULL_MENU,
794 NULL_MENU,
795 NULL_MENU,
796 NULL_MENU,
797 NULL_MENU,
798 NULL_MENU};
799 INST_KEY_MENU(att_index_keymenu, att_index_keys);
802 struct key att_view_keys[] =
803 {HELP_MENU,
804 OTHER_MENU,
805 {"<",NULL,{MC_EXIT,2,{'<',','}},KS_EXITMODE},
806 /* TRANSLATORS: View highlighted URL */
807 {"Ret","[" N_("View Hilite") "]",{MC_VIEW_HANDLE,3,
808 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
809 /* TRANSLATORS: go to Previous URL */
810 {"^B",N_("Prev URL"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
811 /* TRANSLATORS: go to Next URL */
812 {"^F",N_("Next URL"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
813 PREVPAGE_MENU,
814 NEXTPAGE_MENU,
815 DELETE_MENU,
816 UNDELETE_MENU,
817 SAVE_MENU,
818 EXPORT_MENU,
820 HELP_MENU,
821 OTHER_MENU,
822 MAIN_MENU,
823 QUIT_MENU,
824 PIPE_MENU,
825 BOUNCE_MENU,
826 HDRMODE_MENU,
827 WHEREIS_MENU,
828 {"%", N_("Print"), {MC_PRINTMSG,1,{'%'}}, KS_PRINT},
829 NULL_MENU,
830 REPLY_MENU,
831 FORWARD_MENU,
833 HELP_MENU,
834 OTHER_MENU,
835 HOMEKEY_MENU,
836 ENDKEY_MENU,
837 NULL_MENU,
838 NULL_MENU,
839 #ifdef SMIME
840 {"^D","Decrypt", {MC_DECRYPT,1,{ctrl('d')}},KS_NONE},
841 {"^E","Security", {MC_SECURITY,1,{ctrl('e')}},KS_NONE},
842 #else
843 NULL_MENU,
844 NULL_MENU,
845 #endif
846 NULL_MENU,
847 NULL_MENU,
848 NULL_MENU,
849 NULL_MENU};
850 INST_KEY_MENU(att_view_keymenu, att_view_keys);
853 struct key view_keys[] =
854 {HELP_MENU,
855 OTHER_MENU,
856 /* TRANSLATORS: go to Message Index */
857 {"<",N_("MsgIndex"),{MC_INDEX,3,{'i','<',','}},KS_FLDRINDEX},
858 /* TRANSLATORS: View the Attachment */
859 {">",N_("ViewAttch"),{MC_VIEW_ATCH,3,{'v','>','.'}},KS_NONE},
860 PREVMSG_MENU,
861 NEXTMSG_MENU,
862 PREVPAGE_MENU,
863 NEXTPAGE_MENU,
864 DELETE_MENU,
865 UNDELETE_MENU,
866 REPLY_MENU,
867 FORWARD_MENU,
869 HELP_MENU,
870 OTHER_MENU,
871 MAIN_MENU,
872 QUIT_MENU,
873 LISTFLD_MENU,
874 GOTO_MENU,
875 COMPOSE_MENU,
876 WHEREIS_MENU,
877 PRYNTMSG_MENU,
878 TAKE_MENU,
879 SAVE_MENU,
880 EXPORT_MENU,
882 HELP_MENU,
883 OTHER_MENU,
884 /* TRANSLATORS: View the highlighted URL */
885 {"Ret","[" N_("View Hilite") "]",{MC_VIEW_HANDLE,3,
886 {ctrl('m'),ctrl('j'),KEY_RIGHT}},KS_NONE},
887 /* TRANSLATORS: Select the current item */
888 {":",N_("SelectCur"),{MC_SELCUR,1,{':'}},KS_SELECTCUR},
889 /* TRANSLATORS: go to previous URL */
890 {"^B",N_("Prev URL"),{MC_PREV_HANDLE,1,{ctrl('B')}},KS_NONE},
891 /* TRANSLATORS: go to next URL */
892 {"^F",N_("Next URL"),{MC_NEXT_HANDLE,1,{ctrl('F')}},KS_NONE},
893 JUMP_MENU,
894 TAB_MENU,
895 HDRMODE_MENU,
896 BOUNCE_MENU,
897 FLAG_MENU,
898 PIPE_MENU,
900 HELP_MENU,
901 OTHER_MENU,
902 HOMEKEY_MENU,
903 ENDKEY_MENU,
904 RCOMPOSE_MENU,
905 {"A",N_("TogglePreferPlain"),{MC_TOGGLE,1,{'a'}},KS_NONE},
906 #ifdef SMIME
907 {"^D","Decrypt", {MC_DECRYPT,1,{ctrl('d')}},KS_NONE},
908 {"^E","Security", {MC_SECURITY,1,{ctrl('e')}},KS_NONE},
909 #else
910 NULL_MENU,
911 NULL_MENU,
912 #endif
913 NULL_MENU,
914 NULL_MENU,
915 NULL_MENU,
916 NULL_MENU};
917 INST_KEY_MENU(view_keymenu, view_keys);
920 struct key simple_text_keys[] =
921 {HELP_MENU,
922 OTHER_MENU,
923 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
924 NULL_MENU,
925 NULL_MENU,
926 NULL_MENU,
927 PREVPAGE_MENU,
928 NEXTPAGE_MENU,
929 PRYNTTXT_MENU,
930 WHEREIS_MENU,
931 FWDEMAIL_MENU,
932 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
934 HELP_MENU,
935 OTHER_MENU,
936 NULL_MENU,
937 NULL_MENU,
938 NULL_MENU,
939 NULL_MENU,
940 NULL_MENU,
941 NULL_MENU,
942 NULL_MENU,
943 NULL_MENU,
944 HOMEKEY_MENU,
945 ENDKEY_MENU};
946 INST_KEY_MENU(simple_text_keymenu, simple_text_keys);
949 struct key oe_keys[] =
950 {{"^G",N_("Help"),{MC_NONE},KS_SCREENHELP},
951 {"^C",N_("Cancel"),{MC_NONE},KS_NONE},
952 {"^T","xxx",{MC_NONE},KS_NONE},
953 /* TRANSLATORS: The user is entering characters, for example, the
954 name of a folder. Accept means the user is done and wants to
955 accept what is currently displayed. */
956 {"Ret",N_("Accept"),{MC_NONE},KS_NONE},
957 NULL_MENU,
958 NULL_MENU,
959 NULL_MENU,
960 NULL_MENU,
961 NULL_MENU,
962 NULL_MENU,
963 NULL_MENU,
964 NULL_MENU};
965 INST_KEY_MENU(oe_keymenu, oe_keys);
968 struct key choose_setup_keys[] =
969 {HELP_MENU,
970 OTHER_MENU,
971 {"E",N_("Exit Setup"),{MC_EXIT,2,{'e',ctrl('C')}},KS_EXITMODE},
972 {"P",N_("Printer"),{MC_PRINTER,1,{'p'}},KS_NONE},
973 /* TRANSLATORS: Change password */
974 {"N",N_("Newpassword"),{MC_PASSWD,1,{'n'}},KS_NONE},
975 /* TRANSLATORS: Configure Alpine */
976 {"C",N_("Config"),{MC_CONFIG,1,{'c'}},KS_NONE},
977 /* TRANSLATORS: Edit signature block */
978 {"S",N_("Signature"),{MC_SIG,1,{'s'}},KS_NONE},
979 /* TRANSLATORS: configure address books */
980 {"A",N_("AddressBooks"),{MC_ABOOKS,1,{'a'}},KS_NONE},
981 /* TRANSLATORS: configure collection lists */
982 {"L",N_("collectionList"),{MC_CLISTS,1,{'l'}},KS_NONE},
983 /* TRANSLATORS: configure rules, an alpine concept */
984 {"R",N_("Rules"),{MC_RULES,1,{'r'}},KS_NONE},
985 /* TRANSLATORS: configure directory servers */
986 {"D",N_("Directory"),{MC_DIRECTORY,1,{'d'}},KS_NONE},
987 /* TRANSLATORS: configure color */
988 {"K",N_("Kolor"),{MC_KOLOR,1,{'k'}},KS_NONE},
990 HELP_MENU,
991 OTHER_MENU,
992 NULL_MENU,
993 /* TRANSLATORS: remote configuration setup */
994 {"Z",N_("RemoteConfigSetup"),{MC_REMOTE,1,{'z'}},KS_NONE},
995 /* TRANSLATORS: configure S/MIME */
996 {"M",N_("S/Mime"),{MC_SECURITY,1,{'m'}},KS_NONE},
997 {"U",N_("xoaUth2"),{MC_XOAUTH2,1,{'u'}},KS_NONE},
998 PREVPAGE_MENU,
999 NEXTPAGE_MENU,
1000 NULL_MENU,
1001 NULL_MENU,
1002 HOMEKEY_MENU,
1003 ENDKEY_MENU};
1004 INST_KEY_MENU(choose_setup_keymenu, choose_setup_keys);
1007 struct key main_keys[] =
1008 {HELP_MENU,
1009 OTHER_MENU,
1010 NULL_MENU,
1011 NULL_MENU,
1012 /* TRANSLATORS: go to Previous Command in list */
1013 {"P",N_("PrevCmd"),{MC_PREVITEM,3,{'p',ctrl('P'),KEY_UP}},KS_NONE},
1014 {"N",N_("NextCmd"),{MC_NEXTITEM,3,{'n',ctrl('N'),KEY_DOWN}},KS_NONE},
1015 NULL_MENU,
1016 NULL_MENU,
1017 /* TRANSLATORS: show release notes */
1018 {"R",N_("RelNotes"),{MC_RELNOTES,1,{'r'}},KS_NONE},
1019 /* TRANSLATORS: lock keyboard */
1020 {"K",N_("KBLock"),{MC_KBLOCK,1,{'k'}},KS_NONE},
1021 NULL_MENU,
1022 NULL_MENU,
1024 HELP_MENU,
1025 OTHER_MENU,
1026 QUIT_MENU,
1027 COMPOSE_MENU,
1028 LISTFLD_MENU,
1029 GOTO_MENU,
1030 {"I",N_("Index"),{MC_INDEX,1,{'i'}},KS_FLDRINDEX},
1031 /* TRANSLATORS: go to the Journal. The Journal shows past
1032 messages that alpine has shown the user. */
1033 {"J",N_("Journal"),{MC_JOURNAL,1,{'j'}},KS_REVIEW},
1034 /* TRANSLATORS: go to the Setup screen */
1035 {"S",N_("Setup"),{MC_SETUP,1,{'s'}},KS_NONE},
1036 /* TRANSLATORS: go to the address book screen */
1037 {"A",N_("AddrBook"),{MC_ADDRBOOK,1,{'a'}},KS_ADDRBOOK},
1038 RCOMPOSE_MENU,
1039 NULL_MENU};
1040 INST_KEY_MENU(main_keymenu, main_keys);
1043 struct key simple_file_keys[] =
1044 {HELP_MENU,
1045 OTHER_MENU,
1046 {"Q",N_("Quit Viewer"),{MC_EXIT,1,{'q'}},KS_NONE},
1047 NULL_MENU,
1048 NULL_MENU,
1049 NULL_MENU,
1050 PREVPAGE_MENU,
1051 NEXTPAGE_MENU,
1052 PRYNTTXT_MENU,
1053 WHEREIS_MENU,
1054 FWDEMAIL_MENU,
1055 {"S", N_("Save"), {MC_SAVETEXT,1,{'s'}}, KS_SAVE},
1057 HELP_MENU,
1058 OTHER_MENU,
1059 NULL_MENU,
1060 NULL_MENU,
1061 NULL_MENU,
1062 NULL_MENU,
1063 NULL_MENU,
1064 NULL_MENU,
1065 NULL_MENU,
1066 NULL_MENU,
1067 HOMEKEY_MENU,
1068 ENDKEY_MENU};
1069 INST_KEY_MENU(simple_file_keymenu, simple_file_keys);
1072 struct key nuov_keys[] =
1073 {HELP_MENU,
1074 OTHER_MENU,
1075 {"E",NULL,{MC_EXIT,1,{'e',ctrl('M'),ctrl('J')}},KS_NONE},
1076 /* TRANSLATORS: Alpine asks the user to be counted when they
1077 first start using alpine. */
1078 {"Ret","[" N_("Be Counted!") "]",{MC_VIEW_HANDLE,2,{ctrl('M'),ctrl('J')}},KS_NONE},
1079 NULL_MENU,
1080 NULL_MENU,
1081 PREVPAGE_MENU,
1082 NEXTPAGE_MENU,
1083 PRYNTMSG_MENU,
1084 NULL_MENU,
1085 /* TRANSLATORS: show release notes */
1086 {"R",N_("RelNotes"),{MC_RELNOTES,1,{'r'}},KS_NONE},
1087 NULL_MENU,
1089 HELP_MENU,
1090 OTHER_MENU,
1091 NULL_MENU,
1092 NULL_MENU,
1093 NULL_MENU,
1094 NULL_MENU,
1095 NULL_MENU,
1096 NULL_MENU,
1097 NULL_MENU,
1098 NULL_MENU,
1099 HOMEKEY_MENU,
1100 ENDKEY_MENU};
1101 INST_KEY_MENU(nuov_keymenu, nuov_keys);
1104 struct key modal_message_keys[] =
1105 {NULL_MENU,
1106 NULL_MENU,
1107 {"Ret",N_("Finished"),{MC_EXIT,2,{ctrl('m'),ctrl('j')}},KS_NONE},
1108 NULL_MENU,
1109 NULL_MENU,
1110 NULL_MENU,
1111 PREVPAGE_MENU,
1112 NEXTPAGE_MENU,
1113 NULL_MENU,
1114 NULL_MENU,
1115 HOMEKEY_MENU,
1116 ENDKEY_MENU};
1117 INST_KEY_MENU(modal_message_keymenu, modal_message_keys);
1120 struct key ta_keys_lm[] =
1121 {HELP_MENU,
1122 WHEREIS_MENU,
1123 TA_EXIT_MENU,
1124 /* TRANSLATORS: Take this address into the address book */
1125 {"T", N_("Take"), {MC_TAKE,1,{'t'}}, KS_NONE},
1126 TA_PREV_MENU,
1127 TA_NEXT_MENU,
1128 PREVPAGE_MENU,
1129 NEXTPAGE_MENU,
1130 {"X","[" N_("Set/Unset") "]", {MC_CHOICE,3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
1131 {"A", N_("SetAll"),{MC_SELALL,1,{'a'}},KS_NONE},
1132 {"U",N_("UnSetAll"),{MC_UNSELALL,1,{'u'}},KS_NONE},
1133 /* TRANSLATORS: The Take Address screen has a Single mode and a
1134 List mode. This command causes us to go into Single mode. */
1135 {"S",N_("SinglMode"),{MC_LISTMODE,1,{'s'}},KS_NONE}};
1136 INST_KEY_MENU(ta_keymenu_lm, ta_keys_lm);
1139 struct key ta_keys_sm[] =
1140 {HELP_MENU,
1141 WHEREIS_MENU,
1142 TA_EXIT_MENU,
1143 {"T","[" N_("Take") "]",{MC_TAKE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
1144 TA_PREV_MENU,
1145 TA_NEXT_MENU,
1146 PREVPAGE_MENU,
1147 NEXTPAGE_MENU,
1148 NULL_MENU,
1149 NULL_MENU,
1150 NULL_MENU,
1151 /* TRANSLATORS: The Take Address screen has a Single mode and a
1152 List mode. This command causes us to go into List mode. */
1153 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE}};
1154 INST_KEY_MENU(ta_keymenu_sm, ta_keys_sm);
1157 struct key pipe_cancel_keys[] =
1158 {NULL_MENU,
1159 {"^C",N_("Stop Waiting"),{MC_NONE},KS_NONE},
1160 NULL_MENU,
1161 NULL_MENU,
1162 NULL_MENU,
1163 NULL_MENU,
1164 NULL_MENU,
1165 NULL_MENU,
1166 NULL_MENU,
1167 NULL_MENU,
1168 NULL_MENU,
1169 NULL_MENU};
1170 INST_KEY_MENU(pipe_cancel_keymenu, pipe_cancel_keys);
1173 struct key color_pattern_keys[] =
1174 {HELP_MENU,
1175 OTHER_MENU,
1176 EXIT_SETUP_MENU,
1177 /* TRANSLATORS: Change Value */
1178 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1179 PREV_MENU,
1180 NEXT_MENU,
1181 PREVPAGE_MENU,
1182 NEXTPAGE_MENU,
1183 NULL_MENU,
1184 /* TRANSLATORS: Delete Value */
1185 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1186 PRYNTTXT_MENU,
1187 WHEREIS_MENU,
1189 HELP_MENU,
1190 OTHER_MENU,
1191 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
1192 NULL_MENU,
1193 NULL_MENU,
1194 NULL_MENU,
1195 NULL_MENU,
1196 NULL_MENU,
1197 NULL_MENU,
1198 NULL_MENU,
1199 HOMEKEY_MENU,
1200 ENDKEY_MENU};
1201 INST_KEY_MENU(color_pattern_keymenu, color_pattern_keys);
1204 struct key hdr_color_checkbox_keys[] =
1205 {HELP_MENU,
1206 NULL_MENU,
1207 EXIT_SETUP_MENU,
1208 TOGGLEB_MENU,
1209 PREV_MENU,
1210 NEXT_MENU,
1211 PREVPAGE_MENU,
1212 NEXTPAGE_MENU,
1213 HOMEKEY_MENU,
1214 ENDKEY_MENU,
1215 PRYNTTXT_MENU,
1216 WHEREIS_MENU};
1217 INST_KEY_MENU(hdr_color_checkbox_keymenu, hdr_color_checkbox_keys);
1220 struct key kw_color_checkbox_keys[] =
1221 {HELP_MENU,
1222 NULL_MENU,
1223 EXIT_SETUP_MENU,
1224 TOGGLEC_MENU,
1225 PREV_MENU,
1226 NEXT_MENU,
1227 PREVPAGE_MENU,
1228 NEXTPAGE_MENU,
1229 HOMEKEY_MENU,
1230 ENDKEY_MENU,
1231 PRYNTTXT_MENU,
1232 WHEREIS_MENU};
1233 INST_KEY_MENU(kw_color_checkbox_keymenu, kw_color_checkbox_keys);
1236 struct key selectable_bold_checkbox_keys[] =
1237 {HELP_MENU,
1238 NULL_MENU,
1239 EXIT_SETUP_MENU,
1240 TOGGLED_MENU,
1241 PREV_MENU,
1242 NEXT_MENU,
1243 PREVPAGE_MENU,
1244 NEXTPAGE_MENU,
1245 HOMEKEY_MENU,
1246 ENDKEY_MENU,
1247 PRYNTTXT_MENU,
1248 WHEREIS_MENU};
1249 INST_KEY_MENU(selectable_bold_checkbox_keymenu, selectable_bold_checkbox_keys);
1252 struct key flag_keys[] =
1253 {HELP_MENU,
1254 {"A", N_("Add KW"), {MC_ADD,1,{'a'}}, KS_NONE},
1255 /* TRANSLATORS: Exit from the Flags screen */
1256 {"E", N_("Exit Flags"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1257 TOGGLE_MENU,
1258 PREV_MENU,
1259 NEXT_MENU,
1260 PREVPAGE_MENU,
1261 NEXTPAGE_MENU,
1262 HOMEKEY_MENU,
1263 ENDKEY_MENU,
1264 PRYNTTXT_MENU,
1265 WHEREIS_MENU};
1266 INST_KEY_MENU(flag_keymenu, flag_keys);
1269 struct key addr_select_keys[] =
1270 {HELP_MENU,
1271 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1272 NULL_MENU,
1273 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1274 PREV_MENU,
1275 NEXT_MENU,
1276 PREVPAGE_MENU,
1277 NEXTPAGE_MENU,
1278 HOMEKEY_MENU,
1279 ENDKEY_MENU,
1280 NULL_MENU,
1281 WHEREIS_MENU};
1282 INST_KEY_MENU(addr_s_km, addr_select_keys);
1285 struct key addr_select_with_goback_keys[] =
1286 {HELP_MENU,
1287 NULL_MENU,
1288 /* TRANSLATORS: go to address book list */
1289 {"<", N_("AddressBkList"), {MC_ADDRBOOK,2,{'<',','}}, KS_NONE},
1290 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1291 PREV_MENU,
1292 NEXT_MENU,
1293 PREVPAGE_MENU,
1294 NEXTPAGE_MENU,
1295 HOMEKEY_MENU,
1296 ENDKEY_MENU,
1297 {"E", N_("ExitSelect"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1298 WHEREIS_MENU};
1299 INST_KEY_MENU(addr_s_km_with_goback, addr_select_with_goback_keys);
1301 static struct key addr_select_with_view_keys[] =
1302 {HELP_MENU,
1303 RCOMPOSE_MENU,
1304 {"<", N_("AddressBkList"), {MC_ADDRBOOK,2,{'<',','}}, KS_NONE},
1305 {">", "[" N_("View") "]",
1306 {MC_VIEW_TEXT,5,{'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
1307 PREV_MENU,
1308 NEXT_MENU,
1309 PREVPAGE_MENU,
1310 NEXTPAGE_MENU,
1311 /* TRANSLATORS: compose a message to the current address */
1312 {"C", N_("ComposeTo"), {MC_COMPOSE,1,{'c'}}, KS_COMPOSER},
1313 FWDEMAIL_MENU,
1314 SAVE_MENU,
1315 WHEREIS_MENU,
1317 HELP_MENU,
1318 OTHER_MENU,
1319 NULL_MENU,
1320 NULL_MENU,
1321 NULL_MENU,
1322 NULL_MENU,
1323 NULL_MENU,
1324 NULL_MENU,
1325 NULL_MENU,
1326 NULL_MENU,
1327 HOMEKEY_MENU,
1328 ENDKEY_MENU};
1329 INST_KEY_MENU(addr_s_km_with_view, addr_select_with_view_keys);
1332 struct key addr_select_for_url_keys[] =
1333 {HELP_MENU,
1334 RCOMPOSE_MENU,
1335 {"<", N_("Exit Viewer"), {MC_ADDRBOOK,3,{'<',',','e'}}, KS_NONE},
1336 {">", "[" N_("View") "]",
1337 {MC_VIEW_TEXT,5,{'v','>','.',ctrl('M'),ctrl('J')}}, KS_NONE},
1338 PREV_MENU,
1339 NEXT_MENU,
1340 PREVPAGE_MENU,
1341 NEXTPAGE_MENU,
1342 {"C", N_("ComposeTo"), {MC_COMPOSE,1,{'c'}}, KS_COMPOSER},
1343 FWDEMAIL_MENU,
1344 SAVE_MENU,
1345 WHEREIS_MENU,
1347 HELP_MENU,
1348 OTHER_MENU,
1349 NULL_MENU,
1350 NULL_MENU,
1351 NULL_MENU,
1352 NULL_MENU,
1353 NULL_MENU,
1354 NULL_MENU,
1355 NULL_MENU,
1356 NULL_MENU,
1357 HOMEKEY_MENU,
1358 ENDKEY_MENU};
1359 INST_KEY_MENU(addr_s_km_for_url, addr_select_for_url_keys);
1362 struct key addr_select_exit_keys[] =
1363 {NULL_MENU,
1364 NULL_MENU,
1365 {"E", "[" N_("Exit") "]", {MC_EXIT,3,{'e',ctrl('M'),ctrl('J')}},
1366 KS_EXITMODE},
1367 NULL_MENU,
1368 NULL_MENU,
1369 NULL_MENU,
1370 NULL_MENU,
1371 NULL_MENU,
1372 NULL_MENU,
1373 NULL_MENU,
1374 NULL_MENU,
1375 NULL_MENU};
1376 INST_KEY_MENU(addr_s_km_exit, addr_select_exit_keys);
1379 struct key addr_select_goback_keys[] =
1380 {NULL_MENU,
1381 NULL_MENU,
1382 {"E", "[" N_("Exit") "]", {MC_ADDRBOOK,3,{'e',ctrl('M'),ctrl('J')}},
1383 KS_EXITMODE},
1384 NULL_MENU,
1385 NULL_MENU,
1386 NULL_MENU,
1387 NULL_MENU,
1388 NULL_MENU,
1389 NULL_MENU,
1390 NULL_MENU,
1391 NULL_MENU,
1392 NULL_MENU};
1393 INST_KEY_MENU(addr_s_km_goback, addr_select_goback_keys);
1396 struct key config_text_keys[] =
1397 {HELP_MENU,
1398 OTHER_MENU,
1399 EXIT_SETUP_MENU,
1400 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1401 PREV_MENU,
1402 NEXT_MENU,
1403 PREVPAGE_MENU,
1404 NEXTPAGE_MENU,
1405 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1406 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1407 PRYNTTXT_MENU,
1408 WHEREIS_MENU,
1410 HELP_MENU,
1411 OTHER_MENU,
1412 NULL_MENU,
1413 NULL_MENU,
1414 NULL_MENU,
1415 NULL_MENU,
1416 NULL_MENU,
1417 NULL_MENU,
1418 NULL_MENU,
1419 NULL_MENU,
1420 HOMEKEY_MENU,
1421 ENDKEY_MENU};
1422 INST_KEY_MENU(config_text_keymenu, config_text_keys);
1425 struct key config_text_to_charsets_keys[] =
1426 {HELP_MENU,
1427 OTHER_MENU,
1428 EXIT_SETUP_MENU,
1429 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1430 PREV_MENU,
1431 NEXT_MENU,
1432 PREVPAGE_MENU,
1433 NEXTPAGE_MENU,
1434 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1435 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1436 PRYNTTXT_MENU,
1437 WHEREIS_MENU,
1439 HELP_MENU,
1440 OTHER_MENU,
1441 NULL_MENU,
1442 NULL_MENU,
1443 /* TRANSLATORS: go to list of keywords */
1444 {"T", N_("ToCharsets"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1445 NULL_MENU,
1446 NULL_MENU,
1447 NULL_MENU,
1448 NULL_MENU,
1449 NULL_MENU,
1450 HOMEKEY_MENU,
1451 ENDKEY_MENU};
1452 INST_KEY_MENU(config_text_to_charsets_keymenu, config_text_to_charsets_keys);
1455 struct key direct_config_keys[] =
1456 {HELP_MENU,
1457 NULL_MENU,
1458 {"E", N_("Exit Setup"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1459 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1460 /* TRANSLATORS: go to previous LDAP directory server in the list */
1461 {"P", N_("PrevDir"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1462 {"N", N_("NextDir"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1463 PREVPAGE_MENU,
1464 NEXTPAGE_MENU,
1465 /* TRANSLATORS: add a directory server to configuration */
1466 {"A", N_("Add Dir"), {MC_ADD,1,{'a'}}, KS_NONE},
1467 /* TRANSLATORS: delete a directory */
1468 {"D", N_("Del Dir"), {MC_DELETE,1,{'d'}}, KS_NONE},
1469 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1470 WHEREIS_MENU,
1472 HELP_MENU,
1473 OTHER_MENU,
1474 NULL_MENU,
1475 NULL_MENU,
1476 NULL_MENU,
1477 NULL_MENU,
1478 NULL_MENU,
1479 NULL_MENU,
1480 NULL_MENU,
1481 NULL_MENU,
1482 HOMEKEY_MENU,
1483 ENDKEY_MENU};
1484 INST_KEY_MENU(dir_conf_km, direct_config_keys);
1487 struct key sel_from_list_keys[] =
1488 {HELP_MENU,
1489 NULL_MENU,
1490 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1491 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1492 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1493 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1494 PREVPAGE_MENU,
1495 NEXTPAGE_MENU,
1496 HOMEKEY_MENU,
1497 ENDKEY_MENU,
1498 PRYNTTXT_MENU,
1499 WHEREIS_MENU};
1500 INST_KEY_MENU(sel_from_list, sel_from_list_keys);
1503 struct key sel_from_list_keys_ctrlc[] =
1504 {HELP_MENU,
1505 NULL_MENU,
1506 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1507 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1508 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1509 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1510 PREVPAGE_MENU,
1511 NEXTPAGE_MENU,
1512 HOMEKEY_MENU,
1513 ENDKEY_MENU,
1514 PRYNTTXT_MENU,
1515 WHEREIS_MENU};
1516 INST_KEY_MENU(sel_from_list_ctrlc, sel_from_list_keys_ctrlc);
1519 struct key sel_from_list_keys_sm[] =
1520 {HELP_MENU,
1521 OTHER_MENU,
1522 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1523 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1524 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1525 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1526 PREVPAGE_MENU,
1527 NEXTPAGE_MENU,
1528 NULL_MENU,
1529 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE},
1530 PRYNTTXT_MENU,
1531 WHEREIS_MENU,
1533 HELP_MENU,
1534 OTHER_MENU,
1535 NULL_MENU,
1536 NULL_MENU,
1537 NULL_MENU,
1538 NULL_MENU,
1539 NULL_MENU,
1540 NULL_MENU,
1541 NULL_MENU,
1542 NULL_MENU,
1543 HOMEKEY_MENU,
1544 ENDKEY_MENU};
1545 INST_KEY_MENU(sel_from_list_sm, sel_from_list_keys_sm);
1548 struct key sel_from_list_keys_sm_ctrlc[] =
1549 {HELP_MENU,
1550 OTHER_MENU,
1551 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1552 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1553 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1554 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1555 PREVPAGE_MENU,
1556 NEXTPAGE_MENU,
1557 NULL_MENU,
1558 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE},
1559 PRYNTTXT_MENU,
1560 WHEREIS_MENU,
1562 HELP_MENU,
1563 OTHER_MENU,
1564 NULL_MENU,
1565 NULL_MENU,
1566 NULL_MENU,
1567 NULL_MENU,
1568 NULL_MENU,
1569 NULL_MENU,
1570 NULL_MENU,
1571 NULL_MENU,
1572 HOMEKEY_MENU,
1573 ENDKEY_MENU};
1574 INST_KEY_MENU(sel_from_list_sm_ctrlc, sel_from_list_keys_sm_ctrlc);
1577 struct key sel_from_list_keys_lm[] =
1578 {HELP_MENU,
1579 OTHER_MENU,
1580 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1581 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1582 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1583 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1584 PREVPAGE_MENU,
1585 NEXTPAGE_MENU,
1586 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1587 {"1",N_("SinglMode"),{MC_LISTMODE,1,{'1'}},KS_NONE},
1588 PRYNTTXT_MENU,
1589 WHEREIS_MENU,
1591 HELP_MENU,
1592 OTHER_MENU,
1593 NULL_MENU,
1594 NULL_MENU,
1595 NULL_MENU,
1596 NULL_MENU,
1597 NULL_MENU,
1598 NULL_MENU,
1599 NULL_MENU,
1600 NULL_MENU,
1601 HOMEKEY_MENU,
1602 ENDKEY_MENU};
1603 INST_KEY_MENU(sel_from_list_lm, sel_from_list_keys_lm);
1606 struct key sel_from_list_keys_lm_ctrlc[] =
1607 {HELP_MENU,
1608 OTHER_MENU,
1609 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1610 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1611 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1612 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1613 PREVPAGE_MENU,
1614 NEXTPAGE_MENU,
1615 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1616 {"1",N_("SinglMode"),{MC_LISTMODE,1,{'1'}},KS_NONE},
1617 PRYNTTXT_MENU,
1618 WHEREIS_MENU,
1620 HELP_MENU,
1621 OTHER_MENU,
1622 NULL_MENU,
1623 NULL_MENU,
1624 NULL_MENU,
1625 NULL_MENU,
1626 NULL_MENU,
1627 NULL_MENU,
1628 NULL_MENU,
1629 NULL_MENU,
1630 HOMEKEY_MENU,
1631 ENDKEY_MENU};
1632 INST_KEY_MENU(sel_from_list_lm_ctrlc, sel_from_list_keys_lm_ctrlc);
1635 struct key sel_from_list_keys_olm[] =
1636 {HELP_MENU,
1637 OTHER_MENU,
1638 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1639 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1640 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1641 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1642 PREVPAGE_MENU,
1643 NEXTPAGE_MENU,
1644 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1645 NULL_MENU,
1646 PRYNTTXT_MENU,
1647 WHEREIS_MENU,
1649 HELP_MENU,
1650 OTHER_MENU,
1651 NULL_MENU,
1652 NULL_MENU,
1653 NULL_MENU,
1654 NULL_MENU,
1655 NULL_MENU,
1656 NULL_MENU,
1657 NULL_MENU,
1658 NULL_MENU,
1659 HOMEKEY_MENU,
1660 ENDKEY_MENU};
1661 INST_KEY_MENU(sel_from_list_olm, sel_from_list_keys_olm);
1664 struct key sel_from_list_keys_olm_ctrlc[] =
1665 {HELP_MENU,
1666 OTHER_MENU,
1667 {"^C", N_("exit"), {MC_EXIT,1,{ctrl('C')}}, KS_EXITMODE},
1668 {"S", "[" N_("Select") "]", {MC_SELECT,3,{'s',ctrl('J'),ctrl('M')}}, KS_NONE},
1669 {"P", N_("Prev"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1670 {"N", N_("Next"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1671 PREVPAGE_MENU,
1672 NEXTPAGE_MENU,
1673 {"X", N_("Set/Unset"), {MC_TOGGLE,1,{'x'}}, KS_NONE},
1674 NULL_MENU,
1675 PRYNTTXT_MENU,
1676 WHEREIS_MENU,
1678 HELP_MENU,
1679 OTHER_MENU,
1680 NULL_MENU,
1681 NULL_MENU,
1682 NULL_MENU,
1683 NULL_MENU,
1684 NULL_MENU,
1685 NULL_MENU,
1686 NULL_MENU,
1687 NULL_MENU,
1688 HOMEKEY_MENU,
1689 ENDKEY_MENU};
1690 INST_KEY_MENU(sel_from_list_olm_ctrlc, sel_from_list_keys_olm_ctrlc);
1693 #ifndef DOS
1695 struct key printer_edit_keys[] =
1696 {HELP_MENU,
1697 PRYNTTXT_MENU,
1698 EXIT_SETUP_MENU,
1699 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1700 PREV_MENU,
1701 NEXT_MENU,
1702 PREVPAGE_MENU,
1703 NEXTPAGE_MENU,
1704 /* TRANSLATORS: add a printer to configuration */
1705 {"A", N_("Add Printer"), {MC_ADD,1,{'a'}}, KS_NONE},
1706 /* TRANSLATORS: delete a printer from configuration */
1707 {"D", N_("DeletePrint"), {MC_DELETE,1,{'d'}}, KS_NONE},
1708 {"C", N_("Change"), {MC_EDIT,1,{'c'}}, KS_NONE},
1709 WHEREIS_MENU,
1711 HELP_MENU,
1712 OTHER_MENU,
1713 NULL_MENU,
1714 NULL_MENU,
1715 NULL_MENU,
1716 NULL_MENU,
1717 NULL_MENU,
1718 NULL_MENU,
1719 NULL_MENU,
1720 NULL_MENU,
1721 HOMEKEY_MENU,
1722 ENDKEY_MENU};
1723 INST_KEY_MENU(printer_edit_keymenu, printer_edit_keys);
1726 struct key printer_select_keys[] =
1727 {HELP_MENU,
1728 PRYNTTXT_MENU,
1729 EXIT_SETUP_MENU,
1730 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
1731 PREV_MENU,
1732 NEXT_MENU,
1733 PREVPAGE_MENU,
1734 NEXTPAGE_MENU,
1735 HOMEKEY_MENU,
1736 ENDKEY_MENU,
1737 NULL_MENU,
1738 WHEREIS_MENU};
1739 INST_KEY_MENU(printer_select_keymenu, printer_select_keys);
1741 #endif /* !DOS */
1744 struct key role_select_keys[] =
1745 {HELP_MENU,
1746 NULL_MENU,
1747 {"E", N_("Exit"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1748 NULL_MENU,
1749 /* TRANSLATORS: go to previous Role in list */
1750 {"P", N_("PrevRole"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1751 {"N", N_("NextRole"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1752 PREVPAGE_MENU,
1753 NEXTPAGE_MENU,
1754 HOMEKEY_MENU,
1755 ENDKEY_MENU,
1756 {"D", "", {MC_TOGGLE, 1, {'d'}}, KS_NONE},
1757 WHEREIS_MENU};
1758 INST_KEY_MENU(role_select_km, role_select_keys);
1761 struct key role_config_keys[] =
1762 {HELP_MENU,
1763 OTHER_MENU,
1764 {"E", N_("Exit Setup"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
1765 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1766 /* TRANSLATORS: go to previous Rule in list */
1767 {"P", N_("PrevRule"), {MC_PREVITEM, 1, {'p'}}, KS_NONE},
1768 {"N", N_("NextRule"), {MC_NEXTITEM, 2, {'n', TAB}}, KS_NONE},
1769 PREVPAGE_MENU,
1770 NEXTPAGE_MENU,
1771 {"A", N_("Add"), {MC_ADD,1,{'a'}}, KS_NONE},
1772 {"D", N_("Delete"), {MC_DELETE,1,{'d'}}, KS_NONE},
1773 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1774 WHEREIS_MENU,
1776 HELP_MENU,
1777 OTHER_MENU,
1778 NULL_MENU,
1779 NULL_MENU,
1780 /* TRANSLATORS: Include a File from filesystem */
1781 {"I", N_("IncludeFile"), {MC_ADDFILE,1,{'i'}}, KS_NONE},
1782 {"X", N_("eXcludeFile"), {MC_DELFILE,1,{'x'}}, KS_NONE},
1783 NULL_MENU,
1784 NULL_MENU,
1785 {"R", N_("Replicate"), {MC_COPY,1,{'r'}}, KS_NONE},
1786 NULL_MENU,
1787 HOMEKEY_MENU,
1788 ENDKEY_MENU};
1789 INST_KEY_MENU(role_conf_km, role_config_keys);
1792 struct key config_text_wshuf_keys[] =
1793 {HELP_MENU,
1794 OTHER_MENU,
1795 EXIT_SETUP_MENU,
1796 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1797 PREV_MENU,
1798 NEXT_MENU,
1799 PREVPAGE_MENU,
1800 NEXTPAGE_MENU,
1801 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1802 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1803 PRYNTTXT_MENU,
1804 WHEREIS_MENU,
1806 HELP_MENU,
1807 OTHER_MENU,
1808 NULL_MENU,
1809 NULL_MENU,
1810 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1811 NULL_MENU,
1812 NULL_MENU,
1813 NULL_MENU,
1814 NULL_MENU,
1815 NULL_MENU,
1816 HOMEKEY_MENU,
1817 ENDKEY_MENU};
1818 INST_KEY_MENU(config_text_wshuf_keymenu, config_text_wshuf_keys);
1821 struct key config_text_wshufandfldr_keys[] =
1822 {HELP_MENU,
1823 OTHER_MENU,
1824 EXIT_SETUP_MENU,
1825 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1826 PREV_MENU,
1827 NEXT_MENU,
1828 PREVPAGE_MENU,
1829 NEXTPAGE_MENU,
1830 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1831 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1832 PRYNTTXT_MENU,
1833 WHEREIS_MENU,
1835 HELP_MENU,
1836 OTHER_MENU,
1837 NULL_MENU,
1838 NULL_MENU,
1839 {"$", N_("Shuffle"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
1840 {"T", N_("ToFldrs"), {MC_CHOICE,2,{'t', ctrl('T')}}, KS_NONE},
1841 NULL_MENU,
1842 NULL_MENU,
1843 NULL_MENU,
1844 NULL_MENU,
1845 HOMEKEY_MENU,
1846 ENDKEY_MENU};
1847 INST_KEY_MENU(config_text_wshufandfldr_keymenu, config_text_wshufandfldr_keys);
1850 struct key config_role_file_keys[] =
1851 {HELP_MENU,
1852 OTHER_MENU,
1853 EXIT_SETUP_MENU,
1854 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1855 PREV_MENU,
1856 NEXT_MENU,
1857 PREVPAGE_MENU,
1858 NEXTPAGE_MENU,
1859 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1860 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1861 PRYNTTXT_MENU,
1862 WHEREIS_MENU,
1864 HELP_MENU,
1865 OTHER_MENU,
1866 NULL_MENU,
1867 NULL_MENU,
1868 /* TRANSLATORS: go to list of Files */
1869 {"T", N_("ToFiles"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1870 /* TRANSLATORS: edit a file */
1871 {"F", N_("editFile"), {MC_EDITFILE, 1, {'f'}}, KS_NONE},
1872 NULL_MENU,
1873 NULL_MENU,
1874 NULL_MENU,
1875 NULL_MENU,
1876 HOMEKEY_MENU,
1877 ENDKEY_MENU};
1878 INST_KEY_MENU(config_role_file_keymenu, config_role_file_keys);
1881 struct key config_role_file_res_keys[] =
1882 {HELP_MENU,
1883 OTHER_MENU,
1884 EXIT_SETUP_MENU,
1885 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1886 PREV_MENU,
1887 NEXT_MENU,
1888 PREVPAGE_MENU,
1889 NEXTPAGE_MENU,
1890 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1891 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1892 PRYNTTXT_MENU,
1893 WHEREIS_MENU,
1895 HELP_MENU,
1896 OTHER_MENU,
1897 NULL_MENU,
1898 NULL_MENU,
1899 {"T", N_("ToFiles"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1900 NULL_MENU,
1901 NULL_MENU,
1902 NULL_MENU,
1903 NULL_MENU,
1904 NULL_MENU,
1905 HOMEKEY_MENU,
1906 ENDKEY_MENU};
1907 INST_KEY_MENU(config_role_file_res_keymenu, config_role_file_res_keys);
1910 struct key config_role_keyword_keys[] =
1911 {HELP_MENU,
1912 OTHER_MENU,
1913 EXIT_SETUP_MENU,
1914 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1915 PREV_MENU,
1916 NEXT_MENU,
1917 PREVPAGE_MENU,
1918 NEXTPAGE_MENU,
1919 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1920 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1921 PRYNTTXT_MENU,
1922 WHEREIS_MENU,
1924 HELP_MENU,
1925 OTHER_MENU,
1926 NULL_MENU,
1927 NULL_MENU,
1928 /* TRANSLATORS: go to list of keywords */
1929 {"T", N_("ToKeywords"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1930 NULL_MENU,
1931 NULL_MENU,
1932 NULL_MENU,
1933 NULL_MENU,
1934 NULL_MENU,
1935 HOMEKEY_MENU,
1936 ENDKEY_MENU};
1937 INST_KEY_MENU(config_role_keyword_keymenu, config_role_keyword_keys);
1940 struct key config_role_keyword_keys_not[] =
1941 {HELP_MENU,
1942 OTHER_MENU,
1943 EXIT_SETUP_MENU,
1944 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1945 PREV_MENU,
1946 NEXT_MENU,
1947 PREVPAGE_MENU,
1948 NEXTPAGE_MENU,
1949 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1950 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1951 PRYNTTXT_MENU,
1952 WHEREIS_MENU,
1954 HELP_MENU,
1955 OTHER_MENU,
1956 NULL_MENU,
1957 NULL_MENU,
1958 {"T", N_("ToKeywords"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1959 NULL_MENU,
1960 /* TRANSLATORS: toggle between NOT and not NOT, turn NOT on or off */
1961 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
1962 NULL_MENU,
1963 NULL_MENU,
1964 NULL_MENU,
1965 HOMEKEY_MENU,
1966 ENDKEY_MENU};
1967 INST_KEY_MENU(config_role_keyword_keymenu_not, config_role_keyword_keys_not);
1970 struct key config_role_charset_keys_not[] =
1971 {HELP_MENU,
1972 OTHER_MENU,
1973 EXIT_SETUP_MENU,
1974 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
1975 PREV_MENU,
1976 NEXT_MENU,
1977 PREVPAGE_MENU,
1978 NEXTPAGE_MENU,
1979 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
1980 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
1981 PRYNTTXT_MENU,
1982 WHEREIS_MENU,
1984 HELP_MENU,
1985 OTHER_MENU,
1986 NULL_MENU,
1987 NULL_MENU,
1988 /* TRANSLATORS: go to list of character sets */
1989 {"T", N_("ToCharSets"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
1990 NULL_MENU,
1991 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
1992 NULL_MENU,
1993 NULL_MENU,
1994 NULL_MENU,
1995 HOMEKEY_MENU,
1996 ENDKEY_MENU};
1997 INST_KEY_MENU(config_role_charset_keymenu_not, config_role_charset_keys_not);
2000 struct key config_role_keys[] =
2001 {HELP_MENU,
2002 OTHER_MENU,
2003 EXIT_SETUP_MENU,
2004 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2005 PREV_MENU,
2006 NEXT_MENU,
2007 PREVPAGE_MENU,
2008 NEXTPAGE_MENU,
2009 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2010 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2011 PRYNTTXT_MENU,
2012 WHEREIS_MENU,
2014 HELP_MENU,
2015 OTHER_MENU,
2016 NULL_MENU,
2017 NULL_MENU,
2018 NULL_MENU,
2019 NULL_MENU,
2020 NULL_MENU,
2021 NULL_MENU,
2022 NULL_MENU,
2023 NULL_MENU,
2024 HOMEKEY_MENU,
2025 ENDKEY_MENU};
2026 INST_KEY_MENU(config_role_keymenu, config_role_keys);
2029 struct key config_role_keys_not[] =
2030 {HELP_MENU,
2031 OTHER_MENU,
2032 EXIT_SETUP_MENU,
2033 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2034 PREV_MENU,
2035 NEXT_MENU,
2036 PREVPAGE_MENU,
2037 NEXTPAGE_MENU,
2038 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2039 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2040 PRYNTTXT_MENU,
2041 WHEREIS_MENU,
2043 HELP_MENU,
2044 OTHER_MENU,
2045 NULL_MENU,
2046 NULL_MENU,
2047 NULL_MENU,
2048 /* TRANSLATORS: add extra headers to list */
2049 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2050 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2051 NULL_MENU,
2052 NULL_MENU,
2053 NULL_MENU,
2054 HOMEKEY_MENU,
2055 ENDKEY_MENU};
2056 INST_KEY_MENU(config_role_keymenu_not, config_role_keys_not);
2059 struct key config_role_keys_extra[] =
2060 {HELP_MENU,
2061 NULL_MENU,
2062 EXIT_SETUP_MENU,
2063 {"X", "[" N_("eXtraHdr") "]", {MC_ADDHDR, 3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
2064 PREV_MENU,
2065 NEXT_MENU,
2066 PREVPAGE_MENU,
2067 NEXTPAGE_MENU,
2068 HOMEKEY_MENU,
2069 ENDKEY_MENU,
2070 PRYNTTXT_MENU,
2071 WHEREIS_MENU};
2072 INST_KEY_MENU(config_role_keymenu_extra, config_role_keys_extra);
2075 struct key config_role_addr_pat_keys[] =
2076 {HELP_MENU,
2077 OTHER_MENU,
2078 EXIT_SETUP_MENU,
2079 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2080 PREV_MENU,
2081 NEXT_MENU,
2082 PREVPAGE_MENU,
2083 NEXTPAGE_MENU,
2084 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2085 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2086 PRYNTTXT_MENU,
2087 WHEREIS_MENU,
2089 HELP_MENU,
2090 OTHER_MENU,
2091 NULL_MENU,
2092 NULL_MENU,
2093 /* TRANSLATORS: go to address book to get address */
2094 {"T", N_("ToAddrBk"), {MC_CHOICEB, 2, {'t', ctrl('T')}}, KS_NONE},
2095 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2096 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2097 NULL_MENU,
2098 NULL_MENU,
2099 NULL_MENU,
2100 HOMEKEY_MENU,
2101 ENDKEY_MENU};
2102 INST_KEY_MENU(config_role_addr_pat_keymenu, config_role_addr_pat_keys);
2105 struct key config_role_xtrahdr_keys[] =
2106 {HELP_MENU,
2107 OTHER_MENU,
2108 EXIT_SETUP_MENU,
2109 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2110 PREV_MENU,
2111 NEXT_MENU,
2112 PREVPAGE_MENU,
2113 NEXTPAGE_MENU,
2114 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2115 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2116 PRYNTTXT_MENU,
2117 WHEREIS_MENU,
2119 HELP_MENU,
2120 OTHER_MENU,
2121 NULL_MENU,
2122 NULL_MENU,
2123 NULL_MENU,
2124 {"X", N_("eXtraHdr"), {MC_ADDHDR, 1, {'x'}}, KS_NONE},
2125 {"!", N_("toggle NOT"), {MC_NOT,1,{'!'}}, KS_NONE},
2126 NULL_MENU,
2127 /* TRANSLATORS: remove a header we previously added */
2128 {"R", N_("RemoveHdr"), {MC_DELHDR, 1, {'r'}}, KS_NONE},
2129 NULL_MENU,
2130 HOMEKEY_MENU,
2131 ENDKEY_MENU};
2132 INST_KEY_MENU(config_role_xtrahdr_keymenu, config_role_xtrahdr_keys);
2135 struct key config_role_addr_act_keys[] =
2136 {HELP_MENU,
2137 OTHER_MENU,
2138 EXIT_SETUP_MENU,
2139 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2140 PREV_MENU,
2141 NEXT_MENU,
2142 PREVPAGE_MENU,
2143 NEXTPAGE_MENU,
2144 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2145 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2146 PRYNTTXT_MENU,
2147 WHEREIS_MENU,
2149 HELP_MENU,
2150 OTHER_MENU,
2151 NULL_MENU,
2152 NULL_MENU,
2153 {"T", N_("ToAddrBk"), {MC_CHOICEC, 2, {'t', ctrl('T')}}, KS_NONE},
2154 NULL_MENU,
2155 NULL_MENU,
2156 NULL_MENU,
2157 NULL_MENU,
2158 NULL_MENU,
2159 HOMEKEY_MENU,
2160 ENDKEY_MENU};
2161 INST_KEY_MENU(config_role_addr_act_keymenu, config_role_addr_act_keys);
2164 struct key config_role_patfolder_keys[] =
2165 {HELP_MENU,
2166 OTHER_MENU,
2167 EXIT_SETUP_MENU,
2168 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2169 PREV_MENU,
2170 NEXT_MENU,
2171 PREVPAGE_MENU,
2172 NEXTPAGE_MENU,
2173 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2174 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2175 PRYNTTXT_MENU,
2176 WHEREIS_MENU,
2178 HELP_MENU,
2179 OTHER_MENU,
2180 NULL_MENU,
2181 NULL_MENU,
2182 /* TRANSLATORS: go to list of folders */
2183 {"T", N_("ToFldrs"), {MC_CHOICED, 2, {'t', ctrl('T')}}, KS_NONE},
2184 NULL_MENU,
2185 NULL_MENU,
2186 NULL_MENU,
2187 NULL_MENU,
2188 NULL_MENU,
2189 HOMEKEY_MENU,
2190 ENDKEY_MENU};
2191 INST_KEY_MENU(config_role_patfolder_keymenu, config_role_patfolder_keys);
2194 struct key config_role_actionfolder_keys[] =
2195 {HELP_MENU,
2196 OTHER_MENU,
2197 EXIT_SETUP_MENU,
2198 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2199 PREV_MENU,
2200 NEXT_MENU,
2201 PREVPAGE_MENU,
2202 NEXTPAGE_MENU,
2203 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2204 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2205 PRYNTTXT_MENU,
2206 WHEREIS_MENU,
2208 HELP_MENU,
2209 OTHER_MENU,
2210 NULL_MENU,
2211 NULL_MENU,
2212 {"T", N_("ToFldrs"), {MC_CHOICEE, 2, {'t', ctrl('T')}}, KS_NONE},
2213 NULL_MENU,
2214 NULL_MENU,
2215 NULL_MENU,
2216 NULL_MENU,
2217 NULL_MENU,
2218 HOMEKEY_MENU,
2219 ENDKEY_MENU};
2220 INST_KEY_MENU(config_role_actionfolder_keymenu, config_role_actionfolder_keys);
2223 struct key config_role_inick_keys[] =
2224 {HELP_MENU,
2225 OTHER_MENU,
2226 EXIT_SETUP_MENU,
2227 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2228 PREV_MENU,
2229 NEXT_MENU,
2230 PREVPAGE_MENU,
2231 NEXTPAGE_MENU,
2232 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2233 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2234 PRYNTTXT_MENU,
2235 WHEREIS_MENU,
2237 HELP_MENU,
2238 OTHER_MENU,
2239 NULL_MENU,
2240 NULL_MENU,
2241 /* TRANSLATORS: go to list of nicknames */
2242 {"T", N_("ToNicks"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2243 NULL_MENU,
2244 NULL_MENU,
2245 NULL_MENU,
2246 NULL_MENU,
2247 NULL_MENU,
2248 HOMEKEY_MENU,
2249 ENDKEY_MENU};
2250 INST_KEY_MENU(config_role_inick_keymenu, config_role_inick_keys);
2253 struct key config_role_afrom_keys[] =
2254 {HELP_MENU,
2255 OTHER_MENU,
2256 EXIT_SETUP_MENU,
2257 {"C", "[" N_("Change Val") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2258 PREV_MENU,
2259 NEXT_MENU,
2260 PREVPAGE_MENU,
2261 NEXTPAGE_MENU,
2262 {"A", N_("Add Value"), {MC_ADD,1,{'a'}}, KS_NONE},
2263 {"D", N_("Delete Val"), {MC_DELETE,1,{'d'}}, KS_NONE},
2264 PRYNTTXT_MENU,
2265 WHEREIS_MENU,
2267 HELP_MENU,
2268 OTHER_MENU,
2269 NULL_MENU,
2270 NULL_MENU,
2271 /* TRANSLATORS: go to list of address books */
2272 {"T", N_("ToAbookList"), {MC_CHOICE, 2, {'t', ctrl('T')}}, KS_NONE},
2273 NULL_MENU,
2274 NULL_MENU,
2275 NULL_MENU,
2276 NULL_MENU,
2277 NULL_MENU,
2278 HOMEKEY_MENU,
2279 ENDKEY_MENU};
2280 INST_KEY_MENU(config_role_afrom_keymenu, config_role_afrom_keys);
2283 struct key config_checkbox_keys[] =
2284 {HELP_MENU,
2285 NULL_MENU,
2286 EXIT_SETUP_MENU,
2287 TOGGLE_MENU,
2288 PREV_MENU,
2289 NEXT_MENU,
2290 PREVPAGE_MENU,
2291 NEXTPAGE_MENU,
2292 HOMEKEY_MENU,
2293 ENDKEY_MENU,
2294 PRYNTTXT_MENU,
2295 WHEREIS_MENU};
2296 INST_KEY_MENU(config_checkbox_keymenu, config_checkbox_keys);
2299 struct key config_radiobutton_keys[] =
2300 {HELP_MENU,
2301 NULL_MENU,
2302 EXIT_SETUP_MENU,
2303 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2304 PREV_MENU,
2305 NEXT_MENU,
2306 PREVPAGE_MENU,
2307 NEXTPAGE_MENU,
2308 HOMEKEY_MENU,
2309 ENDKEY_MENU,
2310 PRYNTTXT_MENU,
2311 WHEREIS_MENU};
2312 INST_KEY_MENU(config_radiobutton_keymenu, config_radiobutton_keys);
2315 struct key config_yesno_keys[] =
2316 {HELP_MENU,
2317 NULL_MENU,
2318 EXIT_SETUP_MENU,
2319 {"C", "[" N_("Change") "]", {MC_TOGGLE,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2320 PREV_MENU,
2321 NEXT_MENU,
2322 PREVPAGE_MENU,
2323 NEXTPAGE_MENU,
2324 HOMEKEY_MENU,
2325 ENDKEY_MENU,
2326 PRYNTTXT_MENU,
2327 WHEREIS_MENU};
2328 INST_KEY_MENU(config_yesno_keymenu, config_yesno_keys);
2331 struct key color_changing_keys[] =
2332 {HELP_MENU,
2333 NULL_MENU,
2334 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2335 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2336 PREV_MENU,
2337 NEXT_MENU,
2338 PREVPAGE_MENU,
2339 NEXTPAGE_MENU,
2340 HOMEKEY_MENU,
2341 ENDKEY_MENU,
2342 PRYNTTXT_MENU,
2343 WHEREIS_MENU};
2344 INST_KEY_MENU(color_changing_keymenu, color_changing_keys);
2347 struct key custom_color_changing_keys[] =
2348 {HELP_MENU,
2349 NULL_MENU,
2350 /* TRANSLATORS: go to color configuration screen */
2351 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2352 {"*", "[" N_("Select") "]", {MC_CHOICEB,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2353 PREV_MENU,
2354 NEXT_MENU,
2355 PREVPAGE_MENU,
2356 NEXTPAGE_MENU,
2357 HOMEKEY_MENU,
2358 ENDKEY_MENU,
2359 PRYNTTXT_MENU,
2360 WHEREIS_MENU};
2361 INST_KEY_MENU(custom_color_changing_keymenu, custom_color_changing_keys);
2364 struct key kw_color_changing_keys[] =
2365 {HELP_MENU,
2366 NULL_MENU,
2367 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2368 {"*", "[" N_("Select") "]", {MC_CHOICEC,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2369 PREV_MENU,
2370 NEXT_MENU,
2371 PREVPAGE_MENU,
2372 NEXTPAGE_MENU,
2373 HOMEKEY_MENU,
2374 ENDKEY_MENU,
2375 PRYNTTXT_MENU,
2376 WHEREIS_MENU};
2377 INST_KEY_MENU(kw_color_changing_keymenu, kw_color_changing_keys);
2380 #ifdef _WINDOWS
2382 struct key color_rgb_changing_keys[] =
2383 {HELP_MENU,
2384 OTHER_MENU,
2385 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2386 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2387 PREV_MENU,
2388 NEXT_MENU,
2389 PREVPAGE_MENU,
2390 NEXTPAGE_MENU,
2391 {"C", N_("Customize"), {MC_RGB1,1,{'c'}},KS_NONE},
2392 NULL_MENU,
2393 PRYNTTXT_MENU,
2394 WHEREIS_MENU,
2396 HELP_MENU,
2397 OTHER_MENU,
2398 NULL_MENU,
2399 NULL_MENU,
2400 NULL_MENU,
2401 NULL_MENU,
2402 NULL_MENU,
2403 NULL_MENU,
2404 NULL_MENU,
2405 NULL_MENU,
2406 HOMEKEY_MENU,
2407 ENDKEY_MENU};
2408 INST_KEY_MENU(color_rgb_keymenu, color_rgb_changing_keys);
2411 struct key custom_rgb_changing_keys[] =
2412 {HELP_MENU,
2413 OTHER_MENU,
2414 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2415 {"*", "[" N_("Select") "]", {MC_CHOICEB,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2416 PREV_MENU,
2417 NEXT_MENU,
2418 PREVPAGE_MENU,
2419 NEXTPAGE_MENU,
2420 {"C", N_("Customize"), {MC_RGB2,1,{'c'}},KS_NONE},
2421 NULL_MENU,
2422 PRYNTTXT_MENU,
2423 WHEREIS_MENU,
2425 HELP_MENU,
2426 OTHER_MENU,
2427 NULL_MENU,
2428 NULL_MENU,
2429 NULL_MENU,
2430 NULL_MENU,
2431 NULL_MENU,
2432 NULL_MENU,
2433 NULL_MENU,
2434 NULL_MENU,
2435 HOMEKEY_MENU,
2436 ENDKEY_MENU};
2437 INST_KEY_MENU(custom_rgb_keymenu, custom_rgb_changing_keys);
2440 struct key kw_rgb_changing_keys[] =
2441 {HELP_MENU,
2442 OTHER_MENU,
2443 {"E", N_("To Colors"), {MC_EXIT,1,{'e'}}, KS_EXITMODE},
2444 {"*", "[" N_("Select") "]", {MC_CHOICEC,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2445 PREV_MENU,
2446 NEXT_MENU,
2447 PREVPAGE_MENU,
2448 NEXTPAGE_MENU,
2449 {"C", N_("Customize"), {MC_RGB3,1,{'c'}},KS_NONE},
2450 NULL_MENU,
2451 PRYNTTXT_MENU,
2452 WHEREIS_MENU,
2454 HELP_MENU,
2455 OTHER_MENU,
2456 NULL_MENU,
2457 NULL_MENU,
2458 NULL_MENU,
2459 NULL_MENU,
2460 NULL_MENU,
2461 NULL_MENU,
2462 NULL_MENU,
2463 NULL_MENU,
2464 HOMEKEY_MENU,
2465 ENDKEY_MENU};
2466 INST_KEY_MENU(kw_rgb_keymenu, kw_rgb_changing_keys);
2468 #endif
2471 struct key color_setting_keys[] =
2472 {HELP_MENU,
2473 OTHER_MENU,
2474 EXIT_SETUP_MENU,
2475 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2476 PREV_MENU,
2477 NEXT_MENU,
2478 PREVPAGE_MENU,
2479 NEXTPAGE_MENU,
2480 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2481 /* TRANSLATORS: restore defaults */
2482 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2483 PRYNTTXT_MENU,
2484 WHEREIS_MENU,
2486 HELP_MENU,
2487 OTHER_MENU,
2488 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2489 NULL_MENU,
2490 NULL_MENU,
2491 NULL_MENU,
2492 NULL_MENU,
2493 NULL_MENU,
2494 NULL_MENU,
2495 NULL_MENU,
2496 HOMEKEY_MENU,
2497 ENDKEY_MENU};
2498 INST_KEY_MENU(color_setting_keymenu, color_setting_keys);
2501 struct key custom_color_setting_keys[] =
2502 {HELP_MENU,
2503 OTHER_MENU,
2504 EXIT_SETUP_MENU,
2505 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2506 PREV_MENU,
2507 NEXT_MENU,
2508 PREVPAGE_MENU,
2509 NEXTPAGE_MENU,
2510 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2511 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2512 PRYNTTXT_MENU,
2513 WHEREIS_MENU,
2515 HELP_MENU,
2516 OTHER_MENU,
2517 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2518 NULL_MENU,
2519 {"D", N_("DeleteHdr"), {MC_DELETE,1,{'d'}}, KS_NONE},
2520 /* TRANSLATORS: shuffle headers (change the order of headers) */
2521 {"$", N_("ShuffleHdr"), {MC_SHUFFLE,1,{'$'}}, KS_NONE},
2522 NULL_MENU,
2523 NULL_MENU,
2524 NULL_MENU,
2525 NULL_MENU,
2526 HOMEKEY_MENU,
2527 ENDKEY_MENU};
2528 INST_KEY_MENU(custom_color_setting_keymenu, custom_color_setting_keys);
2531 struct key role_color_setting_keys[] =
2532 {HELP_MENU,
2533 NULL_MENU,
2534 EXIT_SETUP_MENU,
2535 {"*", "[" N_("Select") "]", {MC_CHOICE,3,{'*',ctrl('M'),ctrl('J')}}, KS_NONE},
2536 PREV_MENU,
2537 NEXT_MENU,
2538 PREVPAGE_MENU,
2539 NEXTPAGE_MENU,
2540 HOMEKEY_MENU,
2541 ENDKEY_MENU,
2542 PRYNTTXT_MENU,
2543 WHEREIS_MENU};
2544 INST_KEY_MENU(role_color_setting_keymenu, role_color_setting_keys);
2547 struct key kw_color_setting_keys[] =
2548 {HELP_MENU,
2549 OTHER_MENU,
2550 EXIT_SETUP_MENU,
2551 {"C", "[" N_("Change") "]", {MC_EDIT,3,{'c',ctrl('M'),ctrl('J')}}, KS_NONE},
2552 PREV_MENU,
2553 NEXT_MENU,
2554 PREVPAGE_MENU,
2555 NEXTPAGE_MENU,
2556 {"A", N_("AddHeader"), {MC_ADD,1,{'a'}}, KS_NONE},
2557 {"R", N_("RestoreDefs"), {MC_DEFAULT,1,{'r'}}, KS_NONE},
2558 PRYNTTXT_MENU,
2559 WHEREIS_MENU,
2561 HELP_MENU,
2562 OTHER_MENU,
2563 {"I", N_("IndxHdr"), {MC_ADDHEADER,1,{'i'}}, KS_NONE},
2564 NULL_MENU,
2565 NULL_MENU,
2566 NULL_MENU,
2567 NULL_MENU,
2568 NULL_MENU,
2569 NULL_MENU,
2570 NULL_MENU,
2571 HOMEKEY_MENU,
2572 ENDKEY_MENU};
2573 INST_KEY_MENU(kw_color_setting_keymenu, kw_color_setting_keys);
2576 struct key take_export_keys_sm[] =
2577 {HELP_MENU,
2578 WHEREIS_MENU,
2579 /* TRANSLATORS: exit the Take Address screen */
2580 {"<",N_("ExitTake"), {MC_EXIT,4,{'e',ctrl('C'),'<',','}}, KS_EXITMODE},
2581 {"T","[" N_("Take") "]",{MC_TAKE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
2582 PREV_MENU,
2583 NEXT_MENU,
2584 PREVPAGE_MENU,
2585 NEXTPAGE_MENU,
2586 NULL_MENU,
2587 NULL_MENU,
2588 NULL_MENU,
2589 {"L",N_("ListMode"),{MC_LISTMODE,1,{'l'}},KS_NONE}};
2590 INST_KEY_MENU(take_export_keymenu_sm, take_export_keys_sm);
2593 struct key take_export_keys_lm[] =
2594 {HELP_MENU,
2595 WHEREIS_MENU,
2596 {"<",N_("ExitTake"), {MC_EXIT,4,{'e',ctrl('C'),'<',','}}, KS_EXITMODE},
2597 {"T",N_("Take"), {MC_TAKE,1,{'t'}}, KS_NONE},
2598 PREV_MENU,
2599 NEXT_MENU,
2600 PREVPAGE_MENU,
2601 NEXTPAGE_MENU,
2602 {"X","[" N_("Set/Unset") "]", {MC_CHOICE,3,{'x',ctrl('M'),ctrl('J')}}, KS_NONE},
2603 {"A", N_("SetAll"),{MC_SELALL,1,{'a'}},KS_NONE},
2604 {"U",N_("UnSetAll"),{MC_UNSELALL,1,{'u'}},KS_NONE},
2605 {"S",N_("SinglMode"),{MC_LISTMODE,1,{'s'}},KS_NONE}};
2606 INST_KEY_MENU(take_export_keymenu_lm, take_export_keys_lm);
2609 struct key smime_info_keys[] =
2610 {HELP_MENU,
2611 OTHER_MENU,
2612 {"<","Back",{MC_VIEW_TEXT,2,{'<',','}},KS_EXITMODE},
2613 NULL_MENU,
2614 NULL_MENU,
2615 NULL_MENU,
2616 PREVPAGE_MENU,
2617 NEXTPAGE_MENU,
2618 NULL_MENU,
2619 NULL_MENU,
2620 NULL_MENU,
2621 NULL_MENU,
2623 HELP_MENU,
2624 OTHER_MENU,
2625 MAIN_MENU,
2626 QUIT_MENU,
2627 NULL_MENU,
2628 NULL_MENU,
2629 NULL_MENU,
2630 NULL_MENU,
2631 NULL_MENU,
2632 INDEX_MENU,
2633 NULL_MENU,
2634 NULL_MENU};
2635 INST_KEY_MENU(smime_info_keymenu, smime_info_keys);
2638 struct key config_smime_helper_keys[] =
2639 {HELP_MENU,
2640 WHEREIS_MENU,
2641 EXIT_SETUP_MENU,
2642 {"T","[" N_("Transfer") "]", {MC_CHOICE,3,{'t',ctrl('M'),ctrl('J')}}, KS_NONE},
2643 PREV_MENU,
2644 NEXT_MENU,
2645 PREVPAGE_MENU,
2646 NEXTPAGE_MENU,
2647 NULL_MENU,
2648 NULL_MENU,
2649 HOMEKEY_MENU,
2650 ENDKEY_MENU};
2651 INST_KEY_MENU(config_smime_helper_keymenu, config_smime_helper_keys);
2653 struct key config_smime_manage_certs_menu_keys[] =
2654 {HELP_MENU,
2655 WHEREIS_MENU,
2656 EXIT_SETUP_MENU,
2657 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
2658 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2659 NULL_MENU,
2660 PREV_MENU,
2661 NEXT_MENU,
2662 PREVPAGE_MENU,
2663 NEXTPAGE_MENU,
2664 HOMEKEY_MENU,
2665 ENDKEY_MENU};
2666 INST_KEY_MENU(config_smime_manage_certs_menu_keymenu, config_smime_manage_certs_menu_keys);
2668 struct key config_smime_add_certs_keys[] =
2669 {HELP_MENU,
2670 NULL_MENU,
2671 EXIT_SETUP_MENU,
2672 {"I", N_("Import Cert"), {MC_IMPORT,3,{'i', ctrl('M'), ctrl('J')}}, KS_NONE},
2673 NULL_MENU,
2674 NULL_MENU,
2675 NULL_MENU,
2676 NULL_MENU,
2677 NULL_MENU,
2678 NULL_MENU,
2679 NULL_MENU,
2680 NULL_MENU};
2681 INST_KEY_MENU(config_smime_add_certs_keymenu, config_smime_add_certs_keys);
2683 struct key config_smime_add_new_key[] =
2684 {HELP_MENU,
2685 NULL_MENU,
2686 EXIT_SETUP_MENU,
2687 {"I", N_("Import Key"), {MC_IMPORT,3,{'i', ctrl('M'), ctrl('J')}}, KS_NONE},
2688 {"C", N_("Create Key"), {MC_ADD,1,{'c'}}, KS_NONE},
2689 NULL_MENU,
2690 NULL_MENU,
2691 NULL_MENU,
2692 NULL_MENU,
2693 NULL_MENU,
2694 NULL_MENU,
2695 NULL_MENU};
2696 INST_KEY_MENU(config_smime_add_new_key_keymenu, config_smime_add_new_key);
2698 struct key config_smime_manage_certs_work_keys[] =
2699 {HELP_MENU,
2700 OTHER_MENU,
2701 EXIT_SETUP_MENU,
2702 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2703 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2704 NULL_MENU,
2705 {"D", N_("Delete"), {MC_DELETE,1,{'d'}}, KS_NONE},
2706 {"U", N_("Undelete"), {MC_UNDELETE,1,{'u'}}, KS_NONE},
2707 {"X", N_("Expunge"), {MC_EXPUNGE,1,{'x'}}, KS_NONE},
2708 NULL_MENU,
2709 NULL_MENU,
2710 WHEREIS_MENU,
2712 PREV_MENU,
2713 NEXT_MENU,
2714 PREVPAGE_MENU,
2715 NEXTPAGE_MENU,
2716 NULL_MENU,
2717 NULL_MENU,
2718 NULL_MENU,
2719 NULL_MENU,
2720 NULL_MENU,
2721 NULL_MENU,
2722 HOMEKEY_MENU,
2723 ENDKEY_MENU};
2724 INST_KEY_MENU(config_smime_manage_certs_work_keymenu, config_smime_manage_certs_work_keys);
2726 struct key config_smime_view_cert[] =
2727 {HELP_MENU,
2728 NULL_MENU,
2729 EXIT_SETUP_MENU,
2730 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2731 {"D", N_("Delete pwd"), {MC_DELETE,1,{'d'}},KS_NONE},
2732 NULL_MENU,
2733 NULL_MENU,
2734 NULL_MENU,
2735 NULL_MENU,
2736 NULL_MENU,
2737 NULL_MENU,
2738 NULL_MENU};
2739 INST_KEY_MENU(config_smime_manage_view_cert_keymenu, config_smime_view_cert);
2741 struct key config_smime_view_cert_no_delete[] =
2742 {HELP_MENU,
2743 NULL_MENU,
2744 EXIT_SETUP_MENU,
2745 {"V", "[" N_("View Info") "]", {MC_CHOICE,3,{'v',ctrl('M'),ctrl('J')}}, KS_NONE},
2746 NULL_MENU,
2747 NULL_MENU,
2748 NULL_MENU,
2749 NULL_MENU,
2750 NULL_MENU,
2751 NULL_MENU,
2752 NULL_MENU,
2753 NULL_MENU};
2754 INST_KEY_MENU(config_smime_manage_view_cert_keymenu_no_delete, config_smime_view_cert_no_delete);
2756 struct key smime_certificate_info_keys[] =
2757 {HELP_MENU,
2758 OTHER_MENU,
2759 {"E",N_("Exit Viewer"),{MC_EXIT,1,{'e'}},KS_EXITMODE},
2760 {"T",N_("Trust Cert"), {MC_TRUST,1,{'t'}},KS_NONE},
2761 {"D",N_("Delete"), {MC_DELETE,1,{'d'}},KS_NONE},
2762 {"U",N_("Undelete"), {MC_UNDELETE,1,{'u'}},KS_NONE},
2763 {"B",N_("Public Key"), {MC_PUBLIC,1,{'b'}},KS_NONE},
2764 {"R",N_("Private Key"),{MC_PRIVATE,1,{'r'}},KS_NONE},
2765 NULL_MENU,
2766 NULL_MENU,
2767 NULL_MENU,
2768 NULL_MENU,
2770 HELP_MENU,
2771 OTHER_MENU,
2772 PREVPAGE_MENU,
2773 NEXTPAGE_MENU,
2774 PRYNTTXT_MENU,
2775 WHEREIS_MENU,
2776 NULL_MENU,
2777 NULL_MENU,
2778 NULL_MENU,
2779 NULL_MENU,
2780 HOMEKEY_MENU,
2781 ENDKEY_MENU};
2782 INST_KEY_MENU(smime_certificate_info_keymenu, smime_certificate_info_keys);
2785 struct key config_smime_manage_password_file_menu_keys[] =
2786 {HELP_MENU,
2787 WHEREIS_MENU,
2788 EXIT_SETUP_MENU,
2789 {"S", "[" N_("Select") "]", {MC_CHOICE,3,{'s',ctrl('M'),ctrl('J')}}, KS_NONE},
2790 {"I", N_("Import Cert"), {MC_IMPORT,1,{'i'}}, KS_NONE},
2791 NULL_MENU,
2792 PREV_MENU,
2793 NEXT_MENU,
2794 PREVPAGE_MENU,
2795 NEXTPAGE_MENU,
2796 HOMEKEY_MENU,
2797 ENDKEY_MENU};
2798 INST_KEY_MENU(config_smime_manage_password_file_menu_keymenu, config_smime_manage_password_file_menu_keys);
2803 * Internal prototypes
2805 void output_keymenu(struct key_menu *, bitmap_t, int, int);
2806 void format_keymenu(struct key_menu *, bitmap_t, int);
2807 void menu_clear_cmd_binding(struct key_menu *, int);
2808 #ifdef MOUSE
2809 void print_inverted_label(int, MENUITEM *);
2810 #endif
2813 /* Saved key menu drawing state */
2814 static struct {
2815 struct key_menu *km;
2816 int row,
2817 column,
2818 blanked;
2819 bitmap_t bitmap;
2820 } km_state;
2824 * Longest label that can be displayed in keymenu
2826 #define MAX_LABEL 40
2827 #define MAX_KEYNAME 3
2828 static struct key last_time_buf[12];
2829 static int keymenu_is_dirty = 1;
2831 void
2832 mark_keymenu_dirty(void)
2834 keymenu_is_dirty = 1;
2839 * Write an already formatted key_menu to the screen
2841 * Args: km -- key_menu structure
2842 * bm -- bitmap, 0's mean don't draw this key
2843 * row -- the row on the screen to begin on, negative values
2844 * are counted from the bottom of the screen up
2845 * column -- column on the screen to begin on
2847 * The bits in the bitmap are used from least significant to most significant,
2848 * not left to right. So, if you write out the bitmap in the normal way, for
2849 * example,
2850 * bm[0] = 0x5, bm[1] = 0x8, bm[2] = 0x21, bm[3] = bm[4] = bm[5] = 0
2851 * 0000 0101 0000 1000 0010 0001 ...
2852 * means that menu item 0 (first row, first column) is set, item 1 (2nd row,
2853 * first column) is not set, item 2 is set, items 3-10 are not set, item 11
2854 * (2nd row, 6th and last column) is set. In the second menu (the second set
2855 * of 12 bits) items 0-3 are unset, 4 is set, 5-8 unset, 9 set, 10-11 unset.
2856 * That uses up bm[0] - bm[2].
2857 * Just to make sure, here it is drawn out for the first set of 12 items in
2858 * the first keymenu (0-11)
2859 * bm[0] x x x x x x x x bm[1] x x x x x x x x
2860 * 7 6 5 4 3 2 1 0 1110 9 8
2862 void
2863 output_keymenu(struct key_menu *km, unsigned char *bm, int row, int column)
2865 #ifdef __CYGWIN__
2866 extern char term_name[];
2867 #endif
2868 register struct key *k;
2869 struct key *last_time;
2870 int i, j,
2871 ufk, /* using function keys */
2872 real_row,
2873 max_column, /* number of columns on screen */
2874 off; /* offset into keymap */
2875 struct variable *vars = ps_global->vars;
2876 COLOR_PAIR *lastc=NULL, *label_color=NULL, *name_color=NULL;
2877 #ifdef MOUSE
2878 /* 6's are for UTF-8 */
2879 char keystr[6*MAX_KEYNAME + 6*MAX_LABEL + 2];
2880 #endif
2882 off = km->which * 12;
2883 max_column = ps_global->ttyo->screen_cols;
2885 if((ps_global->ttyo->screen_rows - FOOTER_ROWS(ps_global)) < 0
2886 || max_column <= 0){
2887 keymenu_is_dirty = 1;
2888 return;
2892 real_row = row > 0 ? row : ps_global->ttyo->screen_rows + row;
2894 if(pico_usingcolor()){
2895 lastc = pico_get_cur_color();
2896 if(lastc && VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR &&
2897 pico_is_good_color(VAR_KEYLABEL_FORE_COLOR) &&
2898 pico_is_good_color(VAR_KEYLABEL_BACK_COLOR)){
2899 label_color = new_color_pair(VAR_KEYLABEL_FORE_COLOR,
2900 VAR_KEYLABEL_BACK_COLOR);
2901 if(label_color)
2902 (void)pico_set_colorp(label_color, PSC_NONE);
2905 if(label_color && VAR_KEYNAME_FORE_COLOR && VAR_KEYNAME_BACK_COLOR &&
2906 pico_is_good_color(VAR_KEYNAME_FORE_COLOR) &&
2907 pico_is_good_color(VAR_KEYNAME_BACK_COLOR)){
2908 name_color = new_color_pair(VAR_KEYNAME_FORE_COLOR,
2909 VAR_KEYNAME_BACK_COLOR);
2913 if(keymenu_is_dirty){
2914 ClearLines(real_row, real_row+1);
2915 keymenu_is_dirty = 0;
2916 /* first time through, set up storage */
2917 if(!last_time_buf[0].name){
2918 for(i = 0; i < 12; i++){
2919 last_time = &last_time_buf[i];
2920 last_time->name = (char *) fs_get(6*MAX_KEYNAME + 1);
2921 last_time->label = (char *) fs_get(6*MAX_LABEL + 1);
2925 for(i = 0; i < 12; i++)
2926 last_time_buf[i].column = -1;
2929 for(i = 0; i < 12; i++){
2930 int e;
2932 e = off + i;
2933 dprint((9, "%2d %-7.7s %-10.10s %d\n", i,
2934 km == NULL ? "(no km)"
2935 : km->keys[e].name == NULL ? "(null)"
2936 : km->keys[e].name,
2937 km == NULL ? "(no km)"
2938 : km->keys[e].label == NULL ? "(null)"
2939 : km->keys[e].label, km ? km->keys[e].column : 0));
2940 #ifdef MOUSE
2941 register_key(i, NO_OP_COMMAND, "", NULL, 0, 0, 0, NULL, NULL);
2942 #endif
2945 ufk = F_ON(F_USE_FK, ps_global);
2946 dprint((9, "row: %d, real_row: %d, column: %d\n", row,
2947 real_row, column));
2949 for(i = 0; i < 2; i++){
2950 int c, el, empty, fkey, last_in_row, fix_start;
2951 short next_col;
2952 char temp[6*MAX_SCREEN_COLS+1];
2953 char temp2[6*MAX_SCREEN_COLS+1];
2954 char this_label[6*MAX_LABEL+1];
2956 j = 6*i - 1;
2957 #ifndef __CYGWIN__
2958 if(i == 1 && !label_color)
2959 #else
2960 if(i == 1 && (!label_color || !struncmp(term_name,"cygwin", 6)))
2961 #endif
2962 max_column--; /* Some terminals scroll if you write in the
2963 lower right hand corner. If user has a
2964 label_color set we'll take our chances.
2965 Otherwise, we'd get one cell of Normal. */
2968 * k is the key struct we're working on
2969 * c is the column number
2970 * el is an index into the whole keys array
2971 * Last_time_buf is ordered strangely. It goes row by row instead
2972 * of down each column like km does. J is an index into it.
2974 for(c = 0, el = off+i, k = &km->keys[el];
2975 k < &km->keys[off+12] && c < max_column;
2976 k += 2, el += 2){
2978 if(k->column > max_column)
2979 break;
2981 j++;
2982 if(ufk)
2983 fkey = 1 + k - &km->keys[off];
2985 empty = (!bitnset(el,bm) || !(k->name && *k->name));
2986 last_time = &last_time_buf[j];
2987 if(k+2 < &km->keys[off+12]){
2988 last_in_row = 0;
2989 next_col = last_time_buf[j+1].column;
2990 fix_start = (k == &km->keys[off] ||
2991 k == &km->keys[off+1]) ? k->column : 0;
2993 else{
2994 last_in_row = 1;
2995 fix_start = 0;
2999 * Make sure there is a space between this label and
3000 * the next name. That is, we prefer a space to the
3001 * extra character of the label because the space
3002 * separates the commands and looks nicer.
3004 if(k->label){
3005 size_t l;
3006 char tmp_label[6*MAX_LABEL+1];
3008 if(k->label[0] == '[' && k->label[(l=strlen(k->label))-1] == ']' && l > 2){
3010 * Can't write in k->label, which might be a constant array.
3012 strncpy(tmp_label, &k->label[1], MIN(sizeof(tmp_label),l-2));
3013 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3015 snprintf(this_label, sizeof(this_label), "[%s]", _(tmp_label));
3017 else
3018 strncpy(this_label, _(k->label), sizeof(this_label));
3020 this_label[sizeof(this_label)-1] = '\0';
3021 if(!last_in_row){
3022 int trunc;
3024 trunc = (k+2)->column - k->column
3025 - ((k->name ? utf8_width(k->name) : 0) + 1);
3027 * trunc columns available for label but we don't want the label
3028 * to go all the way to the edge
3030 if(utf8_width(this_label) >= trunc){
3031 if(trunc > 1){
3032 strncpy(tmp_label, this_label, sizeof(tmp_label));
3033 tmp_label[sizeof(tmp_label)-1] = '\0';
3034 l = utf8_pad_to_width(this_label, tmp_label, sizeof(this_label)-2, trunc-1, 1);
3035 this_label[l++] = SPACE;
3036 this_label[l] = '\0';;
3038 else if(trunc == 1)
3039 this_label[0] = SPACE;
3040 else
3041 this_label[0] = '\0';
3043 this_label[sizeof(this_label)-1] = '\0';
3047 else
3048 this_label[0] = '\0';
3050 if(!(k->column == last_time->column
3051 && (last_in_row || (k+2)->column <= next_col)
3052 && ((empty && !*last_time->label && !*last_time->name)
3053 || (!empty
3054 && this_label && !strcmp(this_label,last_time->label)
3055 && ((k->name && !strcmp(k->name,last_time->name))
3056 || ufk))))){
3057 if(empty){
3058 /* blank out key with spaces */
3059 strncpy(temp, repeat_char(
3060 ((last_in_row || (k+2)->column > max_column)
3061 ? max_column
3062 : (k+2)->column) -
3063 (fix_start
3065 : k->column),
3066 SPACE), sizeof(temp));
3067 temp[sizeof(temp)-1] = '\0';
3068 last_time->column = k->column;
3069 *last_time->name = '\0';
3070 *last_time->label = '\0';
3071 MoveCursor(real_row + i, column + (fix_start ? 0 : k->column));
3072 Write_to_screen(temp);
3073 c = (fix_start ? 0 : k->column) + strlen(temp);
3075 else{
3076 /* make sure extra space before key name is there */
3077 if(fix_start){
3078 strncpy(temp, repeat_char(k->column, SPACE), sizeof(temp));
3079 temp[sizeof(temp)-1] = '\0';
3080 MoveCursor(real_row + i, column + 0);
3081 Write_to_screen(temp);
3084 /* short name of the key */
3085 if(ufk)
3086 snprintf(temp, sizeof(temp), "F%d", fkey);
3087 else
3088 strncpy(temp, k->name, sizeof(temp));
3090 temp[sizeof(temp)-1] = '\0';
3091 last_time->column = k->column;
3092 strncpy(last_time->name, temp, 6*MAX_KEYNAME);
3093 last_time->name[6*MAX_KEYNAME] = '\0';
3094 /* make sure name not too long */
3095 #ifdef MOUSE
3096 strncpy(keystr, temp, sizeof(keystr));
3097 keystr[sizeof(keystr)-1] = '\0';
3098 #endif
3099 MoveCursor(real_row + i, column + k->column);
3100 if(!empty){
3101 if(name_color)
3102 (void)pico_set_colorp(name_color, PSC_NONE);
3103 else
3104 StartInverse();
3107 Write_to_screen(temp);
3108 c = k->column + utf8_width(temp);
3109 if(!empty){
3110 if(!name_color)
3111 EndInverse();
3114 /* now the space after the name and the label */
3115 temp[0] = '\0';
3116 if(c < max_column){
3117 temp[0] = SPACE;
3118 temp[1] = '\0';
3119 strncat(temp, this_label, sizeof(temp)-strlen(temp)-1);
3121 /* Don't run over the right hand edge */
3122 if(utf8_width(temp) > max_column - c){
3123 size_t l;
3125 l = utf8_pad_to_width(temp2, temp, sizeof(temp2)-1, max_column-c, 1);
3126 temp2[l] = '\0';
3127 strncpy(temp, temp2, sizeof(temp));
3128 temp[sizeof(temp)-1] = '\0';
3131 c += utf8_width(temp);
3134 #ifdef MOUSE
3135 strncat(keystr, temp, sizeof(keystr)-strlen(keystr)-1);
3136 keystr[sizeof(keystr)-1] = '\0';
3137 #endif
3138 /* fill out rest of this key with spaces */
3139 if(c < max_column){
3140 if(last_in_row){
3141 strncat(temp, repeat_char(max_column - c, SPACE), sizeof(temp)-strlen(temp)-1);
3142 c = max_column;
3144 else{
3145 if(c < (k+2)->column){
3146 strncat(temp,
3147 repeat_char((k+2)->column - c, SPACE), sizeof(temp)-strlen(temp)-1);
3148 c = (k+2)->column;
3152 temp[sizeof(temp)-1] = '\0';
3155 strncpy(last_time->label, this_label, 6*MAX_LABEL);
3156 last_time->label[6*MAX_LABEL] = '\0';
3157 if(label_color)
3158 (void)pico_set_colorp(label_color, PSC_NONE);
3160 Write_to_screen(temp);
3163 #ifdef MOUSE
3164 else if(!empty)
3165 /* fill in what register_key needs from cached data */
3166 snprintf(keystr, sizeof(keystr), "%s %s", last_time->name, last_time->label);
3168 if(!empty){
3169 int len;
3172 * If label ends in space,
3173 * don't register the space part of label.
3175 len = strlen(keystr);
3176 while(keystr[len-1] == SPACE)
3177 len--;
3178 len--;
3180 register_key(j, ufk ? PF1 + fkey - 1
3181 : (k->name[0] == '^')
3182 ? ctrl(k->name[1])
3183 : (!strucmp(k->name, "ret"))
3184 ? ctrl('M')
3185 : (!strucmp(k->name, "tab"))
3186 ? '\t'
3187 : (!strucmp(k->name, "spc"))
3188 ? SPACE
3189 : (!strucmp(k->name, HISTORY_UP_KEYNAME))
3190 ? KEY_UP
3191 : (!strucmp(k->name, HISTORY_DOWN_KEYNAME))
3192 ? KEY_DOWN
3193 : (k->bind.nch)
3194 ? ((isascii((int) k->bind.ch[0]) && islower((int) k->bind.ch[0]))
3195 ? toupper((unsigned char) k->bind.ch[0])
3196 : k->bind.ch[0])
3197 : k->name[0],
3198 keystr, print_inverted_label,
3199 real_row+i, k->column, len,
3200 name_color, label_color);
3202 #endif
3206 while(++j < 6*(i+1))
3207 last_time_buf[j].column = -1;
3210 fflush(stdout);
3211 if(lastc){
3212 (void)pico_set_colorp(lastc, PSC_NONE);
3213 free_color_pair(&lastc);
3214 if(label_color)
3215 free_color_pair(&label_color);
3216 if(name_color)
3217 free_color_pair(&name_color);
3223 * Clear the key menu lines.
3225 void
3226 blank_keymenu(int row, int column)
3228 struct variable *vars = ps_global->vars;
3229 COLOR_PAIR *lastc;
3231 if(FOOTER_ROWS(ps_global) > 1){
3232 km_state.blanked = 1;
3233 km_state.row = row;
3234 km_state.column = column;
3235 MoveCursor(row, column);
3236 lastc = pico_set_colors(VAR_KEYLABEL_FORE_COLOR,
3237 VAR_KEYLABEL_BACK_COLOR, PSC_NORM|PSC_RET);
3239 CleartoEOLN();
3240 MoveCursor(row+1, column);
3241 CleartoEOLN();
3242 fflush(stdout);
3243 if(lastc){
3244 (void)pico_set_colorp(lastc, PSC_NONE);
3245 free_color_pair(&lastc);
3251 void
3252 draw_cancel_keymenu(void)
3254 bitmap_t bitmap;
3256 setbitmap(bitmap);
3257 draw_keymenu(&cancel_keymenu, bitmap, ps_global->ttyo->screen_cols,
3258 1-FOOTER_ROWS(ps_global), 0, FirstMenu);
3262 void
3263 clearfooter(struct pine *ps)
3265 ClearLines(ps->ttyo->screen_rows - 3, ps->ttyo->screen_rows - 1);
3266 mark_keymenu_dirty();
3267 mark_status_unknown();
3272 * Calculate formatting for key menu at bottom of screen
3274 * Args: km -- The key_menu structure to format
3275 * bm -- Bitmap indicating which menu items should be displayed. If
3276 * an item is NULL, that also means it shouldn't be displayed.
3277 * Sometimes the bitmap will be turned on in that case and just
3278 * rely on the NULL entry.
3279 * width -- the screen width to format it at
3281 * If already formatted for this particular screen width and the requested
3282 * bitmap and formatted bitmap agree, return.
3284 * The formatting results in the column field in the key_menu being
3285 * filled in. The column field is the column to start the label at, the
3286 * name of the key; after that is the label for the key. The basic idea
3287 * is to line up the end of the names and beginning of the labels. If
3288 * the name is too long and shifting it left would run into previous
3289 * label, then shift the whole menu right, or at least that entry if
3290 * things following are short enough to fit back into the regular
3291 * spacing. This has to be calculated and not fixed so it can cope with
3292 * screen resize.
3294 void
3295 format_keymenu(struct key_menu *km, unsigned char *bm, int width)
3297 int spacing[7], w[6], min_w[6], tw[6], extra[6], ufk, i, set;
3299 /* already formatted? */
3300 if(!km || (width == km->width &&
3301 km->how_many <= km->formatted_hm &&
3302 !memcmp(km->bitmap, bm, BM_SIZE)))
3303 return;
3306 * If we're in the initial command sequence we may be using function
3307 * keys instead of alphas, or vice versa, so we want to recalculate
3308 * the formatting next time through.
3310 if((F_ON(F_USE_FK,ps_global) && ps_global->orig_use_fkeys) ||
3311 (F_OFF(F_USE_FK,ps_global) && !ps_global->orig_use_fkeys)){
3312 km->width = width;
3313 km->formatted_hm = km->how_many;
3314 memcpy(km->bitmap, bm, BM_SIZE);
3317 ufk = F_ON(F_USE_FK,ps_global); /* ufk = "Using Function Keys" */
3319 /* set up "ideal" columns to start in, plus fake 7th column start */
3320 for(i = 0; i < 7; i++)
3321 spacing[i] = (i * width) / 6;
3323 /* Loop thru each set of 12 menus */
3324 for(set = 0; set < km->how_many; set++){
3325 int k_top, k_bot, top_name_width, bot_name_width,
3326 top_label_width, bot_label_width, done, offset, next_one;
3327 struct key *keytop, *keybot;
3329 offset = set * 12; /* offset into keymenu */
3332 * Find the required widths for each box.
3334 for(i = 0; i < 6; i++){
3335 k_top = offset + i*2;
3336 k_bot = k_top + 1;
3337 keytop = &km->keys[k_top];
3338 keybot = &km->keys[k_bot];
3341 * The width of a box is the max width of top or bottom name,
3342 * plus 1 space, plus the max width of top or bottom label.
3344 * ? HelpInfo
3345 * ^C Cancel
3346 * ||||||||||| = 2 + 1 + 8 = 11
3348 * Then we adjust that by adding one space after the box to
3349 * separate it from the next box. The last box doesn't need that
3350 * but we may need an extra space for last box to avoid putting
3351 * a character in the lower right hand cell of display.
3352 * We also have a minimum label width (if screen is really narrow)
3353 * of 3, so at least "Hel" and "Can" shows and the rest gets
3354 * truncated off right hand side.
3357 top_name_width = (keytop->name && bitnset(k_top,bm))
3358 ? (ufk ? (i >= 5 ? 3 : 2)
3359 : utf8_width(keytop->name)) : 0;
3360 bot_name_width = (keybot->name && bitnset(k_bot,bm))
3361 ? (ufk ? (i >= 4 ? 3 : 2)
3362 : utf8_width(keybot->name)) : 0;
3364 * Labels are complicated by the fact that we want to look
3365 * up their translation, but also by the fact that we surround
3366 * the word with brackets like [ViewMsg] when the command is
3367 * the default. We want to look up the translation of the
3368 * part inside the brackets, not the whole thing.
3370 if(keytop->label && bitnset(k_top,bm)){
3371 char tmp_label[6*MAX_LABEL+1];
3372 size_t l;
3374 if(keytop->label[0] == '[' && keytop->label[(l=strlen(keytop->label))-1] == ']' && l > 2){
3376 * Can't write in k->label, which might be a constant array.
3378 strncpy(tmp_label, &keytop->label[1], MIN(sizeof(tmp_label),l-2));
3379 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3381 top_label_width = 2 + utf8_width(_(tmp_label));
3383 else
3384 top_label_width = utf8_width(_(keytop->label));
3386 else
3387 top_label_width = 0;
3389 if(keybot->label && bitnset(k_bot,bm)){
3390 char tmp_label[6*MAX_LABEL+1];
3391 size_t l;
3393 if(keybot->label[0] == '[' && keybot->label[(l=strlen(keybot->label))-1] == ']' && l > 2){
3394 strncpy(tmp_label, &keybot->label[1], MIN(sizeof(tmp_label),l-2));
3395 tmp_label[MIN(sizeof(tmp_label)-1,l-2)] = '\0';
3397 bot_label_width = 2 + utf8_width(_(tmp_label));
3399 else
3400 bot_label_width = utf8_width(_(keybot->label));
3402 else
3403 bot_label_width = 0;
3406 * The 1 for i < 5 is the space between adjacent boxes.
3407 * The last 1 or 0 when i == 5 is so that we won't try to put
3408 * a character in the lower right cell of the display, since that
3409 * causes a linefeed on some terminals.
3411 w[i] = MAX(top_name_width, bot_name_width) + 1 +
3412 MAX(top_label_width, bot_label_width) +
3413 ((i < 5) ? 1
3414 : ((bot_label_width >= top_label_width) ? 1 : 0));
3417 * The smallest we'll squeeze a column.
3419 * X ABCDEF we'll squeeze to X ABC
3420 * YZ GHIJ YZ GHI
3422 min_w[i] = MAX(top_name_width, bot_name_width) + 1 +
3423 MIN(MAX(top_label_width, bot_label_width), 3) +
3424 ((i < 5) ? 1
3425 : ((bot_label_width >= top_label_width) ? 1 : 0));
3427 /* init trial width */
3428 tw[i] = spacing[i+1] - spacing[i];
3429 extra[i] = tw[i] - w[i]; /* negative if it doesn't fit */
3433 * See if we can fit everything on the screen.
3435 done = 0;
3436 while(!done){
3437 int smallest_extra, how_small;
3439 /* Find smallest extra */
3440 smallest_extra = -1;
3441 how_small = 100;
3442 for(i = 0; i < 6; i++){
3443 if(extra[i] < how_small){
3444 smallest_extra = i;
3445 how_small = extra[i];
3449 if(how_small >= 0) /* everything fits */
3450 done++;
3451 else{
3452 int take_from, how_close;
3455 * Find the one that is closest to the ideal width
3456 * that has some extra to spare.
3458 take_from = -1;
3459 how_close = 100;
3460 for(i = 0; i < 6; i++){
3461 if(extra[i] > 0 &&
3462 ((spacing[i+1]-spacing[i]) - tw[i]) < how_close){
3463 take_from = i;
3464 how_close = (spacing[i+1]-spacing[i]) - tw[i];
3468 if(take_from >= 0){
3470 * Found one. Take one from take_from and add it
3471 * to the smallest_extra.
3473 tw[smallest_extra]++;
3474 extra[smallest_extra]++;
3475 tw[take_from]--;
3476 extra[take_from]--;
3478 else{
3479 int used_width;
3482 * Oops. Not enough space to fit everything in.
3483 * Some of the labels are truncated. Some may even be
3484 * truncated past the minimum. We make sure that each
3485 * field is at least its minimum size, and then we cut
3486 * back those over the minimum until we can fit all the
3487 * minimal names on the screen (if possible).
3489 for(i = 0; i < 6; i++)
3490 tw[i] = MAX(tw[i], min_w[i]);
3492 used_width = 0;
3493 for(i = 0; i < 6; i++)
3494 used_width += tw[i];
3496 while(used_width > width && !done){
3497 int candidate, excess;
3500 * Find the one with the most width over it's
3501 * minimum width.
3503 candidate = -1;
3504 excess = -100;
3505 for(i = 0; i < 6; i++){
3506 if(tw[i] - min_w[i] > excess){
3507 candidate = i;
3508 excess = tw[i] - min_w[i];
3512 if(excess > 0){
3513 tw[candidate]--;
3514 used_width--;
3516 else
3517 done++;
3520 done++;
3526 * Assign the format we came up with to the keymenu.
3528 next_one = 0;
3529 for(i = 0; i < 6; i++){
3530 k_top = offset + i*2;
3531 k_bot = k_top + 1;
3532 keytop = &km->keys[k_top];
3533 keybot = &km->keys[k_bot];
3534 top_name_width = (keytop->name && bitnset(k_top,bm))
3535 ? (ufk ? (i >= 5 ? 3 : 2)
3536 : utf8_width(keytop->name)) : 0;
3537 bot_name_width = (keybot->name && bitnset(k_bot,bm))
3538 ? (ufk ? (i >= 4 ? 3 : 2)
3539 : utf8_width(keybot->name)) : 0;
3541 if(top_name_width >= bot_name_width){
3542 keytop->column = next_one;
3543 keybot->column = next_one + (top_name_width - bot_name_width);
3545 else{
3546 keytop->column = next_one + (bot_name_width - top_name_width);
3547 keybot->column = next_one;
3550 next_one += tw[i];
3557 * Draw the key menu at bottom of screen
3559 * Args: km -- key_menu structure
3560 * bitmap -- which fields are active
3561 * width -- the screen width to format it at
3562 * row -- where to put it
3563 * column -- where to put it
3564 * what -- this is an enum telling us whether to display the
3565 * first menu (first set of 12 keys), or to display the same
3566 * one we displayed last time, or to display a particular
3567 * one (which), or to display the next one.
3569 * Fields are inactive if *either* the corresponding bitmap entry is 0 *or*
3570 * the actual entry in the key_menu is NULL. Therefore, it is sometimes
3571 * useful to just turn on all the bits in a bitmap and let the NULLs take
3572 * care of it. On the other hand, the bitmap gives a convenient method
3573 * for turning some keys on or off dynamically or due to options.
3574 * Both methods are used about equally.
3576 * Also saves the state for a possible redraw later.
3578 * Row should usually be a negative number. If row is 0, the menu is not
3579 * drawn.
3581 void
3582 draw_keymenu(struct key_menu *km, unsigned char *bitmap, int width, int row,
3583 int column, OtherMenu what)
3585 #ifdef _WINDOWS
3586 configure_menu_items (km, bitmap);
3587 #endif
3588 format_keymenu(km, bitmap, width);
3590 /*--- save state for a possible redraw ---*/
3591 km_state.km = km;
3592 km_state.row = row;
3593 km_state.column = column;
3594 memcpy(km_state.bitmap, bitmap, BM_SIZE);
3596 if(row == 0)
3597 return;
3599 if(km_state.blanked)
3600 keymenu_is_dirty = 1;
3602 if(what == FirstMenu || what == SecondMenu || what == ThirdMenu ||
3603 what == FourthMenu || what == MenuNotSet){
3604 if(what == FirstMenu || what == MenuNotSet)
3605 km->which = 0;
3606 else if(what == SecondMenu)
3607 km->which = 1;
3608 else if(what == ThirdMenu)
3609 km->which = 2;
3610 else if(what == FourthMenu)
3611 km->which = 3;
3613 if(km->which >= km->how_many)
3614 km->which = 0;
3616 else if(what == NextMenu)
3617 km->which = (km->which + 1) % km->how_many;
3618 /* else what must be SameMenu */
3620 output_keymenu(km, bitmap, row, column);
3622 km_state.blanked = 0;
3626 void
3627 redraw_keymenu(void)
3629 if(km_state.blanked)
3630 blank_keymenu(km_state.row, km_state.column);
3631 else
3632 draw_keymenu(km_state.km, km_state.bitmap, ps_global->ttyo->screen_cols,
3633 km_state.row, km_state.column, SameMenu);
3638 * end_keymenu - free resources associated with keymenu display cache
3640 void
3641 end_keymenu(void)
3643 int i;
3645 for(i = 0; i < 12; i++){
3646 if(last_time_buf[i].name)
3647 fs_give((void **) &last_time_buf[i].name);
3649 if(last_time_buf[i].label)
3650 fs_give((void **) &last_time_buf[i].label);
3655 /*----------------------------------------------------------------------
3656 Reveal Keymenu to Pine Command mappings
3658 Args:
3660 ----*/
3662 menu_command(UCS keystroke, struct key_menu *menu)
3664 int i, n;
3666 if(keystroke == KEY_UTF8 || keystroke == KEY_UNKNOWN)
3667 return(MC_UTF8);
3669 if(!menu)
3670 return(MC_UNKNOWN);
3672 if(F_ON(F_USE_FK,ps_global)){
3673 /* No alpha commands permitted in function key mode */
3674 if(keystroke < 0x80 && isalpha((unsigned char) keystroke))
3675 return(MC_UNKNOWN);
3677 /* Tres simple: compute offset, and test */
3678 if(keystroke >= F1 && keystroke <= F12){
3679 n = (menu->which * 12) + (keystroke - F1);
3680 if(bitnset(n, menu->bitmap))
3681 return(menu->keys[n].bind.cmd);
3684 else if(keystroke >= F1 && keystroke <= F12)
3685 return(MC_UNKNOWN);
3687 /* if ascii, coerce lower case */
3688 if(keystroke < 0x80 && isupper((unsigned char) keystroke))
3689 keystroke = tolower((unsigned char) keystroke);
3691 /* keep this here for Windows port */
3692 if((keystroke = validatekeys(keystroke)) == KEY_JUNK)
3693 return(MC_UNKNOWN);
3695 /* Scan the list for any keystroke/command binding */
3696 if(keystroke != NO_OP_COMMAND)
3697 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3698 if(bitnset(i, menu->bitmap))
3699 for(n = menu->keys[i].bind.nch - 1; n >= 0; n--)
3700 if(keystroke == menu->keys[i].bind.ch[n])
3701 return(menu->keys[i].bind.cmd);
3704 * If explicit mapping failed, check feature mappings and
3705 * hardwired defaults...
3707 if(F_ON(F_ENABLE_PRYNT,ps_global)
3708 && (keystroke == 'y' || keystroke == 'Y')){
3709 /* SPECIAL CASE: Scan the list for print bindings */
3710 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3711 if(bitnset(i, menu->bitmap))
3712 if(menu->keys[i].bind.cmd == MC_PRINTMSG
3713 || menu->keys[i].bind.cmd == MC_PRINTTXT)
3714 return(menu->keys[i].bind.cmd);
3717 if(F_ON(F_ENABLE_LESSTHAN_EXIT,ps_global)
3718 && (keystroke == '<' || keystroke == ','
3719 || (F_ON(F_ARROW_NAV,ps_global) && keystroke == KEY_LEFT))){
3720 /* SPECIAL CASE: Scan the list for MC_EXIT bindings */
3721 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3722 if(bitnset(i, menu->bitmap))
3723 if(menu->keys[i].bind.cmd == MC_EXIT)
3724 return(MC_EXIT);
3728 * If no match after scanning bindings, try universally
3729 * bound keystrokes...
3731 switch(keystroke){
3732 case KEY_MOUSE :
3733 return(MC_MOUSE);
3735 case ctrl('P') :
3736 case KEY_UP :
3737 return(MC_CHARUP);
3739 case ctrl('N') :
3740 case KEY_DOWN :
3741 return(MC_CHARDOWN);
3743 case ctrl('F') :
3744 case KEY_RIGHT :
3745 return(MC_CHARRIGHT);
3747 case ctrl('B') :
3748 case KEY_LEFT :
3749 return(MC_CHARLEFT);
3751 case ctrl('A') :
3752 return(MC_GOTOBOL);
3754 case ctrl('E') :
3755 return(MC_GOTOEOL);
3757 case ctrl('L') :
3758 return(MC_REPAINT);
3760 case KEY_RESIZE :
3761 return(MC_RESIZE);
3763 case NO_OP_IDLE:
3764 case NO_OP_COMMAND:
3765 if(USER_INPUT_TIMEOUT(ps_global))
3766 user_input_timeout_exit(ps_global->hours_to_timeout); /* no return */
3768 return(MC_NONE);
3770 default :
3771 break;
3774 return(MC_UNKNOWN); /* utter failure */
3779 /*----------------------------------------------------------------------
3780 Set up a binding for cmd, with one key bound to it.
3781 Use menu_add_binding to add more keys to this binding.
3783 Args: menu -- the keymenu
3784 key -- the initial key to bind to
3785 cmd -- the command to initialize to
3786 name -- a pointer to the string to point name to
3787 label -- a pointer to the string to point label to
3788 keynum -- which key in the keys array to initialize
3790 For translation purposes, the label in the calling routine
3791 should be wrapped in an N_() macro.
3793 ----*/
3794 void
3795 menu_init_binding(struct key_menu *menu, UCS key, int cmd, char *name, char *label, int keynum)
3797 /* if ascii, coerce to lower case */
3798 if(key < 0x80 && isupper((unsigned char)key))
3799 key = tolower((unsigned char)key);
3801 /* remove binding from any other key */
3802 menu_clear_cmd_binding(menu, cmd);
3804 menu->keys[keynum].name = name;
3805 menu->keys[keynum].label = label;
3806 menu->keys[keynum].bind.cmd = cmd;
3807 menu->keys[keynum].bind.nch = 0;
3808 menu->keys[keynum].bind.ch[menu->keys[keynum].bind.nch++] = key;
3812 /*----------------------------------------------------------------------
3813 Add a key/command binding to the given keymenu structure
3815 Args:
3817 ----*/
3818 void
3819 menu_add_binding(struct key_menu *menu, UCS key, int cmd)
3821 int i, n;
3823 /* NOTE: cmd *MUST* already have had a binding */
3824 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3825 if(menu->keys[i].bind.cmd == cmd){
3826 for(n = menu->keys[i].bind.nch - 1;
3827 n >= 0 && key != menu->keys[i].bind.ch[n];
3828 n--)
3831 /* if ascii, coerce to lower case */
3832 if(key < 0x80 && isupper((unsigned char)key))
3833 key = tolower((unsigned char)key);
3835 if(n < 0) /* not already bound, bind it */
3836 menu->keys[i].bind.ch[menu->keys[i].bind.nch++] = key;
3838 break;
3843 /*----------------------------------------------------------------------
3844 REMOVE a key/command binding from the given keymenu structure
3846 Args:
3848 ----*/
3850 menu_clear_binding(struct key_menu *menu, UCS key)
3852 int i, n;
3854 /* if ascii, coerce to lower case */
3855 if(key < 0x80 && isupper((unsigned char)key))
3856 key = tolower((unsigned char)key);
3858 for(i = (menu->how_many * 12) - 1; i >= 0; i--)
3859 for(n = menu->keys[i].bind.nch - 1; n >= 0; n--)
3860 if(key == menu->keys[i].bind.ch[n]){
3861 int cmd = menu->keys[i].bind.cmd;
3863 for(--menu->keys[i].bind.nch; n < menu->keys[i].bind.nch; n++)
3864 menu->keys[i].bind.ch[n] = menu->keys[i].bind.ch[n+1];
3866 return(cmd);
3869 return(MC_UNKNOWN);
3873 void
3874 menu_clear_cmd_binding(struct key_menu *menu, int cmd)
3876 int i;
3878 for(i = (menu->how_many * 12) - 1; i >= 0; i--){
3879 if(cmd == menu->keys[i].bind.cmd){
3880 menu->keys[i].name = NULL;
3881 menu->keys[i].label = NULL;
3882 menu->keys[i].bind.cmd = 0;
3883 menu->keys[i].bind.nch = 0;
3884 menu->keys[i].bind.ch[0] = 0;
3891 menu_binding_index(struct key_menu *menu, int cmd)
3893 int i;
3895 for(i = 0; i < menu->how_many * 12; i++)
3896 if(cmd == menu->keys[i].bind.cmd)
3897 return(i);
3899 return(-1);
3903 #ifdef MOUSE
3905 * print_inverted_label - highlight the label of the given menu item.
3906 * (callback from pico mouse routines)
3908 * So far, this is only
3909 * ever called with the top left row equal to the bottom right row.
3910 * If you change that you probably need to fix it.
3912 void
3913 print_inverted_label(int state, MENUITEM *m)
3915 unsigned i, j, k;
3916 int col_offsetwid, col_offsetchars, do_color = 0, skipwid = 0, skipchars = 0, len, c;
3917 char prename[100];
3918 char namepart[100];
3919 char labelpart[100];
3920 char *lp, *label;
3921 COLOR_PAIR *name_color = NULL, *label_color = NULL, *lastc = NULL;
3922 struct variable *vars = ps_global->vars;
3924 if(m->label && (lp=strchr(m->label, ' '))){
3925 char save;
3927 save = *lp;
3928 *lp = '\0';
3929 col_offsetwid = utf8_width(m->label);
3930 col_offsetchars = lp - m->label;
3931 *lp = save;
3933 else
3934 col_offsetwid = col_offsetchars = 0;
3936 if(pico_usingcolor() && ((VAR_KEYLABEL_FORE_COLOR &&
3937 VAR_KEYLABEL_BACK_COLOR) ||
3938 (VAR_KEYNAME_FORE_COLOR &&
3939 VAR_KEYNAME_BACK_COLOR))){
3940 lastc = pico_get_cur_color();
3942 if(VAR_KEYNAME_FORE_COLOR && VAR_KEYNAME_BACK_COLOR){
3943 name_color = state ? new_color_pair(VAR_KEYNAME_BACK_COLOR,
3944 VAR_KEYNAME_FORE_COLOR)
3945 : new_color_pair(VAR_KEYNAME_FORE_COLOR,
3946 VAR_KEYNAME_BACK_COLOR);
3948 else if(VAR_REV_FORE_COLOR && VAR_REV_BACK_COLOR)
3949 name_color = new_color_pair(VAR_REV_FORE_COLOR, VAR_REV_BACK_COLOR);
3951 if(VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR){
3952 label_color = state ? new_color_pair(VAR_KEYLABEL_BACK_COLOR,
3953 VAR_KEYLABEL_FORE_COLOR)
3954 : new_color_pair(VAR_KEYLABEL_FORE_COLOR,
3955 VAR_KEYLABEL_BACK_COLOR);
3957 else if(VAR_REV_FORE_COLOR && VAR_REV_BACK_COLOR){
3958 label_color = state ? new_color_pair(VAR_REV_FORE_COLOR,
3959 VAR_REV_BACK_COLOR)
3960 : new_color_pair(VAR_NORM_FORE_COLOR,
3961 VAR_NORM_BACK_COLOR);
3965 * See if we can grok all these colors. If not, we're going to
3966 * punt and pretend there are no colors at all.
3968 if(!pico_is_good_colorpair(name_color) ||
3969 !pico_is_good_colorpair(label_color)){
3970 if(name_color)
3971 free_color_pair(&name_color);
3972 if(label_color)
3973 free_color_pair(&label_color);
3974 if(lastc)
3975 free_color_pair(&lastc);
3977 else{
3978 do_color++;
3979 (void)pico_set_colorp(label_color, PSC_NONE);
3980 if(!(VAR_KEYLABEL_FORE_COLOR && VAR_KEYLABEL_BACK_COLOR)){
3981 if(state)
3982 StartInverse();
3983 else
3984 EndInverse();
3989 if(!do_color){
3991 * Command name's already inverted, leave it.
3993 skipwid = state ? 0 : col_offsetwid;
3994 skipchars = state ? 0 : col_offsetchars;
3995 if(state)
3996 StartInverse();
3997 else
3998 EndInverse();
4001 MoveCursor((int)(m->tl.r), (int)(m->tl.c) + skipwid);
4003 label = m->label ? m->label : "";
4004 len = strlen(label);
4007 * this is a bit complicated by the fact that we have to keep track of
4008 * the screenwidth as we print the label, because the screenwidth might
4009 * not be the same as the number of characters.
4010 * UNTESTED SINCE switching to UTF-8 *
4012 for(i = m->tl.r; i <= m->br.r; i++){
4013 /* collect part before name */
4014 for(k=0, j = m->tl.c + skipchars; j < MIN(m->lbl.c,m->br.c); j++){
4015 if(k < sizeof(prename))
4016 prename[k++] = ' ';
4019 if(k < sizeof(prename))
4020 prename[k] = '\0';
4022 /* collect name part */
4023 for(k=0; j < MIN(m->lbl.c+col_offsetchars,m->br.c); j++){
4024 c = (i == m->lbl.r &&
4025 j - m->lbl.c < len) ? label[j - m->lbl.c] : ' ';
4026 if(k < sizeof(namepart))
4027 namepart[k++] = c;
4030 if(k < sizeof(namepart))
4031 namepart[k] = '\0';
4033 /* collect label part */
4034 for(k=0; j <= m->br.c; j++){
4035 c = (i == m->lbl.r &&
4036 j - m->lbl.c < len) ? label[j - m->lbl.c] : ' ';
4037 if(k < sizeof(labelpart))
4038 labelpart[k++] = c;
4041 if(k < sizeof(labelpart))
4042 labelpart[k] = '\0';
4045 if(prename)
4046 Write_to_screen(prename);
4048 if(namepart){
4049 if(name_color && col_offsetchars)
4050 (void) pico_set_colorp(name_color, PSC_NONE);
4052 Write_to_screen(namepart);
4055 if(labelpart){
4056 if(name_color && col_offsetchars){
4057 if(label_color)
4058 (void) pico_set_colorp(label_color, PSC_NONE);
4059 else{
4060 if(state)
4061 StartInverse();
4062 else
4063 EndInverse();
4067 Write_to_screen(labelpart);
4070 if(do_color){
4071 if(lastc){
4072 (void)pico_set_colorp(lastc, PSC_NONE);
4073 free_color_pair(&lastc);
4075 else if(state)
4076 EndInverse();
4077 else
4078 pico_set_normal_color();
4080 if(name_color)
4081 free_color_pair(&name_color);
4082 if(label_color)
4083 free_color_pair(&label_color);
4085 else{
4086 if(state)
4087 EndInverse();
4090 #endif /* MOUSE */
4093 #ifdef _WINDOWS
4095 * This function scans the key menu and calls mswin.c functions
4096 * to build a corresponding windows menu.
4098 void
4099 configure_menu_items (struct key_menu *km, bitmap_t bitmap)
4101 int i;
4102 struct key *k;
4103 UCS key;
4105 mswin_menuitemclear ();
4107 if(!km)
4108 return;
4110 for (i = 0, k = km->keys ; i < km->how_many * 12; i++, k++) {
4111 if (k->name != NULL && k->label != NULL && bitnset (i, bitmap) &&
4112 k->menuitem != KS_NONE) {
4114 if (k->name[0] == '^')
4115 key = ctrl(k->name[1]);
4116 else if (strcmp(k->name, "Ret") == 0)
4117 key = '\r';
4118 else if (strcmp(k->name, "Spc") == 0)
4119 key = ' ';
4120 else
4121 key = k->name[0];
4123 mswin_menuitemadd (key, k->label, k->menuitem, 0);
4127 #endif