summaryrefslogtreecommitdiffstats
path: root/src/cameras
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-07-12 08:50:26 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-07-12 08:50:26 +0200
commit29c2b827b09ba8138059a1c1e5db967ab2029ced (patch)
tree7113dd33cc9db59a23508d40948ec9f722c4819b /src/cameras
parent7854c5521383d07ead9c8d9693c31a0be26f2351 (diff)
downloaduca-29c2b827b09ba8138059a1c1e5db967ab2029ced.tar.gz
uca-29c2b827b09ba8138059a1c1e5db967ab2029ced.tar.bz2
uca-29c2b827b09ba8138059a1c1e5db967ab2029ced.tar.xz
uca-29c2b827b09ba8138059a1c1e5db967ab2029ced.zip
Fix LU-26: make "name" a base property
Diffstat (limited to 'src/cameras')
-rw-r--r--src/cameras/uca-mock-camera.c4
-rw-r--r--src/cameras/uca-pco-camera.c4
-rw-r--r--src/cameras/uca-pf-camera.c14
-rw-r--r--src/cameras/uca-ufo-camera.c10
4 files changed, 10 insertions, 22 deletions
diff --git a/src/cameras/uca-mock-camera.c b/src/cameras/uca-mock-camera.c
index a149e5b..59c5ae8 100644
--- a/src/cameras/uca-mock-camera.c
+++ b/src/cameras/uca-mock-camera.c
@@ -28,6 +28,7 @@ enum {
};
static const gint mock_overrideables[] = {
+ PROP_NAME,
PROP_SENSOR_WIDTH,
PROP_SENSOR_HEIGHT,
PROP_SENSOR_BITDEPTH,
@@ -286,6 +287,9 @@ static void uca_mock_camera_get_property(GObject *object, guint property_id, GVa
UcaMockCameraPrivate *priv = UCA_MOCK_CAMERA_GET_PRIVATE(object);
switch (property_id) {
+ case PROP_NAME:
+ g_value_set_string(value, "mock camera");
+ break;
case PROP_SENSOR_WIDTH:
g_value_set_uint(value, priv->width);
break;
diff --git a/src/cameras/uca-pco-camera.c b/src/cameras/uca-pco-camera.c
index 5a52834..a56392f 100644
--- a/src/cameras/uca-pco-camera.c
+++ b/src/cameras/uca-pco-camera.c
@@ -93,8 +93,7 @@ GQuark uca_pco_camera_error_quark()
}
enum {
- PROP_NAME = N_BASE_PROPERTIES,
- PROP_SENSOR_EXTENDED,
+ PROP_SENSOR_EXTENDED = N_BASE_PROPERTIES,
PROP_SENSOR_WIDTH_EXTENDED,
PROP_SENSOR_HEIGHT_EXTENDED,
PROP_SENSOR_TEMPERATURE,
@@ -118,6 +117,7 @@ enum {
};
static gint base_overrideables[] = {
+ PROP_NAME,
PROP_SENSOR_WIDTH,
PROP_SENSOR_HEIGHT,
PROP_SENSOR_BITDEPTH,
diff --git a/src/cameras/uca-pf-camera.c b/src/cameras/uca-pf-camera.c
index 3bbd406..90f887b 100644
--- a/src/cameras/uca-pf-camera.c
+++ b/src/cameras/uca-pf-camera.c
@@ -62,6 +62,7 @@ GQuark uca_pf_camera_error_quark()
}
static gint base_overrideables[] = {
+ PROP_NAME,
PROP_SENSOR_WIDTH,
PROP_SENSOR_HEIGHT,
PROP_SENSOR_BITDEPTH,
@@ -81,12 +82,10 @@ static gint base_overrideables[] = {
};
enum {
- PROP_NAME = N_BASE_PROPERTIES,
+ PROP_FOO = N_BASE_PROPERTIES,
N_PROPERTIES
};
-static GParamSpec *pf_properties[N_PROPERTIES] = { NULL, };
-
struct _UcaPfCameraPrivate {
guint roi_width;
@@ -337,15 +336,6 @@ static void uca_pf_camera_class_init(UcaPfCameraClass *klass)
for (guint i = 0; base_overrideables[i] != 0; i++)
g_object_class_override_property(gobject_class, base_overrideables[i], uca_camera_props[base_overrideables[i]]);
- pf_properties[PROP_NAME] =
- g_param_spec_string("name",
- "Name of the camera",
- "Name of the camera",
- "", G_PARAM_READABLE);
-
- for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++)
- g_object_class_install_property(gobject_class, id, pf_properties[id]);
-
g_type_class_add_private(klass, sizeof(UcaPfCameraPrivate));
}
diff --git a/src/cameras/uca-ufo-camera.c b/src/cameras/uca-ufo-camera.c
index de8b128..347f3c1 100644
--- a/src/cameras/uca-ufo-camera.c
+++ b/src/cameras/uca-ufo-camera.c
@@ -54,12 +54,12 @@ GQuark uca_ufo_camera_error_quark()
}
enum {
- PROP_NAME = N_BASE_PROPERTIES,
- PROP_UFO_START,
+ PROP_UFO_START = N_BASE_PROPERTIES,
N_MAX_PROPERTIES = 512
};
static gint base_overrideables[] = {
+ PROP_NAME,
PROP_SENSOR_WIDTH,
PROP_SENSOR_HEIGHT,
PROP_SENSOR_HORIZONTAL_BINNING,
@@ -389,12 +389,6 @@ static void uca_ufo_camera_class_init(UcaUfoCameraClass *klass)
for (guint i = 0; base_overrideables[i] != 0; i++)
g_object_class_override_property(gobject_class, base_overrideables[i], uca_camera_props[base_overrideables[i]]);
- ufo_properties[PROP_NAME] =
- g_param_spec_string("name",
- "Name of the camera",
- "Name of the camera",
- "", G_PARAM_READABLE);
-
/*
* This automatic property installation includes the properties created
* dynamically in uca_ufo_camera_new().