comparison src/gui-x.c @ 173:8eaf7971accc r20-3b13

Import from CVS: tag r20-3b13
author cvs
date Mon, 13 Aug 2007 09:49:09 +0200
parents 859a2309aef8
children 2d532a89d707
comparison
equal deleted inserted replaced
172:a38aed19690b 173:8eaf7971accc
102 struct mark_widget_value_closure closure; 102 struct mark_widget_value_closure closure;
103 103
104 closure.markobj = markobj; 104 closure.markobj = markobj;
105 lw_map_widget_values (data->id, mark_widget_value_mapper, &closure); 105 lw_map_widget_values (data->id, mark_widget_value_mapper, &closure);
106 } 106 }
107 107
108 return (data->last_menubar_buffer); 108 return data->last_menubar_buffer;
109 } 109 }
110 110
111 /* This is like FRAME_MENUBAR_DATA (f), but contains an alist of 111 /* This is like FRAME_MENUBAR_DATA (f), but contains an alist of
112 (id . popup-data) for GCPRO'ing the callbacks of the popup menus 112 (id . popup-data) for GCPRO'ing the callbacks of the popup menus
113 and dialog boxes. */ 113 and dialog boxes. */
139 } 139 }
140 140
141 int 141 int
142 popup_handled_p (LWLIB_ID id) 142 popup_handled_p (LWLIB_ID id)
143 { 143 {
144 return (NILP (assq_no_quit (make_int (id), Vpopup_callbacks))); 144 return NILP (assq_no_quit (make_int (id), Vpopup_callbacks));
145 } 145 }
146 146
147 /* menu_item_descriptor_to_widget_value() et al. mallocs a 147 /* menu_item_descriptor_to_widget_value() et al. mallocs a
148 widget_value, but then may signal lisp errors. If an error does 148 widget_value, but then may signal lisp errors. If an error does
149 not occur, the opaque ptr we have here has had its pointer set to 0 149 not occur, the opaque ptr we have here has had its pointer set to 0
342 return ((first == '-') 342 return ((first == '-')
343 ? NULL /* single etched is the default */ 343 ? NULL /* single etched is the default */
344 : xstrdup ("shadowDoubleEtchedIn")); 344 : xstrdup ("shadowDoubleEtchedIn"));
345 else if (*p == ':') 345 else if (*p == ':')
346 return xstrdup (p+1); 346 return xstrdup (p+1);
347 347
348 return NULL; 348 return NULL;
349 } 349 }
350 350
351 /* This does the dirty work. gc_currently_forbidden is 1 when this is called. 351 /* This does the dirty work. gc_currently_forbidden is 1 when this is called.
352 */ 352 */
365 Lisp_Object include_p = Qt; 365 Lisp_Object include_p = Qt;
366 Lisp_Object selected_p = Qnil; 366 Lisp_Object selected_p = Qnil;
367 Lisp_Object keys = Qnil; 367 Lisp_Object keys = Qnil;
368 Lisp_Object style = Qnil; 368 Lisp_Object style = Qnil;
369 Lisp_Object config_tag = Qnil; 369 Lisp_Object config_tag = Qnil;
370 int length = vector_length (XVECTOR (desc)); 370 int length = XVECTOR_LENGTH (desc);
371 Lisp_Object *contents = vector_data (XVECTOR (desc)); 371 Lisp_Object *contents = XVECTOR_DATA (desc);
372 int plist_p; 372 int plist_p;
373 int selected_spec = 0, included_spec = 0; 373 int selected_spec = 0, included_spec = 0;
374 374
375 if (length < 3) 375 if (length < 3)
376 signal_simple_error ("button descriptors must be at least 3 long", desc); 376 signal_simple_error ("button descriptors must be at least 3 long", desc);
416 else if (EQ (key, Q_selected)) selected_p = val, selected_spec = 1; 416 else if (EQ (key, Q_selected)) selected_p = val, selected_spec = 1;
417 else if (EQ (key, Q_included)) include_p = val, included_spec = 1; 417 else if (EQ (key, Q_included)) include_p = val, included_spec = 1;
418 else if (EQ (key, Q_config)) config_tag = val; 418 else if (EQ (key, Q_config)) config_tag = val;
419 else if (EQ (key, Q_filter)) 419 else if (EQ (key, Q_filter))
420 signal_simple_error(":filter keyword not permitted on leaf nodes", desc); 420 signal_simple_error(":filter keyword not permitted on leaf nodes", desc);
421 else 421 else
422 signal_simple_error_2 ("unknown menu item keyword", key, desc); 422 signal_simple_error_2 ("unknown menu item keyword", key, desc);
423 } 423 }
424 } 424 }
425 425
426 #ifdef HAVE_MENUBARS 426 #ifdef HAVE_MENUBARS
513 { 513 {
514 wv->type = TEXT_TYPE; 514 wv->type = TEXT_TYPE;
515 #if 0 515 #if 0
516 wv->value = wv->name; 516 wv->value = wv->name;
517 wv->name = "value"; 517 wv->name = "value";
518 #endif 518 #endif
519 } 519 }
520 else 520 else
521 signal_simple_error_2 ("unknown style", style, desc); 521 signal_simple_error_2 ("unknown style", style, desc);
522 522
523 if (!allow_text_field_p && (wv->type == TEXT_TYPE)) 523 if (!allow_text_field_p && (wv->type == TEXT_TYPE))