More hacking to fix visibility issues on GTK+. This is a mess.
This commit is contained in:
parent
ddf91df764
commit
ef3ed04e2d
|
@ -16,6 +16,7 @@ struct uiUnixControl {
|
||||||
uiControl c;
|
uiControl c;
|
||||||
uiControl *parent;
|
uiControl *parent;
|
||||||
gboolean addedBefore;
|
gboolean addedBefore;
|
||||||
|
gboolean explicitlyHidden;
|
||||||
void (*SetContainer)(uiUnixControl *, GtkContainer *, gboolean);
|
void (*SetContainer)(uiUnixControl *, GtkContainer *, gboolean);
|
||||||
};
|
};
|
||||||
#define uiUnixControl(this) ((uiUnixControl *) (this))
|
#define uiUnixControl(this) ((uiUnixControl *) (this))
|
||||||
|
@ -58,11 +59,13 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool
|
||||||
#define uiUnixControlDefaultShow(type) \
|
#define uiUnixControlDefaultShow(type) \
|
||||||
static void type ## Show(uiControl *c) \
|
static void type ## Show(uiControl *c) \
|
||||||
{ \
|
{ \
|
||||||
|
/*TODO part of massive hack about hidden before*/uiUnixControl(c)->explicitlyHidden=FALSE; \
|
||||||
gtk_widget_show(type(c)->widget); \
|
gtk_widget_show(type(c)->widget); \
|
||||||
}
|
}
|
||||||
#define uiUnixControlDefaultHide(type) \
|
#define uiUnixControlDefaultHide(type) \
|
||||||
static void type ## Hide(uiControl *c) \
|
static void type ## Hide(uiControl *c) \
|
||||||
{ \
|
{ \
|
||||||
|
/*TODO part of massive hack about hidden before*/uiUnixControl(c)->explicitlyHidden=TRUE; \
|
||||||
gtk_widget_hide(type(c)->widget); \
|
gtk_widget_hide(type(c)->widget); \
|
||||||
}
|
}
|
||||||
#define uiUnixControlDefaultEnabled(type) \
|
#define uiUnixControlDefaultEnabled(type) \
|
||||||
|
@ -86,7 +89,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool
|
||||||
{ \
|
{ \
|
||||||
if (!uiUnixControl(c)->addedBefore) { \
|
if (!uiUnixControl(c)->addedBefore) { \
|
||||||
g_object_ref_sink(type(c)->widget); /* our own reference, which we release in Destroy() */ \
|
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; \
|
uiUnixControl(c)->addedBefore = TRUE; \
|
||||||
} \
|
} \
|
||||||
if (remove) \
|
if (remove) \
|
||||||
|
|
Loading…
Reference in New Issue