Mercurial > hg > xemacs-beta
comparison src/menubar.c @ 440:8de8e3f6228a r21-2-28
Import from CVS: tag r21-2-28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:33:38 +0200 |
parents | 84b14dcb0985 |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
439:357dd071b03c | 440:8de8e3f6228a |
---|---|
102 } | 102 } |
103 | 103 |
104 Lisp_Object | 104 Lisp_Object |
105 menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item) | 105 menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item) |
106 { | 106 { |
107 struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); | 107 Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); |
108 | 108 |
109 /* Menu descriptor should be a list */ | 109 /* Menu descriptor should be a list */ |
110 CHECK_CONS (desc); | 110 CHECK_CONS (desc); |
111 | 111 |
112 /* First element may be menu name, although can be omitted. | 112 /* First element may be menu name, although can be omitted. |
153 (desc, path)) | 153 (desc, path)) |
154 { | 154 { |
155 Lisp_Object path_entry, submenu_desc, submenu; | 155 Lisp_Object path_entry, submenu_desc, submenu; |
156 struct gcpro gcpro1; | 156 struct gcpro gcpro1; |
157 Lisp_Object gui_item = allocate_gui_item (); | 157 Lisp_Object gui_item = allocate_gui_item (); |
158 struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); | 158 Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); |
159 | 159 |
160 GCPRO1 (gui_item); | 160 GCPRO1 (gui_item); |
161 | 161 |
162 EXTERNAL_LIST_LOOP (path_entry, path) | 162 EXTERNAL_LIST_LOOP (path_entry, path) |
163 { | 163 { |
294 Menu item names should be converted to normal form before being compared. | 294 Menu item names should be converted to normal form before being compared. |
295 */ | 295 */ |
296 (name, buffer)) | 296 (name, buffer)) |
297 { | 297 { |
298 struct buffer *buf = decode_buffer (buffer, 0); | 298 struct buffer *buf = decode_buffer (buffer, 0); |
299 struct Lisp_String *n; | 299 Lisp_String *n; |
300 Charcount end; | 300 Charcount end; |
301 int i; | 301 int i; |
302 Bufbyte *name_data; | 302 Bufbyte *name_data; |
303 Bufbyte *string_result; | 303 Bufbyte *string_result; |
304 Bufbyte *string_result_ptr; | 304 Bufbyte *string_result_ptr; |
353 } | 353 } |
354 | 354 |
355 void | 355 void |
356 vars_of_menubar (void) | 356 vars_of_menubar (void) |
357 { | 357 { |
358 { | 358 /* put in Vblank_menubar a menubar value which has no visible |
359 /* put in Vblank_menubar a menubar value which has no visible | 359 * items. This is a bit tricky due to various quirks. We |
360 * items. This is a bit tricky due to various quirks. We | 360 * could use '(["" nil nil]), but this is apparently equivalent |
361 * could use '(["" nil nil]), but this is apparently equivalent | 361 * to '(nil), and a new frame created with this menubar will |
362 * to '(nil), and a new frame created with this menubar will | 362 * get a vertically-squished menubar. If we use " " as the |
363 * get a vertically-squished menubar. If we use " " as the | 363 * button title instead of "", we get an etched button border. |
364 * button title instead of "", we get an etched button border. | 364 * So we use |
365 * So we use | 365 * '(("No active menubar" ["" nil nil])) |
366 * '(("No active menubar" ["" nil nil])) | 366 * which creates a menu whose title is "No active menubar", |
367 * which creates a menu whose title is "No active menubar", | 367 * and this works fine. |
368 * and this works fine. | 368 */ |
369 */ | 369 |
370 | 370 Vblank_menubar = list1 (list2 (build_string ("No active menubar"), |
371 Lisp_Object menu_item[3]; | 371 vector3 (build_string (""), Qnil, Qnil))); |
372 static CONST char *blank_msg = "No active menubar"; | 372 staticpro (&Vblank_menubar); |
373 | |
374 menu_item[0] = build_string (""); | |
375 menu_item[1] = Qnil; | |
376 menu_item[2] = Qnil; | |
377 Vblank_menubar = Fcons (Fcons (build_string (blank_msg), | |
378 Fcons (Fvector (3, &menu_item[0]), | |
379 Qnil)), | |
380 Qnil); | |
381 staticpro (&Vblank_menubar); | |
382 } | |
383 | 373 |
384 DEFVAR_BOOL ("popup-menu-titles", &popup_menu_titles /* | 374 DEFVAR_BOOL ("popup-menu-titles", &popup_menu_titles /* |
385 If true, popup menus will have title bars at the top. | 375 If true, popup menus will have title bars at the top. |
386 */ ); | 376 */ ); |
387 popup_menu_titles = 1; | 377 popup_menu_titles = 1; |
501 also should not raise, lower, or iconify any frames. | 491 also should not raise, lower, or iconify any frames. |
502 Basically, the filter function should have no | 492 Basically, the filter function should have no |
503 side-effects. | 493 side-effects. |
504 | 494 |
505 :key-sequence keys Used in FSF Emacs as an hint to an equivalent keybinding. | 495 :key-sequence keys Used in FSF Emacs as an hint to an equivalent keybinding. |
506 Ignored by XEnacs for easymenu.el compatability. | 496 Ignored by XEnacs for easymenu.el compatibility. |
507 | 497 |
508 :label <form> (unimplemented!) Like :suffix, but replaces label | 498 :label <form> (unimplemented!) Like :suffix, but replaces label |
509 completely. | 499 completely. |
510 (might be added in 21.2). | 500 (might be added in 21.2). |
511 | 501 |