From d57df09f0ed39c757c6204c35acd1453197c2bf8 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 4 May 2015 00:16:31 -0400 Subject: [PATCH] Fixed a latent bug with uiTab on GTK+. --- unix/tab.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/unix/tab.c b/unix/tab.c index 8a04cb54..b754584c 100644 --- a/unix/tab.c +++ b/unix/tab.c @@ -39,6 +39,14 @@ static void onDestroy(void *data) uiFree(t); } +static void tabShow(uiControl *c) +{ + struct tab *t = (struct tab *) t; + + // don't call gtk_widget_show_all() like the default handler does; that'll override user hiding + gtk_widget_show(t->widget); +} + #define tabCapGrow 32 static void tabAppendPage(uiTab *tt, const char *name, uiControl *child) @@ -122,6 +130,8 @@ uiTab *uiNewTab(void) t->container = GTK_CONTAINER(t->widget); t->notebook = GTK_NOTEBOOK(t->widget); + uiControl(t)->Show = tabShow; + uiTab(t)->AppendPage = tabAppendPage; uiTab(t)->DeletePage = tabDeletePage; uiTab(t)->NumPages = tabNumPages;