After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691214 - introspection fixes
introspection fixes
Status: RESOLVED DUPLICATE of bug 691354
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks: 691215
 
 
Reported: 2013-01-06 06:44 UTC by William Jon McCann
Modified: 2013-01-18 09:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make link action and dest object properties (11.64 KB, patch)
2013-01-06 06:47 UTC, William Jon McCann
committed Details | Review
Add annotations to libdocument (23.34 KB, patch)
2013-01-06 06:47 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2013-01-06 06:44:46 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.
Comment 1 William Jon McCann 2013-01-06 06:47:09 UTC
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.
Comment 2 William Jon McCann 2013-01-06 06:47:12 UTC
Created attachment 232847 [details] [review]
Add annotations to libdocument

To make it more introspectable.
Comment 3 Carlos Garcia Campos 2013-01-08 14:45:14 UTC
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.
Comment 4 William Jon McCann 2013-01-18 09:17:31 UTC
Gah, duplication of work...

*** This bug has been marked as a duplicate of bug 691354 ***