summaryrefslogtreecommitdiffstats
path: root/src/uca-camera.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-08-07 12:33:47 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-08-07 12:33:47 +0200
commitb4beea2f9337014d522436cdf645291e0163d51a (patch)
treedde1ee691608daf3f3e7708e7e7ac2796ac38ebe /src/uca-camera.c
parent9938d9a5d31dba215f9a4cd623b145f12b4ecd2c (diff)
downloaduca-b4beea2f9337014d522436cdf645291e0163d51a.tar.gz
uca-b4beea2f9337014d522436cdf645291e0163d51a.tar.bz2
uca-b4beea2f9337014d522436cdf645291e0163d51a.tar.xz
uca-b4beea2f9337014d522436cdf645291e0163d51a.zip
Reset all property units and warn on override
Diffstat (limited to 'src/uca-camera.c')
-rw-r--r--src/uca-camera.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c
index ae8fea9..8bb7201 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -306,11 +306,22 @@ static void
uca_camera_finalize (GObject *object)
{
UcaCameraPrivate *priv;
+ GParamSpec **props;
+ guint n_props;
priv = UCA_CAMERA_GET_PRIVATE (object);
g_value_array_free (priv->h_binnings);
g_value_array_free (priv->v_binnings);
+ /* We will reset property units of all subclassed objects */
+ props = g_object_class_list_properties (G_OBJECT_GET_CLASS (object), &n_props);
+
+ for (guint i = 0; i < n_props; i++) {
+ g_param_spec_set_qdata (props[i], UCA_UNIT_QUARK, NULL);
+ }
+
+ g_free (props);
+
G_OBJECT_CLASS (uca_camera_parent_class)->finalize (object);
}