diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-07 19:47:44 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-07 19:47:44 -0400 |
| commit | 89643f70f73e76d8b6484255c3460757715ceeb5 (patch) | |
| tree | 6c764526c2d4313d21524255bf9849b87c4b9d09 /new/newcontrol_unix.c | |
| parent | 12021269b7789a680bf1286616505a7546f26d93 (diff) | |
Changed the GTK+ new control system from using g_object_newv() to using g_object_new_valist() due to weird crashes.
Diffstat (limited to 'new/newcontrol_unix.c')
| -rw-r--r-- | new/newcontrol_unix.c | 8 |
1 files changed, 6 insertions, 2 deletions
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? |
