Mercurial > emacs
comparison src/msdos.c @ 109117:240177dc47d7
Fix menu bar display on MS-DOS.
msdos.c (IT_set_frame_parameters): Set menu-bar-lines according
to menu-bar-mode, if not set in the frame parameters or in
default-frame-alist.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 03 Jul 2010 14:54:21 +0300 |
parents | a5fcd78ad3eb |
children | 254d81c0e750 |
comparison
equal
deleted
inserted
replaced
109116:e723dd7c9121 | 109117:240177dc47d7 |
---|---|
2096 int redraw = 0, fg_set = 0, bg_set = 0; | 2096 int redraw = 0, fg_set = 0, bg_set = 0; |
2097 unsigned long orig_fg, orig_bg; | 2097 unsigned long orig_fg, orig_bg; |
2098 Lisp_Object frame_bg, frame_fg; | 2098 Lisp_Object frame_bg, frame_fg; |
2099 extern Lisp_Object Qdefault, QCforeground, QCbackground; | 2099 extern Lisp_Object Qdefault, QCforeground, QCbackground; |
2100 struct tty_display_info *tty = FRAME_TTY (f); | 2100 struct tty_display_info *tty = FRAME_TTY (f); |
2101 extern Lisp_Object Qmenu_bar_lines; | |
2102 extern Lisp_Object Vmenu_bar_mode; | |
2103 int menu_bar_lines_defined = | |
2104 !NILP (Fassq (Qmenu_bar_lines, Vdefault_frame_alist)); | |
2101 | 2105 |
2102 /* If we are creating a new frame, begin with the original screen colors | 2106 /* If we are creating a new frame, begin with the original screen colors |
2103 used for the initial frame. */ | 2107 used for the initial frame. */ |
2104 if (EQ (alist, Vdefault_frame_alist) | 2108 if (EQ (alist, Vdefault_frame_alist) |
2105 && initial_screen_colors[0] != -1 && initial_screen_colors[1] != -1) | 2109 && initial_screen_colors[0] != -1 && initial_screen_colors[1] != -1) |
2142 prop = parms[i]; | 2146 prop = parms[i]; |
2143 val = values[i]; | 2147 val = values[i]; |
2144 | 2148 |
2145 if (EQ (prop, Qreverse)) | 2149 if (EQ (prop, Qreverse)) |
2146 reverse = EQ (val, Qt); | 2150 reverse = EQ (val, Qt); |
2151 else if (!menu_bar_lines_defined && EQ (prop, Qmenu_bar_lines)) | |
2152 menu_bar_lines_defined = 1; | |
2147 } | 2153 } |
2148 | 2154 |
2149 need_to_reverse = reverse && !was_reverse; | 2155 need_to_reverse = reverse && !was_reverse; |
2150 if (tty->termscript && need_to_reverse) | 2156 if (tty->termscript && need_to_reverse) |
2151 fprintf (tty->termscript, "<INVERSE-VIDEO>\n"); | 2157 fprintf (tty->termscript, "<INVERSE-VIDEO>\n"); |
2222 if (tty->termscript) | 2228 if (tty->termscript) |
2223 fprintf (tty->termscript, "<TERM_INIT done, TTY_TYPE: %.*s>\n", | 2229 fprintf (tty->termscript, "<TERM_INIT done, TTY_TYPE: %.*s>\n", |
2224 SBYTES (val), SDATA (val)); | 2230 SBYTES (val), SDATA (val)); |
2225 } | 2231 } |
2226 store_frame_param (f, prop, val); | 2232 store_frame_param (f, prop, val); |
2233 } | |
2234 | |
2235 /* If menu-bar-lines is neither in the frame parameters nor in | |
2236 default-frame-alist, set it according to menu-bar-mode. */ | |
2237 if (!menu_bar_lines_defined) | |
2238 { | |
2239 store_frame_param (f, Qmenu_bar_lines, | |
2240 NILP (Vmenu_bar_mode) | |
2241 ? make_number (0) : make_number (1)); | |
2242 if (tty->termscript) | |
2243 fprintf (tty->termscript, "<MENU BAR LINES DEFAULTED: %d\n", | |
2244 !NILP (Vmenu_bar_mode)); | |
2227 } | 2245 } |
2228 | 2246 |
2229 /* If they specified "reverse", but not the colors, we need to swap | 2247 /* If they specified "reverse", but not the colors, we need to swap |
2230 the current frame colors. */ | 2248 the current frame colors. */ |
2231 if (need_to_reverse) | 2249 if (need_to_reverse) |