GNOME Bugzilla – Bug 691214
introspection fixes
Last modified: 2013-01-18 09:17:31 UTC
Trying to use libdocument from javascript I noticed a couple problems. The first is that a couple of properties are stored as pointers instead of objects. The second is that we're missing a bunch of annotations.
Created attachment 232846 [details] [review] Make link action and dest object properties Instead of pointer properties. This allows them to be properly refcounted and used from binding languages.
Created attachment 232847 [details] [review] Add annotations to libdocument To make it more introspectable.
Review of attachment 232846 [details] [review]: Looks good to me, thanks!. Please, address review comments before committing. ::: libdocument/ev-link-action.c @@ +190,3 @@ + g_clear_object (&action->priv->dest); + action->priv->dest = g_object_ref (dest); + g_object_notify (G_OBJECT (action), "dest"); We don't need all this, because the property is construct only. This will never be called more than once @@ +206,3 @@ break; case PROP_DEST: + ev_link_action_set_dest (self, g_value_get_object (value)); Here you can simply use self->priv->dest = g_value_dup_object (value); ::: libdocument/ev-link.c @@ +97,3 @@ + g_clear_object (&link->priv->action); + link->priv->action = g_object_ref (action); + g_object_notify (G_OBJECT (link), "action"); Same here. @@ +113,3 @@ break; case PROP_ACTION: + ev_link_set_action (self, g_value_get_object (value)); And here.
Gah, duplication of work... *** This bug has been marked as a duplicate of bug 691354 ***