From de726086da7b195d46513d03a7c25b6817d49828 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 5 Jun 2015 00:09:07 -0400 Subject: [PATCH] Properly tested parent changes for radiobuttons... Z-order changes are still an issue --- redo/test/page4.c | 13 +++++++++++++ redo/windows/radiobuttons.c | 2 -- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/redo/test/page4.c b/redo/test/page4.c index 208af8f5..a68153c0 100644 --- a/redo/test/page4.c +++ b/redo/test/page4.c @@ -32,6 +32,13 @@ static uiCombobox *cbox; static uiCombobox *editable; static uiRadioButtons *rb; +static void appendCBRB(uiButton *b, void *data) +{ + uiComboboxAppend(cbox, "New Item"); + uiComboboxAppend(editable, "New Item"); + uiRadioButtonsAppend(rb, "New Item"); +} + uiBox *makePage4(void) { uiBox *page4; @@ -97,6 +104,12 @@ uiBox *makePage4(void) uiRadioButtonsAppend(rb, "Item 3"); uiBoxAppend(page4, uiControl(rb), 0); + hbox = newHorizontalBox(); + b = uiNewButton("Append"); + uiButtonOnClicked(b, appendCBRB, NULL); + uiBoxAppend(hbox, uiControl(b), 0); + uiBoxAppend(page4, uiControl(hbox), 0); + uiBoxAppend(page4, uiControl(uiNewHorizontalSeparator()), 0); uiBoxAppend(page4, uiControl(uiNewDateTimePicker()), 0); diff --git a/redo/windows/radiobuttons.c b/redo/windows/radiobuttons.c index 54d7a19e..b5f31a5d 100644 --- a/redo/windows/radiobuttons.c +++ b/redo/windows/radiobuttons.c @@ -8,8 +8,6 @@ struct radiobuttons { uintptr_t insertAfter; // safe to be 0 initially (either not in a container or trully the first in the z-order) }; -// TODO properly test parent changes (add an Add Item button to the test program) - uiDefineControlType(uiRadioButtons, uiTypeRadioButtons, struct radiobuttons) static BOOL onWM_COMMAND(uiControl *c, HWND clicked, WORD code, LRESULT *lResult)