if (val->value)
{
+ /* #### Temporary fix. I though Motif was supposed to grok %_
+ type things. */
+ lw_remove_accelerator_spec (val->value);
+
#ifdef LWLIB_DIALOGS_MOTIF
/*
* Sigh. The main text of a label is the name field for menubar
{
name_string =
XmStringCreateLtoR (res_name, XmSTRING_DEFAULT_CHARSET);
-
+
value_name = XtMalloc (strlen (val->value) + 2);
*value_name = 0;
strcat (value_name, " ");
strcat (value_name, val->value);
-
+
val_string =
XmStringCreateLtoR (value_name, XmSTRING_DEFAULT_CHARSET);
-
+
built_string =
XmStringConcat (name_string, val_string);
-
+
XtFree (value_name);
}
}
/* Common to all widget types */
XtSetArg (al [ac], XmNsensitive, val->enabled); ac++;
XtSetArg (al [ac], XmNuserData, val->call_data); ac++;
- lw_add_value_args_to_args (val, al, &ac);
-
XtSetValues (widget, al, ac);
#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF)
xm_update_scrollbar (instance, widget, val);
}
#endif
+ /* Lastly update our global arg values. */
+ if (val->args && val->args->nargs)
+ XtSetValues (widget, val->args->args, val->args->nargs);
}
\f/* getting the value back */
else if (class == xmTextWidgetClass)
{
if (val->value)
- free (val->value);
+ XtFree (val->value);
val->value = XmTextGetString (widget);
val->edited = True;
}
else if (class == xmTextFieldWidgetClass)
{
if (val->value)
- free (val->value);
+ XtFree (val->value);
val->value = XmTextFieldGetString (widget);
val->edited = True;
}
val->edited = True;
}
}
- else if (class == xmListWidgetClass
+ else if (class == xmListWidgetClass
#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1
|| class == xmComboBoxWidgetClass
#endif
n_children++;
}
- /* invisible seperator button */
+ /* invisible separator button */
ac = 0;
XtSetArg (al[ac], XmNmappedWhenManaged, FALSE); ac++;
children [n_children] = XmCreateLabel (row, "separator_button",
XtSetArg(al[ac], XmNrightOffset, 13); ac++;
value = XmCreateScrolledList (form, "list", al, ac);
- /* this is the easiest way I found to have the dble click in the
+ /* this is the easiest way I found to have the double click in the
list activate the default button */
XtAddCallback (value, XmNdefaultActionCallback, activate_button, button);
}
Widget text = 0;
widget_value* val = instance->info->val;
- XtSetArg (al [ac], XmNsensitive, val->enabled && val->call_data); ac++;
+ XtSetArg (al [ac], XmNsensitive, val->enabled); ac++;
XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
XtSetArg (al [ac], XmNuserData, val->call_data); ac++;
XtSetArg (al [ac], XmNmappedWhenManaged, FALSE); ac++;
\f
/* Table of functions to create widgets */
-widget_creation_entry
+const widget_creation_entry
xm_creation_table [] =
{
#ifdef LWLIB_MENUBARS_MOTIF