summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2013-04-15 12:03:18 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2013-04-15 12:04:59 +0200
commit46837bbb16002174e67d42c0c0baf8a8e79a2337 (patch)
tree6886c8d4f073c1ceb7c86f25db198d04e0f6f475 /plugins
parent078d3c26da875e22c28ef3f80583f3a2f670f01e (diff)
downloaduca-46837bbb16002174e67d42c0c0baf8a8e79a2337.tar.gz
uca-46837bbb16002174e67d42c0c0baf8a8e79a2337.tar.bz2
uca-46837bbb16002174e67d42c0c0baf8a8e79a2337.tar.xz
uca-46837bbb16002174e67d42c0c0baf8a8e79a2337.zip
Delay property installation until run-time
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ufo/uca-ufo-camera.c13
1 files changed, 6 insertions, 7 deletions
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);