changeset 109191:379a5ad9f30b

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.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 10 Jul 2010 14:56:47 -0400
parents 8afa85da3f2d
children c17b03e52a4a
files src/ChangeLog src/frame.c src/msdos.c
diffstat 3 files changed, 13 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Jul 10 17:29:46 2010 +0300
+++ b/src/ChangeLog	Sat Jul 10 14:56:47 2010 -0400
@@ -1,3 +1,12 @@
+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
--- a/src/frame.c	Sat Jul 10 17:29:46 2010 +0300
+++ b/src/frame.c	Sat Jul 10 14:56:47 2010 -0400
@@ -326,6 +326,8 @@
   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 @@
 
   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 @@
 
   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)
--- a/src/msdos.c	Sat Jul 10 17:29:46 2010 +0300
+++ b/src/msdos.c	Sat Jul 10 14:56:47 2010 -0400
@@ -2074,10 +2074,6 @@
   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 @@
 
       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 @@
       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)