diff --git a/test/main.c b/test/main.c index 08840af6..9ca5197e 100644 --- a/test/main.c +++ b/test/main.c @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) const char *err; uiWindow *w; uiTab *tab; - uiBox *page1, *page2; + uiBox *page2; memset(&o, 0, sizeof (uiInitOptions)); for (i = 1; i < argc; i++) @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) tab = newTab(); uiBoxAppend(mainBox, uiControl(tab), 1); - page1 = makePage1(w); + makePage1(w); uiTabAppendPage(tab, "Page 1", uiControl(page1)); page2 = makePage2(); diff --git a/test/page1.c b/test/page1.c index a688083a..eeca20f1 100644 --- a/test/page1.c +++ b/test/page1.c @@ -52,9 +52,10 @@ SHED(hide, Hide) SHED(enable, Enable) SHED(disable, Disable) -uiBox *makePage1(uiWindow *w) +uiBox *page1; + +void makePage1(uiWindow *w) { - uiBox *page1; uiButton *getButton, *setButton; uiBox *hbox; uiBox *testBox; @@ -151,6 +152,4 @@ uiBox *makePage1(uiWindow *w) uiBoxAppend(page1, uiControl(hbox), 0); uiBoxAppend(page1, uiControl(label), 0); - - return page1; } diff --git a/test/test.h b/test/test.h index fec80556..3675b282 100644 --- a/test/test.h +++ b/test/test.h @@ -22,7 +22,8 @@ extern uiTab *newTab(void); extern void initMenus(void); // page1.c -extern uiBox *makePage1(uiWindow *); +extern uiBox *page1; +extern void makePage1(uiWindow *); // page2.c extern uiBox *makePage2(void);