- case PROP_STATE:
- /* PROP_STATE is marked as G_PARAM_CONSTRUCT so we always get a
- * call during object construction, even if it is NULL. We treat
- * that first call differently, for a number of reasons.
- *
- * First, we don't want the value to be rejected by the
- * possibly-overridden .set_state() function. Second, we don't
- * want to be tripped by the assertions in g_simple_action_set_state()
- * that would enforce the catch22 that we only provide a value of
- * the same type as the existing value (when there is not yet an
- * existing value).
- */
- if (simple->priv->state_set)
- g_simple_action_set_state (G_ACTION (simple),
- g_value_get_variant (value));
-
- else /* this is the special case */
- {
- /* only do it the first time. */
- simple->priv->state_set = TRUE;
-
- /* blindly set it. */
- simple->priv->state = g_value_dup_variant (value);
- }
- break;
-