aboutsummaryrefslogtreecommitdiffstats
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorFred Pierresteguy1994-03-23 18:23:32 +0000
committerFred Pierresteguy1994-03-23 18:23:32 +0000
commit6af6cbb5306f58a93da8e141d0dfe0a0d6cd454d (patch)
treeab55da822ee76cf4dc4204ab39f1a64c4523abcc /src/xmenu.c
parentc4ff032379d9dcadb1d679ab74507c180fa5a709 (diff)
downloademacs-6af6cbb5306f58a93da8e141d0dfe0a0d6cd454d.tar.gz
emacs-6af6cbb5306f58a93da8e141d0dfe0a0d6cd454d.zip
(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.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 354bf778f01..11ea624660d 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1093,7 +1093,7 @@ free_menubar_widget_value_tree (wv)
1093extern void EmacsFrameSetCharSize (); 1093extern void EmacsFrameSetCharSize ();
1094 1094
1095static void 1095static void
1096update_one_frame_psheets (f) 1096update_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;
@@ -1162,7 +1162,8 @@ set_frame_menubar (f)
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 {
@@ -1202,7 +1203,7 @@ set_frame_menubar (f)
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}
@@ -1224,6 +1225,16 @@ free_frame_menubar (f)
1224 UNBLOCK_INPUT; 1225 UNBLOCK_INPUT;
1225 } 1226 }
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. */
1232void
1233initialize_frame_menubar (f)
1234 FRAME_PTR f;
1235{
1236 set_frame_menubar (f);
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. */