Rick Scott <[EMAIL PROTECTED]> writes:
> > Rick Scott <[EMAIL PROTECTED]> writes:
> >
> > > I haven't yet got into this very deep, but a few things concern me right
> > > off the top in lwlib-Xm.c.
> > >
> > > The first is the use of XtSetValues on XmNsensitive all over the place.
> > > Take a look at the Core man page, XtSetValues is _not_ the way to do
> > > this. Motif may be silently compensating for this error, LessTif is
> > > certainly not.
> >
> > Rick, what is the right way of doing this? I'm afraid I don't have
> > the Core man page. Is it right to call XtSetSensitive(3Xt) instead?
> >
> >
>
> I was going to quote the man page for you, but I don't seem to have
> it on this system. I wonder where I got that?? Yes XtSetSensitive is
> the correct way since there is some sort of interaction with
> XmNancestorSensitive and XmNsensitive.
Thanks, Rick. I've changed lwlib-Xm.c like this:
*** lwlib-Xm.c 2001/02/28 14:37:46 1.36
--- lwlib-Xm.c 2001/02/28 14:44:17
***************
*** 447,453 ****
toggle = XtNameToWidget (widget, cur->value);
if (toggle)
{
! XtVaSetValues (toggle, XmNsensitive, cur->enabled, NULL);
if (!val->value && cur->selected)
XtVaSetValues (toggle, XmNset, cur->selected, NULL);
if (val->value && strcmp (val->value, cur->value))
--- 447,453 ----
toggle = XtNameToWidget (widget, cur->value);
if (toggle)
{
! XtSetSensitive (toggle, cur->enabled);
if (!val->value && cur->selected)
XtVaSetValues (toggle, XmNset, cur->selected, NULL);
if (val->value && strcmp (val->value, cur->value))
***************
*** 655,664 ****
/* update the sensitivity and userdata */
/* Common to all widget types */
! XtVaSetValues (widget,
! XmNsensitive, val->enabled,
! XmNuserData, val->call_data,
! NULL);
/* update the menu button as a label. */
if (val->this_one_change >= VISIBLE_CHANGE)
--- 655,662 ----
/* update the sensitivity and userdata */
/* Common to all widget types */
! XtSetSensitive (widget, val->enabled);
! XtVaSetValues (widget, XmNuserData, val->call_data, NULL);
/* update the menu button as a label. */
if (val->this_one_change >= VISIBLE_CHANGE)
***************
*** 858,867 ****
val->edited = False;
/* Common to all widget types */
! XtVaSetValues (widget,
! XmNsensitive, val->enabled,
! XmNuserData, val->call_data,
! NULL);
/* Common to all label like widgets */
if (XtIsSubclass (widget, xmLabelWidgetClass))
--- 856,863 ----
val->edited = False;
/* Common to all widget types */
! XtSetSensitive (widget, val->enabled);
! XtVaSetValues (widget, XmNuserData, val->call_data, NULL);
/* Common to all label like widgets */
if (XtIsSubclass (widget, xmLabelWidgetClass))
***************
*** 1414,1420 ****
Widget widget;
Boolean pop_up_p = instance->pop_up_p;
char* shell_name = 0;
! char* icon_name;
Boolean text_input_slot = False;
Boolean radio_box = False;
Boolean list = False;
--- 1410,1416 ----
Widget widget;
Boolean pop_up_p = instance->pop_up_p;
char* shell_name = 0;
! char* icon_name = 0;
Boolean text_input_slot = False;
Boolean radio_box = False;
Boolean list = False;