From 89643f70f73e76d8b6484255c3460757715ceeb5 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 7 Apr 2015 19:47:44 -0400 Subject: Changed the GTK+ new control system from using g_object_newv() to using g_object_new_valist() due to weird crashes. --- new/newcontrol_unix.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'new/newcontrol_unix.c') diff --git a/new/newcontrol_unix.c b/new/newcontrol_unix.c index 3123685..87aa105 100644 --- a/new/newcontrol_unix.c +++ b/new/newcontrol_unix.c @@ -60,12 +60,16 @@ static void singleContainerHide(uiControl *c) // TODO connect free function -uiControl *uiUnixNewControl(GType type, guint nConstructParams, GParameter *constructParams, gboolean inScrolledWindow, gboolean needsViewport, gboolean scrolledWindowHasBorder, void *data) +uiControl *uiUnixNewControl(GType type, gboolean inScrolledWindow, gboolean needsViewport, gboolean scrolledWindowHasBorder, void *data, const char *firstProperty, ...) { uiSingleWidgetControl *c; + va_list ap; c = uiNew(uiSingleWidgetControl); - c->widget = GTK_WIDGET(g_object_newv(type, nConstructParams, constructParams)); + + va_start(ap, firstProperty); + c->widget = GTK_WIDGET(g_object_new_valist(type, firstProperty, ap)); + va_end(ap); c->immediate = c->widget; // TODO turn into bit field? -- cgit v1.2.3