More of the last few commits, now on the GTK+ backend. THAT ONE WORKS...
This commit is contained in:
parent
300e28be55
commit
21f122161e
|
@ -29,24 +29,21 @@ static uintptr_t singleHandle(uiControl *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void singleSetParent(uiControl *c, uiParent *parent)
|
static void singleSetParent(uiControl *c, uiParent *parent)
|
||||||
{
|
|
||||||
singleWidget *s = (singleWidget *) (c->internal);
|
|
||||||
|
|
||||||
s->parent = parent;
|
|
||||||
gtk_container_add(GTK_CONTAINER(uiParentHandle(s->parent)), s->immediate);
|
|
||||||
uiParentUpdate(s->parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void singleRemoveParent(uiControl *c)
|
|
||||||
{
|
{
|
||||||
singleWidget *s = (singleWidget *) (c->internal);
|
singleWidget *s = (singleWidget *) (c->internal);
|
||||||
uiParent *oldparent;
|
uiParent *oldparent;
|
||||||
|
|
||||||
oldparent = s->parent;
|
oldparent = s->parent;
|
||||||
s->parent = NULL;
|
s->parent = parent;
|
||||||
gtk_container_remove(GTK_CONTAINER(oldparent), s->immediate);
|
if (oldparent != NULL) {
|
||||||
|
gtk_container_remove(GTK_CONTAINER(uiParentHandle(oldparent)), s->immediate);
|
||||||
uiParentUpdate(oldparent);
|
uiParentUpdate(oldparent);
|
||||||
}
|
}
|
||||||
|
if (s->parent != NULL) {
|
||||||
|
gtk_container_add(GTK_CONTAINER(uiParentHandle(s->parent)), s->immediate);
|
||||||
|
uiParentUpdate(s->parent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void singlePreferredSize(uiControl *c, uiSizing *d, intmax_t *width, intmax_t *height)
|
static void singlePreferredSize(uiControl *c, uiSizing *d, intmax_t *width, intmax_t *height)
|
||||||
{
|
{
|
||||||
|
@ -209,7 +206,6 @@ uiControl *uiUnixNewControl(GType type, gboolean inScrolledWindow, gboolean scro
|
||||||
c->destroy = singleDestroy;
|
c->destroy = singleDestroy;
|
||||||
c->handle = singleHandle;
|
c->handle = singleHandle;
|
||||||
c->setParent = singleSetParent;
|
c->setParent = singleSetParent;
|
||||||
c->removeParent = singleRemoveParent;
|
|
||||||
c->preferredSize = singlePreferredSize;
|
c->preferredSize = singlePreferredSize;
|
||||||
c->resize = singleResize;
|
c->resize = singleResize;
|
||||||
c->visible = singleVisible;
|
c->visible = singleVisible;
|
||||||
|
|
Loading…
Reference in New Issue