summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2015-05-13 17:05:31 +0200
committerTimo Dritschler <timo.dritschler@kit.edu>2015-05-19 11:31:01 +0200
commit86d398e2029299e5f7de22263f97d770d146cab2 (patch)
treeef05c5e8ef11d324ba27d9c9ab72857de19bf5e9 /bin
parent106745eed96ac97b9cc5c4250746842a19eaef65 (diff)
downloaduca-86d398e2029299e5f7de22263f97d770d146cab2.tar.gz
uca-86d398e2029299e5f7de22263f97d770d146cab2.tar.bz2
uca-86d398e2029299e5f7de22263f97d770d146cab2.tar.xz
uca-86d398e2029299e5f7de22263f97d770d146cab2.zip
Changed uca-camera-control property handling
GUI now correctly understands that construction only properties can not be modified
Diffstat (limited to 'bin')
-rw-r--r--bin/gui/egg-property-cell-renderer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/gui/egg-property-cell-renderer.c b/bin/gui/egg-property-cell-renderer.c
index 14f0db0..50d1ad9 100644
--- a/bin/gui/egg-property-cell-renderer.c
+++ b/bin/gui/egg-property-cell-renderer.c
@@ -124,6 +124,8 @@ egg_property_cell_renderer_set_renderer (EggPropertyCellRenderer *renderer,
priv = EGG_PROPERTY_CELL_RENDERER_GET_PRIVATE (renderer);
pspec = get_pspec_from_object (priv->object, prop_name);
+ gboolean writable = (pspec->flags & G_PARAM_WRITABLE) && !(pspec->flags & G_PARAM_CONSTRUCT_ONLY);
+
/*
* Set this renderers mode, so that any actions can be forwarded to our
* child renderers.
@@ -181,7 +183,7 @@ egg_property_cell_renderer_set_renderer (EggPropertyCellRenderer *renderer,
g_object_get (priv->object, prop_name, &val, NULL);
g_object_set (priv->renderer,
"active", val,
- "activatable", pspec->flags & G_PARAM_WRITABLE ? TRUE : FALSE,
+ "activatable", writable,
NULL);
break;
}
@@ -251,7 +253,8 @@ egg_property_cell_renderer_set_renderer (EggPropertyCellRenderer *renderer,
break;
}
- if (pspec->flags & G_PARAM_WRITABLE) {
+
+ if (writable) {
if (GTK_IS_CELL_RENDERER_TOGGLE (priv->renderer))
g_object_set (priv->renderer, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
else