1 /* Hypertext file browser.
2 Copyright (C) 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006, 2007 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * \brief Source: hypertext file browser
24 * Implements the hypertext file viewer.
25 * The hypertext file is a file that may have one or more nodes. Each
26 * node ends with a ^D character and starts with a bracket, then the
27 * name of the node and then a closing bracket. Right after the closing
28 * bracket a newline is placed. This newline is not to be displayed by
29 * the help viewer and must be skipped - its sole purpose is to faciliate
30 * the work of the people managing the help file template (xnc.hlp) .
32 * Links in the hypertext file are specified like this: the text that
33 * will be highlighted should have a leading ^A, then it comes the
34 * text, then a ^B indicating that highlighting is done, then the name
35 * of the node you want to link to and then a ^C.
37 * The file must contain a ^D at the beginning and at the end of the
38 * file or the program will not be able to detect the end of file.
40 * Lazyness/widgeting attack: This file does use the dialog manager
41 * and uses mainly the dialog to achieve the help work. there is only
42 * one specialized widget and it's only used to forward the mouse messages
43 * to the appropiate routine.
51 #include <sys/types.h>
54 #include "lib/global.h"
56 #include "lib/tty/tty.h"
58 #include "lib/tty/mouse.h"
59 #include "lib/tty/key.h"
60 #include "lib/strutil.h"
62 #include "dialog.h" /* For Dlg_head */
63 #include "widget.h" /* For Widget */
64 #include "wtools.h" /* For common_dialog_repaint() */
70 const global_keymap_t
*help_map
;
72 #define MAXLINKNAME 80
73 #define HISTORY_SIZE 20
74 #define HELP_WINDOW_WIDTH (COLS - 16)
76 #define STRING_LINK_START "\01"
77 #define STRING_LINK_POINTER "\02"
78 #define STRING_LINK_END "\03"
79 #define STRING_NODE_END "\04"
82 static char *fdata
= NULL
; /* Pointer to the loaded data file */
83 static int help_lines
; /* Lines in help viewer */
84 static int history_ptr
; /* For the history queue */
85 static const char *main_node
; /* The main node */
86 static const char *last_shown
= NULL
; /* Last byte shown in a screen */
87 static gboolean end_of_node
= FALSE
; /* Flag: the last character of the node shown? */
88 static const char *currentpoint
;
89 static const char *selected_item
;
91 /* The widget variables */
92 static Dlg_head
*whelp
;
96 const char *page
; /* Pointer to the selected page */
97 const char *link
; /* Pointer to the selected link */
98 } history
[HISTORY_SIZE
];
100 /* Link areas for the mouse */
101 typedef struct Link_Area
104 const char *link_name
;
107 static GSList
*link_area
= NULL
;
108 static gboolean inside_link_area
= FALSE
;
110 static cb_ret_t
help_callback (Dlg_head
* h
, Widget
* sender
, dlg_msg_t msg
, int parm
, void *data
);
112 /* returns the position where text was found in the start buffer */
113 /* or 0 if not found */
115 search_string (const char *start
, const char *text
)
117 const char *result
= NULL
;
118 char *local_text
= g_strdup (text
);
119 char *d
= local_text
;
120 const char *e
= start
;
122 /* fmt sometimes replaces a space with a newline in the help file */
123 /* Replace the newlines in the link name with spaces to correct the situation */
132 for (d
= local_text
; *e
; e
++)
149 /* Searches text in the buffer pointed by start. Search ends */
150 /* if the CHAR_NODE_END is found in the text. Returns 0 on failure */
152 search_string_node (const char *start
, const char *text
)
154 const char *d
= text
;
155 const char *e
= start
;
158 for (; *e
&& *e
!= CHAR_NODE_END
; e
++)
171 /* Searches the_char in the buffer pointer by start and searches */
172 /* it can search forward (direction = 1) or backward (direction = -1) */
174 search_char_node (const char *start
, char the_char
, int direction
)
178 for (e
= start
; (*e
!= '\0') && (*e
!= CHAR_NODE_END
); e
+= direction
)
185 /* Returns the new current pointer when moved lines lines */
187 move_forward2 (const char *c
, int lines
)
193 for (line
= 0, p
= currentpoint
; (*p
!= '\0') && (*p
!= CHAR_NODE_END
); str_cnext_char (&p
))
196 return currentpoint
= p
;
201 return currentpoint
= c
;
205 move_backward2 (const char *c
, int lines
)
211 for (line
= 0, p
= currentpoint
; (*p
!= '\0') && ((int) (p
- fdata
) >= 0); str_cprev_char (&p
))
213 if (*p
== CHAR_NODE_END
)
215 /* We reached the beginning of the node */
216 /* Skip the node headers */
219 return currentpoint
= p
+ 2; /* Skip the newline following the start of the node */
222 if (*(p
- 1) == '\n')
225 return currentpoint
= p
;
227 return currentpoint
= c
;
234 currentpoint
= move_forward2 (currentpoint
, i
);
238 move_backward (int i
)
240 currentpoint
= move_backward2 (currentpoint
, ++i
);
246 while (((int) (currentpoint
> fdata
) > 0) && (*currentpoint
!= CHAR_NODE_END
))
249 while (*currentpoint
!= ']')
251 currentpoint
= currentpoint
+ 2; /* Skip the newline following the start of the node */
252 selected_item
= NULL
;
256 move_to_bottom (void)
258 while ((*currentpoint
!= '\0') && (*currentpoint
!= CHAR_NODE_END
))
265 help_follow_link (const char *start
, const char *lc_selected_item
)
267 char link_name
[MAXLINKNAME
];
271 if (lc_selected_item
== NULL
)
274 for (p
= lc_selected_item
; *p
&& *p
!= CHAR_NODE_END
&& *p
!= CHAR_LINK_POINTER
; p
++)
276 if (*p
== CHAR_LINK_POINTER
)
279 for (i
= 1; *p
!= CHAR_LINK_END
&& *p
&& *p
!= CHAR_NODE_END
&& i
< MAXLINKNAME
- 3;)
280 link_name
[i
++] = *++p
;
281 link_name
[i
- 1] = ']';
283 p
= search_string (fdata
, link_name
);
286 p
+= 1; /* Skip the newline following the start of the node */
291 /* Create a replacement page with the error message */
292 return _(" Help file format error\n");
296 select_next_link (const char *current_link
)
300 if (current_link
== NULL
)
303 p
= search_string_node (current_link
, STRING_LINK_END
);
306 p
= search_string_node (p
, STRING_LINK_START
);
313 select_prev_link (const char *current_link
)
315 return current_link
== NULL
? NULL
: search_char_node (current_link
- 1, CHAR_LINK_START
, -1);
319 start_link_area (int x
, int y
, const char *link_name
)
323 if (inside_link_area
)
324 message (D_NORMAL
, _("Warning"), _(" Internal bug: Double start of link area "));
326 /* Allocate memory for a new link area */
327 la
= g_new (Link_Area
, 1);
328 /* Save the beginning coordinates of the link area */
331 /* Save the name of the destination anchor */
332 la
->link_name
= link_name
;
333 link_area
= g_slist_prepend (link_area
, la
);
335 inside_link_area
= TRUE
;
339 end_link_area (int x
, int y
)
341 if (inside_link_area
)
343 Link_Area
*la
= (Link_Area
*) link_area
->data
;
344 /* Save the end coordinates of the link area */
347 inside_link_area
= FALSE
;
352 clear_link_areas (void)
354 g_slist_foreach (link_area
, (GFunc
) g_free
, NULL
);
355 g_slist_free (link_area
);
357 inside_link_area
= FALSE
;
361 help_print_word (Dlg_head
* h
, GString
* word
, int *col
, int *line
, gboolean add_space
)
363 if (*line
>= help_lines
)
364 g_string_set_size (word
, 0);
369 w
= str_term_width1 (word
->str
);
370 if (*col
+ w
>= HELP_WINDOW_WIDTH
)
376 if (*line
>= help_lines
)
377 g_string_set_size (word
, 0);
380 dlg_move (h
, *line
+ 2, *col
+ 2);
381 tty_print_string (word
->str
);
382 g_string_set_size (word
, 0);
389 if (*col
< HELP_WINDOW_WIDTH
- 1)
391 tty_print_char (' ');
403 help_show (Dlg_head
* h
, const char *paint_start
)
407 gboolean painting
= TRUE
;
408 gboolean acs
; /* Flag: Alternate character set active? */
409 gboolean repeat_paint
;
410 int active_col
, active_line
; /* Active link position */
411 char buff
[MB_LEN_MAX
+ 1];
414 word
= g_string_sized_new (32);
416 tty_setcolor (HELP_NORMAL_COLOR
);
419 line
= col
= active_col
= active_line
= 0;
420 repeat_paint
= FALSE
;
424 if ((int) (selected_item
- paint_start
) < 0)
425 selected_item
= NULL
;
429 while ((n
[0] != '\0') && (n
[0] != CHAR_NODE_END
) && (line
< help_lines
))
432 n
= str_cget_next_char (p
);
433 memcpy (buff
, p
, n
- p
);
436 c
= (unsigned char) buff
[0];
439 case CHAR_LINK_START
:
440 if (selected_item
== NULL
)
442 if (p
!= selected_item
)
443 tty_setcolor (HELP_LINK_COLOR
);
446 tty_setcolor (HELP_SLINK_COLOR
);
448 /* Store the coordinates of the link */
449 active_col
= col
+ 2;
450 active_line
= line
+ 2;
452 start_link_area (col
, line
, p
);
454 case CHAR_LINK_POINTER
:
456 end_link_area (col
- 1, line
);
460 help_print_word (h
, word
, &col
, &line
, FALSE
);
461 tty_setcolor (HELP_NORMAL_COLOR
);
470 dlg_move (h
, line
+ 2, col
+ 2);
471 tty_print_string (VERSION
);
472 col
+= str_term_width1 (VERSION
);
475 tty_setcolor (HELP_BOLD_COLOR
);
477 case CHAR_FONT_ITALIC
:
478 tty_setcolor (HELP_ITALIC_COLOR
);
480 case CHAR_FONT_NORMAL
:
481 help_print_word (h
, word
, &col
, &line
, FALSE
);
482 tty_setcolor (HELP_NORMAL_COLOR
);
486 help_print_word (h
, word
, &col
, &line
, FALSE
);
491 col
= (col
/ 8 + 1) * 8;
492 if (col
>= HELP_WINDOW_WIDTH
)
501 help_print_word (h
, word
, &col
, &line
, TRUE
);
504 if (painting
&& (line
< help_lines
))
507 /* accumulate symbols in a word */
508 g_string_append (word
, buff
);
509 else if (col
< HELP_WINDOW_WIDTH
)
511 dlg_move (h
, line
+ 2, col
+ 2);
513 if ((c
== ' ') || (c
== '.'))
517 tty_print_char (acs_map
[c
]);
519 SLsmg_draw_object (h
->y
+ line
+ 2, h
->x
+ col
+ 2, c
);
527 /* print last word */
528 if (n
[0] == CHAR_NODE_END
)
529 help_print_word (h
, word
, &col
, &line
, FALSE
);
532 end_of_node
= line
< help_lines
;
533 tty_setcolor (HELP_NORMAL_COLOR
);
534 if ((int) (selected_item
- last_shown
) >= 0)
536 if ((link_area
== NULL
) || (link_area
->data
== NULL
))
537 selected_item
= NULL
;
540 selected_item
= ((Link_Area
*) link_area
->data
)->link_name
;
545 while (repeat_paint
);
547 g_string_free (word
, TRUE
);
549 /* Position the cursor over a nice link */
551 dlg_move (h
, active_line
, active_col
);
555 help_event (Gpm_Event
* event
, void *vp
)
558 GSList
*current_area
;
560 if ((event
->type
& GPM_UP
) == 0)
563 /* The event is relative to the dialog window, adjust it: */
567 if (event
->buttons
& GPM_B_RIGHT
)
569 currentpoint
= history
[history_ptr
].page
;
570 selected_item
= history
[history_ptr
].link
;
573 history_ptr
= HISTORY_SIZE
- 1;
575 help_callback (w
->parent
, NULL
, DLG_DRAW
, 0, NULL
);
579 /* Test whether the mouse click is inside one of the link areas */
580 for (current_area
= link_area
; current_area
!= NULL
; current_area
= g_slist_next (current_area
))
582 Link_Area
*la
= (Link_Area
*) current_area
->data
;
583 /* Test one line link area */
584 if (event
->y
== la
->y1
&& event
->x
>= la
->x1
&& event
->y
== la
->y2
&& event
->x
<= la
->x2
)
586 /* Test two line link area */
587 if (la
->y1
+ 1 == la
->y2
)
590 if (event
->y
== la
->y1
&& event
->x
>= la
->x1
)
592 /* The second line */
593 if (event
->y
== la
->y2
&& event
->x
<= la
->x2
)
596 /* Mouse will not work with link areas of more than two lines */
599 /* Test whether a link area was found */
600 if (current_area
!= NULL
)
602 Link_Area
*la
= (Link_Area
*) current_area
->data
;
604 /* The click was inside a link area -> follow the link */
605 history_ptr
= (history_ptr
+ 1) % HISTORY_SIZE
;
606 history
[history_ptr
].page
= currentpoint
;
607 history
[history_ptr
].link
= la
->link_name
;
608 currentpoint
= help_follow_link (currentpoint
, la
->link_name
);
609 selected_item
= NULL
;
611 else if (event
->y
< 0)
612 move_backward (help_lines
- 1);
613 else if (event
->y
>= help_lines
)
614 move_forward (help_lines
- 1);
615 else if (event
->y
< help_lines
/ 2)
620 /* Show the new node */
621 help_callback (w
->parent
, NULL
, DLG_DRAW
, 0, NULL
);
628 help_help (Dlg_head
* h
)
632 history_ptr
= (history_ptr
+ 1) % HISTORY_SIZE
;
633 history
[history_ptr
].page
= currentpoint
;
634 history
[history_ptr
].link
= selected_item
;
636 p
= search_string (fdata
, "[How to use help]");
639 currentpoint
= p
+ 1; /* Skip the newline following the start of the node */
640 selected_item
= NULL
;
641 help_callback (h
, NULL
, DLG_DRAW
, 0, NULL
);
646 help_index (Dlg_head
* h
)
648 const char *new_item
;
650 new_item
= search_string (fdata
, "[Contents]");
652 if (new_item
== NULL
)
653 message (D_ERROR
, MSG_ERROR
, _(" Cannot find node %s in help file "), "[Contents]");
656 history_ptr
= (history_ptr
+ 1) % HISTORY_SIZE
;
657 history
[history_ptr
].page
= currentpoint
;
658 history
[history_ptr
].link
= selected_item
;
660 currentpoint
= new_item
+ 1; /* Skip the newline following the start of the node */
661 selected_item
= NULL
;
662 help_callback (h
, NULL
, DLG_DRAW
, 0, NULL
);
667 help_back (Dlg_head
* h
)
669 currentpoint
= history
[history_ptr
].page
;
670 selected_item
= history
[history_ptr
].link
;
673 history_ptr
= HISTORY_SIZE
- 1;
675 help_callback (h
, NULL
, DLG_DRAW
, 0, NULL
); /* FIXME: unneeded? */
679 help_cmk_move_backward (void *vp
, int lines
)
682 move_backward (lines
);
686 help_cmk_move_forward (void *vp
, int lines
)
689 move_forward (lines
);
693 help_cmk_moveto_top (void *vp
, int lines
)
701 help_cmk_moveto_bottom (void *vp
, int lines
)
709 help_next_link (gboolean move_down
)
711 const char *new_item
;
713 new_item
= select_next_link (selected_item
);
714 if (new_item
!= NULL
)
716 selected_item
= new_item
;
717 if ((int) (selected_item
- last_shown
) >= 0)
722 selected_item
= NULL
;
728 selected_item
= NULL
;
732 help_prev_link (gboolean move_up
)
734 const char *new_item
;
736 new_item
= select_prev_link (selected_item
);
737 selected_item
= new_item
;
738 if ((selected_item
== NULL
) || (selected_item
< currentpoint
))
742 else if ((link_area
!= NULL
) && (link_area
->data
!= NULL
))
743 selected_item
= ((Link_Area
*) link_area
->data
)->link_name
;
745 selected_item
= NULL
;
750 help_next_node (void)
752 const char *new_item
;
754 new_item
= currentpoint
;
755 while ((*new_item
!= '\0') && (*new_item
!= CHAR_NODE_END
))
758 if (*++new_item
== '[')
759 while (*++new_item
!= '\0')
760 if ((*new_item
== ']') && (*++new_item
!= '\0') && (*++new_item
!= '\0'))
762 currentpoint
= new_item
;
763 selected_item
= NULL
;
769 help_prev_node (void)
771 const char *new_item
;
773 new_item
= currentpoint
;
774 while (((int) (new_item
- fdata
) > 1) && (*new_item
!= CHAR_NODE_END
))
777 while (((int) (new_item
- fdata
) > 0) && (*new_item
!= CHAR_NODE_END
))
779 while (*new_item
!= ']')
781 currentpoint
= new_item
+ 2;
782 selected_item
= NULL
;
786 help_select_link (void)
789 if (selected_item
== NULL
)
791 #ifdef WE_WANT_TO_GO_BACKWARD_ON_KEY_RIGHT
792 /* Is there any reason why the right key would take us
793 * backward if there are no links selected?, I agree
794 * with Torben than doing nothing in this case is better
796 /* If there are no links, go backward in history */
799 history_ptr
= HISTORY_SIZE
- 1;
801 currentpoint
= history
[history_ptr
].page
;
802 selected_item
= history
[history_ptr
].link
;
807 history_ptr
= (history_ptr
+ 1) % HISTORY_SIZE
;
808 history
[history_ptr
].page
= currentpoint
;
809 history
[history_ptr
].link
= selected_item
;
810 currentpoint
= help_follow_link (currentpoint
, selected_item
);
813 selected_item
= NULL
;
817 help_execute_cmd (unsigned long command
)
819 cb_ret_t ret
= MSG_HANDLED
;
833 help_prev_link (TRUE
);
835 case CK_HelpMoveDown
:
836 help_next_link (TRUE
);
838 case CK_HelpSelectLink
:
841 case CK_HelpNextLink
:
842 help_next_link (FALSE
);
844 case CK_HelpPrevLink
:
845 help_prev_link (FALSE
);
847 case CK_HelpNextNode
:
850 case CK_HelpPrevNode
:
857 ret
= MSG_NOT_HANDLED
;
864 help_handle_key (Dlg_head
* h
, int c
)
866 if (c
!= KEY_UP
&& c
!= KEY_DOWN
&&
867 check_movement_keys (c
, help_lines
, NULL
,
868 help_cmk_move_backward
,
869 help_cmk_move_forward
,
870 help_cmk_moveto_top
, help_cmk_moveto_bottom
) == MSG_HANDLED
)
876 unsigned long command
;
878 command
= lookup_keymap_command (help_map
, c
);
879 if ((command
== CK_Ignore_Key
) || (help_execute_cmd (command
) == MSG_NOT_HANDLED
))
880 return MSG_NOT_HANDLED
;
883 help_callback (h
, NULL
, DLG_DRAW
, 0, NULL
);
888 help_callback (Dlg_head
* h
, Widget
* sender
, dlg_msg_t msg
, int parm
, void *data
)
895 help_lines
= min (LINES
- 4, max (2 * LINES
/ 3, 18));
896 dlg_set_size (h
, help_lines
+ 4, HELP_WINDOW_WIDTH
+ 4);
897 bb
= find_buttonbar (h
);
898 widget_set_size (&bb
->widget
, LINES
- 1, 0, 1, COLS
);
902 common_dialog_repaint (h
);
903 help_show (h
, currentpoint
);
907 return help_handle_key (h
, parm
);
910 /* command from buttonbar */
911 return help_execute_cmd (parm
);
914 return default_dlg_callback (h
, sender
, msg
, parm
, data
);
919 interactive_display_finish (void)
924 /* translate help file into terminal encoding */
926 translate_file (char *filedata
)
929 GString
*translated_data
;
931 /* initial allocation for largest whole help file */
932 translated_data
= g_string_sized_new (32 * 1024);
934 conv
= str_crt_conv_from ("UTF-8");
936 if (conv
== INVALID_CONV
)
937 g_string_free (translated_data
, TRUE
);
942 if (str_convert (conv
, filedata
, translated_data
) != ESTR_FAILURE
)
943 fdata
= g_string_free (translated_data
, FALSE
);
947 g_string_free (translated_data
, TRUE
);
949 str_close_conv (conv
);
954 md_callback (Widget
* w
, widget_msg_t msg
, int parm
)
959 w
->lines
= help_lines
;
963 return default_proc (msg
, parm
);
968 mousedispatch_new (int y
, int x
, int yl
, int xl
)
970 Widget
*w
= g_new (Widget
, 1);
971 init_widget (w
, y
, x
, yl
, xl
, md_callback
, help_event
);
976 interactive_display (const char *filename
, const char *node
)
978 const int help_colors
[DLG_COLOR_NUM
] = {
979 HELP_NORMAL_COLOR
, /* common text color */
980 0, /* unused in help */
981 HELP_BOLD_COLOR
, /* title color */
982 0 /* unused in help */
985 WButtonBar
*help_bar
;
987 char *hlpfile
= NULL
;
990 if (filename
!= NULL
)
991 filedata
= load_file (filename
);
993 filedata
= load_mc_home_file (mc_home
, mc_home_alt
, "mc.hlp", &hlpfile
);
995 if (filedata
== NULL
)
996 message (D_ERROR
, MSG_ERROR
, _(" Cannot open file %s \n %s "),
997 filename
? filename
: hlpfile
, unix_error_string (errno
));
1001 if (filedata
== NULL
)
1004 translate_file (filedata
);
1011 if ((node
== NULL
) || (*node
== '\0'))
1014 main_node
= search_string (fdata
, node
);
1016 if (main_node
== NULL
)
1018 message (D_ERROR
, MSG_ERROR
, _(" Cannot find node %s in help file "), node
);
1020 /* Fallback to [main], return if it also cannot be found */
1021 main_node
= search_string (fdata
, "[main]");
1022 if (main_node
== NULL
)
1024 interactive_display_finish ();
1029 help_lines
= min (LINES
- 4, max (2 * LINES
/ 3, 18));
1032 create_dlg (0, 0, help_lines
+ 4, HELP_WINDOW_WIDTH
+ 4,
1033 help_colors
, help_callback
, "[Help]", _("Help"),
1034 DLG_TRYUP
| DLG_CENTER
| DLG_WANT_TAB
);
1036 selected_item
= search_string_node (main_node
, STRING_LINK_START
) - 1;
1037 currentpoint
= main_node
+ 1; /* Skip the newline following the start of the node */
1039 for (history_ptr
= HISTORY_SIZE
; history_ptr
;)
1042 history
[history_ptr
].page
= currentpoint
;
1043 history
[history_ptr
].link
= selected_item
;
1046 help_bar
= buttonbar_new (TRUE
);
1047 help_bar
->widget
.y
-= whelp
->y
;
1048 help_bar
->widget
.x
-= whelp
->x
;
1050 md
= mousedispatch_new (1, 1, help_lines
, HELP_WINDOW_WIDTH
- 2);
1052 add_widget (whelp
, md
);
1053 add_widget (whelp
, help_bar
);
1055 buttonbar_set_label (help_bar
, 1, Q_ ("ButtonBar|Help"), help_map
, NULL
);
1056 buttonbar_set_label (help_bar
, 2, Q_ ("ButtonBar|Index"), help_map
, NULL
);
1057 buttonbar_set_label (help_bar
, 3, Q_ ("ButtonBar|Prev"), help_map
, NULL
);
1058 buttonbar_set_label (help_bar
, 4, "", help_map
, NULL
);
1059 buttonbar_set_label (help_bar
, 5, "", help_map
, NULL
);
1060 buttonbar_set_label (help_bar
, 6, "", help_map
, NULL
);
1061 buttonbar_set_label (help_bar
, 7, "", help_map
, NULL
);
1062 buttonbar_set_label (help_bar
, 8, "", help_map
, NULL
);
1063 buttonbar_set_label (help_bar
, 9, "", help_map
, NULL
);
1064 buttonbar_set_label (help_bar
, 10, Q_ ("ButtonBar|Quit"), help_map
, NULL
);
1067 interactive_display_finish ();
1068 destroy_dlg (whelp
);