Fixed a latent bug with uiTab on GTK+.

This commit is contained in:
Pietro Gagliardi 2015-05-04 00:16:31 -04:00
parent 4ba0f795eb
commit d57df09f0e
1 changed files with 10 additions and 0 deletions

View File

@ -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;