X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lwlib%2Flwlib-Xaw.c;h=2fe4dc9cefbcbcb9fc966de98ed57240c275b5de;hb=89559a53b9683058a6cea41ce3f8f6c9bd067238;hp=ff8771a1bf28dbd1e79f5b728c0af4481b034f8e;hpb=762383636a99307282c2d93d26c35c046ec24da1;p=chise%2Fxemacs-chise.git.1 diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index ff8771a..2fe4dc9 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -46,10 +46,8 @@ Boston, MA 02111-1307, USA. */ #include "xlwradio.h" #include "xlwcheckbox.h" #include "xlwgauge.h" -#ifndef NEED_MOTIF #include ATHENA_AsciiText_h_ #endif -#endif #include static void xaw_generic_callback (Widget, XtPointer, XtPointer); @@ -179,6 +177,7 @@ xaw_update_one_widget (widget_instance *instance, Widget widget, } #endif /* ! LWLIB_DIALOGS_ATHENA3D */ + lw_remove_accelerator_spec (val->value); XtSetArg (al [0], XtNlabel, val->value); XtSetArg (al [1], XtNsensitive, val->enabled); /* Force centered button text. See above. */ @@ -598,11 +597,14 @@ wm_delete_window (Widget shell, XtPointer closure, XtPointer call_data) abort (); XtSetArg (al [0], XtNchildren, &kids); XtGetValues (shell, al, 1); - if (!kids || !*kids) - abort (); - widget = kids [0]; - if (! XtIsSubclass (widget, dialogWidgetClass)) - abort (); + if (!kids || !*kids) abort (); + + for (widget = *kids; + widget && ! XtIsSubclass (widget, dialogWidgetClass); + widget = *++kids) + ; + if (!widget) abort (); + id = lw_get_widget_id (widget); if (! id) abort (); @@ -837,7 +839,7 @@ xaw_create_progress (widget_instance *instance) return scale; } -#ifndef NEED_MOTIF +#if defined(LWLIB_WIDGETS_ATHENA) #define TEXT_BUFFER_SIZE 128 static Widget xaw_create_text_field (widget_instance *instance) @@ -879,7 +881,7 @@ xaw_create_text_field (widget_instance *instance) #endif /* LWLIB_WIDGETS_ATHENA */ -widget_creation_entry +const widget_creation_entry xaw_creation_table [] = { #ifdef LWLIB_SCROLLBARS_ATHENA @@ -889,9 +891,7 @@ xaw_creation_table [] = #ifdef LWLIB_WIDGETS_ATHENA {"button", xaw_create_button }, { "label", xaw_create_label_field }, -#ifndef NEED_MOTIF {"text-field", xaw_create_text_field }, -#endif {"progress", xaw_create_progress }, #endif {NULL, NULL}