diff options
author | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2015-05-19 12:02:36 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2015-05-19 12:02:36 +0200 |
commit | b9388b6b30d8eb66f91c817f0c409c0af3753289 (patch) | |
tree | 5c9062eb0440dbb88b78b92a16ab11b5406e753b /bin | |
parent | 106745eed96ac97b9cc5c4250746842a19eaef65 (diff) | |
parent | 06c5667a7be7b11a87b939e78d41efe90fc437ae (diff) | |
download | uca-b9388b6b30d8eb66f91c817f0c409c0af3753289.tar.gz uca-b9388b6b30d8eb66f91c817f0c409c0af3753289.tar.bz2 uca-b9388b6b30d8eb66f91c817f0c409c0af3753289.tar.xz uca-b9388b6b30d8eb66f91c817f0c409c0af3753289.zip |
Merge pull request #67 from ufo-kit/mock-dynamic-size
Mock dynamic size
Diffstat (limited to 'bin')
-rw-r--r-- | bin/gui/egg-property-cell-renderer.c | 7 |
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 |