Commit 48104462 authored by Chong Yidong's avatar Chong Yidong

Adapt terminal frames to latest menu-bar changes.

* frame.c (make_frame): Initialize menu_bar_lines and
tool_bar_lines members.
(make_initial_frame, make_terminal_frame): Initialize
menu_bar_lines using value of menu-bar-mode.

* msdos.c (IT_set_frame_parameters): Don't set menu-bar-lines.
parent c971758d
2010-07-10 Chong Yidong <cyd@stupidchicken.com>
* frame.c (make_frame): Initialize menu_bar_lines and
tool_bar_lines members.
(make_initial_frame, make_terminal_frame): Initialize
menu_bar_lines using value of menu-bar-mode.
* msdos.c (IT_set_frame_parameters): Don't set menu-bar-lines.
2010-07-10 Eli Zaretskii <eliz@gnu.org>
* process.c: Reshuffle #include's. Condition some of the global
......
......@@ -326,6 +326,8 @@ make_frame (int mini_p)
f->n_tool_bar_items = 0;
f->left_fringe_width = f->right_fringe_width = 0;
f->fringe_cols = 0;
f->menu_bar_lines = 0;
f->tool_bar_lines = 0;
f->scroll_bar_actual_width = 0;
f->border_width = 0;
f->internal_border_width = 0;
......@@ -550,6 +552,7 @@ make_initial_frame (void)
FRAME_CAN_HAVE_SCROLL_BARS (f) = 0;
FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none;
FRAME_MENU_BAR_LINES(f) = NILP (Vmenu_bar_mode) ? 0 : 1;
#ifdef CANNOT_DUMP
if (!noninteractive)
......@@ -600,6 +603,7 @@ make_terminal_frame (struct terminal *terminal)
FRAME_CAN_HAVE_SCROLL_BARS (f) = 0;
FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none;
FRAME_MENU_BAR_LINES(f) = NILP (Vmenu_bar_mode) ? 0 : 1;
/* Set the top frame to the newly created frame. */
if (FRAMEP (FRAME_TTY (f)->top_frame)
......
......@@ -2074,10 +2074,6 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
unsigned long orig_fg, orig_bg;
Lisp_Object frame_bg, frame_fg;
struct tty_display_info *tty = FRAME_TTY (f);
extern Lisp_Object Qmenu_bar_lines;
extern Lisp_Object Vmenu_bar_mode;
int menu_bar_lines_defined =
!NILP (Fassq (Qmenu_bar_lines, Vdefault_frame_alist));
/* If we are creating a new frame, begin with the original screen colors
used for the initial frame. */
......@@ -2116,8 +2112,6 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
if (EQ (prop, Qreverse))
reverse = EQ (val, Qt);
else if (!menu_bar_lines_defined && EQ (prop, Qmenu_bar_lines))
menu_bar_lines_defined = 1;
}
if (tty->termscript && reverse)
......@@ -2217,18 +2211,6 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
store_frame_param (f, prop, val);
}
/* If menu-bar-lines is neither in the frame parameters nor in
default-frame-alist, set it according to menu-bar-mode. */
if (!menu_bar_lines_defined)
{
store_frame_param (f, Qmenu_bar_lines,
NILP (Vmenu_bar_mode)
? make_number (0) : make_number (1));
if (tty->termscript)
fprintf (tty->termscript, "<MENU BAR LINES DEFAULTED: %d\n",
!NILP (Vmenu_bar_mode));
}
/* If they specified "reverse", but not the colors, we need to swap
the current frame colors. */
if (reverse)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment