Rick Scott <[EMAIL PROTECTED]> writes:
> Next is this little gem.....
>
> /* tricky way to know if this RowColumn is a menubar or a pulldown... */
> menubar_p = False;
> XtSetArg (al[0], XmNisHomogeneous, &menubar_p);
> XtGetValues (widget, al, 1);
>
> What is the need to "trick" the RowColumn when you could ask it nicely, ie
> XmNrowColumnType?????
I don't know how this code came in, but in 21's sources, with the help
of a kind LessTif hacker, I've changed it to
/* WIDGET should be a RowColumn. */
if (!XmIsRowColumn (widget))
abort ();
/* Determine whether WIDGET is a menu bar. */
type = -1;
XtSetArg (al[0], XmNrowColumnType, &type);
XtGetValues (widget, al, 1);
if (type != XmMENU_BAR && type != XmMENU_PULLDOWN && type != XmMENU_POPUP)
abort ();
menubar_p = type == XmMENU_BAR;
which worked both with Motif and LessTif.