summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--new/TODO.md1
-rw-r--r--new/container_unix.c7
-rw-r--r--new/newcontrol_unix.c3
-rw-r--r--new/window_unix.c3
4 files changed, 12 insertions, 2 deletions
diff --git a/new/TODO.md b/new/TODO.md
index 5c7ae0b..cc5c6c4 100644
--- a/new/TODO.md
+++ b/new/TODO.md
@@ -7,6 +7,7 @@
- GWL(P)_ID
- make sure all terminology is consistent
- 32-bit Mac OS X support (requires lots of code changes)
+- add a test for hidden controls when a window is shown
ultimately:
- make everything vtable-based
diff --git a/new/container_unix.c b/new/container_unix.c
index 5ee421c..ec5d2f0 100644
--- a/new/container_unix.c
+++ b/new/container_unix.c
@@ -117,7 +117,12 @@ static void uiContainer_class_init(uiContainerClass *class)
GtkWidget *newContainer(void)
{
- return GTK_WIDGET(g_object_new(uiContainerType, NULL));
+ GtkWidget *w;
+
+ w = GTK_WIDGET(g_object_new(uiContainerType, NULL));
+ // call gtk_widget_show_all() here to make the container visible
+ gtk_widget_show_all(w);
+ return w;
}
void updateParent(uintptr_t parent)
diff --git a/new/newcontrol_unix.c b/new/newcontrol_unix.c
index 0f6388b..feedafe 100644
--- a/new/newcontrol_unix.c
+++ b/new/newcontrol_unix.c
@@ -221,6 +221,9 @@ uiControl *uiUnixNewControl(GType type, gboolean inScrolledWindow, gboolean scro
// and let's free everything with the immediate widget
g_signal_connect(s->immediate, "destroy", G_CALLBACK(onDestroy), c);
+ // finally, call gtk_widget_show_all() here to set the initial visibility of the widget
+ gtk_widget_show_all(s->immediate);
+
c->internal = s;
return c;
}
diff --git a/new/window_unix.c b/new/window_unix.c
index c4ec6d4..d627335 100644
--- a/new/window_unix.c
+++ b/new/window_unix.c
@@ -68,7 +68,8 @@ void uiWindowSetTitle(uiWindow *w, const char *title)
void uiWindowShow(uiWindow *w)
{
- gtk_widget_show_all(w->widget);
+ // don't use gtk_widget_show_all(); that will override user hidden settings
+ gtk_widget_show(w->widget);
}
void uiWindowHide(uiWindow *w)