diff --git a/ui_unix.h b/ui_unix.h index 5a91257b..23269186 100644 --- a/ui_unix.h +++ b/ui_unix.h @@ -16,6 +16,7 @@ struct uiUnixControl { uiControl c; uiControl *parent; gboolean addedBefore; + gboolean explicitlyHidden; void (*SetContainer)(uiUnixControl *, GtkContainer *, gboolean); }; #define uiUnixControl(this) ((uiUnixControl *) (this)) @@ -58,11 +59,13 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool #define uiUnixControlDefaultShow(type) \ static void type ## Show(uiControl *c) \ { \ + /*TODO part of massive hack about hidden before*/uiUnixControl(c)->explicitlyHidden=FALSE; \ gtk_widget_show(type(c)->widget); \ } #define uiUnixControlDefaultHide(type) \ static void type ## Hide(uiControl *c) \ { \ + /*TODO part of massive hack about hidden before*/uiUnixControl(c)->explicitlyHidden=TRUE; \ gtk_widget_hide(type(c)->widget); \ } #define uiUnixControlDefaultEnabled(type) \ @@ -86,7 +89,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool { \ if (!uiUnixControl(c)->addedBefore) { \ g_object_ref_sink(type(c)->widget); /* our own reference, which we release in Destroy() */ \ - gtk_widget_show(type(c)->widget); \ + /*TODO*/if(!uiUnixControl(c)->explicitlyHidden) gtk_widget_show(type(c)->widget); \ uiUnixControl(c)->addedBefore = TRUE; \ } \ if (remove) \