comparison src/xmenu.c @ 6481:55236c5bca7c

(update_frame_menubar): Function renamed from update_one_frame_psheets. (initialize_frame_menubar): New function. (set_frame_menubar): Call menu_bar_items when items is NIL.
author Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
date Wed, 23 Mar 1994 18:23:32 +0000
parents 463b12ba8260
children 95661fd7a320
comparison
equal deleted inserted replaced
6480:c6cafb1168b3 6481:55236c5bca7c
1091 } 1091 }
1092 1092
1093 extern void EmacsFrameSetCharSize (); 1093 extern void EmacsFrameSetCharSize ();
1094 1094
1095 static void 1095 static void
1096 update_one_frame_psheets (f) 1096 update_frame_menubar (f)
1097 FRAME_PTR f; 1097 FRAME_PTR f;
1098 { 1098 {
1099 struct x_display *x = f->display.x; 1099 struct x_display *x = f->display.x;
1100 int columns, rows; 1100 int columns, rows;
1101 int menubar_changed; 1101 int menubar_changed;
1160 wv->name = "menubar"; 1160 wv->name = "menubar";
1161 wv->value = 0; 1161 wv->value = 0;
1162 wv->enabled = 1; 1162 wv->enabled = 1;
1163 save_wv = first_wv = wv; 1163 save_wv = first_wv = wv;
1164 1164
1165 items = FRAME_MENU_BAR_ITEMS (f); 1165 if (NILP (items = FRAME_MENU_BAR_ITEMS (f)))
1166 items = FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f));
1166 1167
1167 for (i = 0; i < XVECTOR (items)->size; i += 3) 1168 for (i = 0; i < XVECTOR (items)->size; i += 3)
1168 { 1169 {
1169 Lisp_Object string; 1170 Lisp_Object string;
1170 1171
1200 0); 1201 0);
1201 } 1202 }
1202 1203
1203 free_menubar_widget_value_tree (first_wv); 1204 free_menubar_widget_value_tree (first_wv);
1204 1205
1205 update_one_frame_psheets (f); 1206 update_frame_menubar (f);
1206 1207
1207 UNBLOCK_INPUT; 1208 UNBLOCK_INPUT;
1208 } 1209 }
1209 1210
1210 void 1211 void
1221 { 1222 {
1222 BLOCK_INPUT; 1223 BLOCK_INPUT;
1223 lw_destroy_all_widgets (id); 1224 lw_destroy_all_widgets (id);
1224 UNBLOCK_INPUT; 1225 UNBLOCK_INPUT;
1225 } 1226 }
1227 }
1228 /* Called from Fx_create_frame to create the inital menubar of a frame
1229 before it is mapped, so that the window is mapped with the menubar already
1230 there instead of us tacking it on later and thrashing the window after it
1231 is visible. */
1232 void
1233 initialize_frame_menubar (f)
1234 FRAME_PTR f;
1235 {
1236 set_frame_menubar (f);
1226 } 1237 }
1227 1238
1228 /* Nonzero if position X, Y relative to inside of frame F 1239 /* Nonzero if position X, Y relative to inside of frame F
1229 is in some other menu bar item. */ 1240 is in some other menu bar item. */
1230 1241