ui/common/types.c

changeset 1142
e2a6707aa1e0
parent 1115
65870e2dbc1b
child 1168
2f9d8af6a499
equal deleted inserted replaced
1141:e37824dd7281 1142:e2a6707aa1e0
774 s->set = NULL; 774 s->set = NULL;
775 s->obj = NULL; 775 s->obj = NULL;
776 } 776 }
777 777
778 void uic_text_unbind(UiText *t) { 778 void uic_text_unbind(UiText *t) {
779 t->obj = NULL;
780 if(t->data1 && t->datatype == UI_TEXT_TYPE_BUFFER) {
781 // the binding functions all work with t->data1, not t->obj
782 // and we don't want to NULL them, because they will be still
783 // functional even without a widget binding
784 return;
785 }
786
779 t->set = NULL; 787 t->set = NULL;
780 t->get = NULL; 788 t->get = NULL;
781 t->getsubstr = NULL; 789 t->getsubstr = NULL;
782 t->insert = NULL; 790 t->insert = NULL;
783 t->replace = NULL; 791 t->replace = NULL;
785 t->position = NULL; 793 t->position = NULL;
786 t->selection = NULL; 794 t->selection = NULL;
787 t->setselection = NULL; 795 t->setselection = NULL;
788 t->length = NULL; 796 t->length = NULL;
789 t->remove = NULL; 797 t->remove = NULL;
790 t->obj = NULL;
791 } 798 }
792 799
793 void uic_range_unbind(UiRange *r) { 800 void uic_range_unbind(UiRange *r) {
794 r->get = NULL; 801 r->get = NULL;
795 r->set = NULL; 802 r->set = NULL;

mercurial