From 16f22576ed249c28006ff28302ff0a1aa3b690de Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 19 Dec 2015 16:56:45 -0500 Subject: [PATCH] Reduced the number of tabs on the first page of the outer tab in the test program. This makes the uiArea tabs more readily accessible on all platforms and keeps the initial size of the main window down on OS X. Also fixed the rpath nonsense on the example makefile too. --- build/GNUmakefile.example | 8 ++++++-- test/main.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/build/GNUmakefile.example b/build/GNUmakefile.example index d366454d..34268a97 100644 --- a/build/GNUmakefile.example +++ b/build/GNUmakefile.example @@ -21,8 +21,12 @@ SUFFIX = $(EXESUFFIX) # TODO merge with the one in build/GNUmakefile.test ifeq ($(TOOLCHAIN),gcc) LDFLAGS += -L$(OUTDIR) -lui - # tell the dynamic loader to search in the executable path for shared objects - LDFLAGS += -Wl,-rpath='$$ORIGIN' + # see build/GNUmakefile.test + ifeq ($(OS),darwin) + LDFLAGS += -Wl,-rpath,@executable_path + else + LDFLAGS += -Wl,-rpath,'$$ORIGIN' + endif else # TODO is there an equivalent to -L? LDFLAGS += $(OUTDIR)/libui.lib diff --git a/test/main.c b/test/main.c index 42534181..0747692d 100644 --- a/test/main.c +++ b/test/main.c @@ -47,6 +47,7 @@ int main(int argc, char *argv[]) uiWindow *w; uiBox *page2, *page3, *page4, *page5, *page6, *page7, *page8; uiTab *outerTab; + uiTab *innerTab; int nomenus = 0; int startspaced = 0; @@ -90,7 +91,7 @@ int main(int argc, char *argv[]) uiBoxAppend(mainBox, uiControl(outerTab), 1); mainTab = newTab(); - uiTabAppend(outerTab, "Original", uiControl(mainTab)); + uiTabAppend(outerTab, "Pages 1-5", uiControl(mainTab)); // page 1 uses page 2's uiGroup page2 = makePage2(); @@ -111,14 +112,17 @@ int main(int argc, char *argv[]) page5 = makePage5(w); uiTabAppend(mainTab, "Page 5", uiControl(page5)); + innerTab = newTab(); + uiTabAppend(outerTab, "Pages 6-8", uiControl(innerTab)); + page6 = makePage6(); - uiTabAppend(mainTab, "Page 6", uiControl(page6)); + uiTabAppend(innerTab, "Page 6", uiControl(page6)); page7 = makePage7(); - uiTabAppend(mainTab, "Page 7", uiControl(page7)); + uiTabAppend(innerTab, "Page 7", uiControl(page7)); // page8 = makePage8(); -// uiTabAppend(outerTab, "Page 8", uiControl(page8)); +// uiTabAppend(innerTab, "Page 8", uiControl(page8)); if (startspaced) setSpaced(1);