Mercurial > hg > xemacs-beta
comparison lwlib/lwlib.c @ 420:41dbb7a9d5f2 r21-2-18
Import from CVS: tag r21-2-18
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:24:09 +0200 |
parents | 697ef44129c6 |
children | 11054d720c21 |
comparison
equal
deleted
inserted
replaced
419:66615b78f1a5 | 420:41dbb7a9d5f2 |
---|---|
152 #endif | 152 #endif |
153 if (wv->contents && (wv->contents != (widget_value*)1)) | 153 if (wv->contents && (wv->contents != (widget_value*)1)) |
154 { | 154 { |
155 free_widget_value_tree (wv->contents); | 155 free_widget_value_tree (wv->contents); |
156 wv->contents = (widget_value *) 0xDEADBEEF; | 156 wv->contents = (widget_value *) 0xDEADBEEF; |
157 } | |
158 if (wv->args && wv->free_args) | |
159 { | |
160 free (wv->args); | |
161 wv->args = (void *) 0xDEADBEEF; | |
162 wv->nargs = 0; | |
157 } | 163 } |
158 if (wv->next) | 164 if (wv->next) |
159 { | 165 { |
160 free_widget_value_tree (wv->next); | 166 free_widget_value_tree (wv->next); |
161 wv->next = (widget_value *) 0xDEADBEEF; | 167 wv->next = (widget_value *) 0xDEADBEEF; |
261 copy->contents = copy_widget_value_tree (val->contents, change); | 267 copy->contents = copy_widget_value_tree (val->contents, change); |
262 copy->call_data = val->call_data; | 268 copy->call_data = val->call_data; |
263 copy->next = copy_widget_value_tree (val->next, change); | 269 copy->next = copy_widget_value_tree (val->next, change); |
264 copy->toolkit_data = NULL; | 270 copy->toolkit_data = NULL; |
265 copy->free_toolkit_data = False; | 271 copy->free_toolkit_data = False; |
272 if (val->nargs) | |
273 { | |
274 copy->args = (ArgList)malloc (sizeof (Arg) * val->nargs); | |
275 memcpy (copy->args, val->args, sizeof(Arg) * val->nargs); | |
276 copy->nargs = val->nargs; | |
277 copy->free_args = True; | |
278 } | |
266 #ifdef NEED_SCROLLBARS | 279 #ifdef NEED_SCROLLBARS |
267 copy_scrollbar_values (val, copy); | 280 copy_scrollbar_values (val, copy); |
268 #endif | 281 #endif |
269 } | 282 } |
270 return copy; | 283 return copy; |
1298 show_one_widget_busy (next->widget, busy); | 1311 show_one_widget_busy (next->widget, busy); |
1299 info->busy = busy; | 1312 info->busy = busy; |
1300 } | 1313 } |
1301 } | 1314 } |
1302 } | 1315 } |
1316 | |
1317 void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset) | |
1318 { | |
1319 int i; | |
1320 if (wv->nargs && wv->args) | |
1321 { | |
1322 for (i = 0; i<wv->nargs; i++) | |
1323 { | |
1324 addto[i + *offset] = wv->args[i]; | |
1325 } | |
1326 *offset += wv->nargs; | |
1327 } | |
1328 } |