From 46837bbb16002174e67d42c0c0baf8a8e79a2337 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Mon, 15 Apr 2013 12:03:18 +0200 Subject: Delay property installation until run-time --- plugins/ufo/uca-ufo-camera.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins/ufo') diff --git a/plugins/ufo/uca-ufo-camera.c b/plugins/ufo/uca-ufo-camera.c index 145c2ee..c413278 100644 --- a/plugins/ufo/uca-ufo-camera.c +++ b/plugins/ufo/uca-ufo-camera.c @@ -615,13 +615,6 @@ uca_ufo_camera_class_init(UcaUfoCameraClass *klass) -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READABLE); - /* - * This automatic property installation includes the properties created - * dynamically in uca_ufo_camera_new(). - */ - for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) - g_object_class_install_property(gobject_class, id, ufo_properties[id]); - g_type_class_add_private(klass, sizeof(UcaUfoCameraPrivate)); } @@ -630,6 +623,7 @@ uca_ufo_camera_init(UcaUfoCamera *self) { UcaCamera *camera; UcaUfoCameraPrivate *priv; + GObjectClass *oclass; self->priv = priv = UCA_UFO_CAMERA_GET_PRIVATE(self); priv->construct_error = NULL; @@ -638,6 +632,11 @@ uca_ufo_camera_init(UcaUfoCamera *self) if (!setup_pcilib (priv)) return; + oclass = G_OBJECT_GET_CLASS (self); + + for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) + g_object_class_install_property(oclass, id, ufo_properties[id]); + camera = UCA_CAMERA (self); uca_camera_register_unit (camera, "sensor-temperature", UCA_UNIT_DEGREE_CELSIUS); uca_camera_register_unit (camera, "fpga-temperature", UCA_UNIT_DEGREE_CELSIUS); -- cgit v1.2.3