ui/common/context.c

changeset 143
d499b29d7cb6
parent 142
46448d38885c
child 145
853685152c1d
equal deleted inserted replaced
142:46448d38885c 143:d499b29d7cb6
243 default: fprintf(stderr, "uic_copy_binding: wtf!\n"); break; 243 default: fprintf(stderr, "uic_copy_binding: wtf!\n"); break;
244 case UI_VAR_SPECIAL: break; 244 case UI_VAR_SPECIAL: break;
245 case UI_VAR_INTEGER: { 245 case UI_VAR_INTEGER: {
246 UiInteger *f = from->value; 246 UiInteger *f = from->value;
247 UiInteger *t = to->value; 247 UiInteger *t = to->value;
248 if(!f->obj) break;
248 uic_int_copy(f, t); 249 uic_int_copy(f, t);
249 t->set(t, t->value); 250 t->set(t, t->value);
250 break; 251 break;
251 } 252 }
252 case UI_VAR_STRING: { 253 case UI_VAR_STRING: {
253 UiString *f = from->value; 254 UiString *f = from->value;
254 UiString *t = to->value; 255 UiString *t = to->value;
256 if(!f->obj) break;
255 uic_string_copy(f, t); 257 uic_string_copy(f, t);
256 char *tvalue = t->value.ptr ? t->value.ptr : ""; 258 char *tvalue = t->value.ptr ? t->value.ptr : "";
257 t->set(t, tvalue); 259 t->set(t, tvalue);
258 break; 260 break;
259 } 261 }
260 case UI_VAR_TEXT: { 262 case UI_VAR_TEXT: {
261 UiText *f = from->value; 263 UiText *f = from->value;
262 UiText *t = to->value; 264 UiText *t = to->value;
265 if(!f->obj) break;
263 uic_text_copy(f, t); 266 uic_text_copy(f, t);
264 char *tvalue = t->value.ptr ? t->value.ptr : ""; 267 char *tvalue = t->value.ptr ? t->value.ptr : "";
265 t->set(t, tvalue); 268 t->set(t, tvalue);
266 t->setposition(t, t->pos); 269 t->setposition(t, t->pos);
267 break; 270 break;
268 } 271 }
269 case UI_VAR_LIST: { 272 case UI_VAR_LIST: {
270 UiList *f = from->value; 273 UiList *f = from->value;
271 UiList *t = to->value; 274 UiList *t = to->value;
275 if(!f->obj) break;
272 uic_list_copy(f, t); 276 uic_list_copy(f, t);
273 t->update(t, -1); 277 t->update(t, -1);
274 } 278 }
275 case UI_VAR_RANGE: { 279 case UI_VAR_RANGE: {
276 UiRange *f = from->value; 280 UiRange *f = from->value;
277 UiRange *t = to->value; 281 UiRange *t = to->value;
282 if(!f->obj) break;
278 uic_range_copy(f, t); 283 uic_range_copy(f, t);
279 t->setextent(t, t->extent); 284 t->setextent(t, t->extent);
280 t->setrange(t, t->min, t->max); 285 t->setrange(t, t->min, t->max);
281 t->set(t, t->value); 286 t->set(t, t->value);
282 } 287 }

mercurial