free_widget_value_tree (wv->contents);
wv->contents = (widget_value *) 0xDEADBEEF;
}
+ if (wv->args && wv->free_args)
+ {
+ free (wv->args);
+ wv->args = (void *) 0xDEADBEEF;
+ wv->nargs = 0;
+ }
if (wv->next)
{
free_widget_value_tree (wv->next);
copy->next = copy_widget_value_tree (val->next, change);
copy->toolkit_data = NULL;
copy->free_toolkit_data = False;
+ if (val->nargs)
+ {
+ copy->args = (ArgList)malloc (sizeof (Arg) * val->nargs);
+ memcpy (copy->args, val->args, sizeof(Arg) * val->nargs);
+ copy->nargs = val->nargs;
+ copy->free_args = True;
+ }
#ifdef NEED_SCROLLBARS
copy_scrollbar_values (val, copy);
#endif
}
}
}
+
+void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset)
+{
+ int i;
+ if (wv->nargs && wv->args)
+ {
+ for (i = 0; i<wv->nargs; i++)
+ {
+ addto[i + *offset] = wv->args[i];
+ }
+ *offset += wv->nargs;
+ }
+}