X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lwlib%2Fxlwradio.c;h=a6430b9fcf31f4b390865e4349a7416690044d44;hb=707ae753601d8478a5144878367604b6d8222698;hp=17405c4b3893429d8e797b07b4415e6bf28e112c;hpb=82da33b61c3e2dd2937db17b75b2838188793053;p=chise%2Fxemacs-chise.git- diff --git a/lwlib/xlwradio.c b/lwlib/xlwradio.c index 17405c4..a6430b9 100644 --- a/lwlib/xlwradio.c +++ b/lwlib/xlwradio.c @@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */ * * Author: Edward A. Falk * falk@falconer.vip.best.com - * + * * Date: June 30, 1997 * * @@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA. */ #include #include -#include ATHENA_INCLUDE(XawInit.h) +#include ATHENA_XawInit_h_ #include "../src/xmu.h" #include "xlwradioP.h" @@ -120,7 +120,7 @@ static XtActionsRec actionsList[] = RadioClassRec radioClassRec = { { - (WidgetClass) SuperClass, /* superclass */ + (WidgetClass) SuperClass, /* superclass */ "Radio", /* class_name */ sizeof(RadioRec), /* size */ RadioClassInit, /* class_initialize */ @@ -154,7 +154,7 @@ RadioClassRec radioClassRec = { NULL /* extension */ }, /* CoreClass fields initialization */ { - XtInheritChangeSensitive /* change_sensitive */ + XtInheritChangeSensitive /* change_sensitive */ }, /* SimpleClass fields initialization */ #ifdef _ThreeDP_h { @@ -241,7 +241,7 @@ RadioInit (Widget request, /* Function Name: RadioDestroy * Description: Destroy Callback for radio widget. * Arguments: w - the radio widget that is being destroyed. - * junk, grabage - not used. + * junk, garbage - not used. * Returns: none. */ @@ -272,13 +272,13 @@ RadioResize (Widget w) switch( rw->label.justify ) { case XtJustifyLeft: - rw->label.label_x += bs(rw) + rw->label.internal_width ; + rw->label.label_x += (bs(rw) + rw->label.internal_width) ; break ; case XtJustifyRight: break ; case XtJustifyCenter: default: - rw->label.label_x += (bs(rw) + rw->label.internal_width)/2 ; + rw->label.label_x += (bs(rw) + rw->label.internal_width)/2; break ; } } @@ -375,6 +375,13 @@ RadioSetValues (Widget current, RadioSize(newrw, &newrw->core.width, &newrw->core.height) ; } + /* The label set values routine can resize the widget. We need to + * recalculate if this is true. + */ + if (newrw->label.label_x != oldrw->label.label_x) + { + RadioResize (new); + } return FALSE ; } @@ -416,7 +423,7 @@ RadioQueryGeometry (Widget w, * border. */ -static void +static void DrawHighlight (Widget w, GC gc) { @@ -466,7 +473,7 @@ RadioUnhighlight (Widget w, /* ARGSUSED */ -void +void RadioSet (Widget w, XEvent *event, String *params, /* unused */ @@ -485,7 +492,7 @@ RadioSet (Widget w, /* ARGSUSED */ -void +void RadioUnset (Widget w, XEvent *event, String *params, /* unused */