Fix message-box and avoid compilation warnings.
This commit is contained in:
parent
bdaed46f36
commit
6509f7727e
3 changed files with 14 additions and 18 deletions
|
@ -3469,22 +3469,17 @@ usage: (message-box FORMAT-STRING &rest ARGS) */)
|
|||
{
|
||||
Lisp_Object val = Fformat (nargs, args);
|
||||
#ifdef HAVE_MENUS
|
||||
/* The MS-DOS frames support popup menus even though they are
|
||||
not FRAME_WINDOW_P. */
|
||||
if (FRAME_WINDOW_P (XFRAME (selected_frame))
|
||||
|| FRAME_MSDOS_P (XFRAME (selected_frame)))
|
||||
{
|
||||
Lisp_Object pane, menu;
|
||||
struct gcpro gcpro1;
|
||||
pane = list1 (Fcons (build_string ("OK"), Qt));
|
||||
GCPRO1 (pane);
|
||||
menu = Fcons (val, pane);
|
||||
Fx_popup_dialog (Qt, menu, Qt);
|
||||
UNGCPRO;
|
||||
return val;
|
||||
}
|
||||
#endif /* HAVE_MENUS */
|
||||
Lisp_Object pane, menu;
|
||||
struct gcpro gcpro1;
|
||||
|
||||
pane = list1 (Fcons (build_string ("OK"), Qt));
|
||||
GCPRO1 (pane);
|
||||
menu = Fcons (val, pane);
|
||||
Fx_popup_dialog (Qt, menu, Qt);
|
||||
UNGCPRO;
|
||||
#else /* !HAVE_MENUS */
|
||||
message3 (val);
|
||||
#endif
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1250,9 +1250,6 @@ extern void x_set_tool_bar_lines (struct frame *f,
|
|||
Lisp_Object oldval);
|
||||
extern void x_activate_menubar (struct frame *);
|
||||
extern void x_real_positions (struct frame *, int *, int *);
|
||||
extern void x_set_menu_bar_lines (struct frame *,
|
||||
Lisp_Object,
|
||||
Lisp_Object);
|
||||
extern void free_frame_menubar (struct frame *);
|
||||
extern void x_free_frame_resources (struct frame *);
|
||||
|
||||
|
|
|
@ -5540,10 +5540,12 @@ the return value is nil. Otherwise the value is t. */)
|
|||
if (data->frame_menu_bar_lines
|
||||
!= previous_frame_menu_bar_lines)
|
||||
{
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
if (FRAME_WINDOW_P (f))
|
||||
x_set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
|
||||
make_number (0));
|
||||
else /* TTY or MSDOS */
|
||||
#endif
|
||||
set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
|
||||
make_number (0));
|
||||
}
|
||||
|
@ -5743,11 +5745,13 @@ the return value is nil. Otherwise the value is t. */)
|
|||
#ifdef HAVE_MENUS
|
||||
if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f))
|
||||
{
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
if (FRAME_WINDOW_P (f))
|
||||
x_set_menu_bar_lines (f,
|
||||
make_number (previous_frame_menu_bar_lines),
|
||||
make_number (0));
|
||||
else /* TTY or MSDOS */
|
||||
#endif
|
||||
set_menu_bar_lines (f, make_number (previous_frame_menu_bar_lines),
|
||||
make_number (0));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue