From b86fe98abd7123332d761ffb1a6300ef82131f13 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 29 Jun 2015 20:37:55 -0400 Subject: [PATCH] Fixed some other flaws. --- redo/unix/container.c | 1 + redo/unix/radiobuttons.c | 5 ++++- redo/unix/spinbox.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/redo/unix/container.c b/redo/unix/container.c index 41ee6956..0ab82afb 100644 --- a/redo/unix/container.c +++ b/redo/unix/container.c @@ -180,6 +180,7 @@ uiControl *newHolder(void) h = (struct holder *) uiNewControl(holderType()); h->cw = containerWidget(uiMakeContainer(uiControl(h))); + h->cw->c = NULL; // but don't make it manage ourselves uiControl(h)->Handle = holderHandle; diff --git a/redo/unix/radiobuttons.c b/redo/unix/radiobuttons.c index 017f4ed2..5b698461 100644 --- a/redo/unix/radiobuttons.c +++ b/redo/unix/radiobuttons.c @@ -11,9 +11,12 @@ struct radiobuttons { uiDefineControlType(uiRadioButtons, uiTypeRadioButtons, struct radiobuttons) +// TODO note that the handle of a uiRadioButtons is undefined static uintptr_t radiobuttonsHandle(uiControl *c) { - return 0; + struct radiobuttons *r = (struct radiobuttons *) c; + + return (uintptr_t) (r->boxWidget); } static void radiobuttonsAppend(uiRadioButtons *rr, const char *text) diff --git a/redo/unix/spinbox.c b/redo/unix/spinbox.c index 078335e5..774630f8 100644 --- a/redo/unix/spinbox.c +++ b/redo/unix/spinbox.c @@ -16,7 +16,7 @@ static uintptr_t spinboxHandle(uiControl *c) { struct spinbox *s = (struct spinbox *) c; - return PUT_CODE_HERE; + return (uintptr_t) (s->widget); } static void defaultOnChanged(uiSpinbox *s, void *data)