[Poppler-bugs] [Bug 64821] [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Feb 9 17:26:57 CET 2014


https://bugs.freedesktop.org/show_bug.cgi?id=64821

--- Comment #53 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 90268
  --> https://bugs.freedesktop.org/attachment.cgi?id=90268
[PATCH v12 11/11] glib-demo: Pane showing the document structure

Review of attachment 90268:
-----------------------------------------------------------------

::: glib/demo/main.c
@@ +66,4 @@
>  	{ "Attachments",      pgd_attachments_create_widget },
>  	{ "Layers",           pgd_layers_create_widget },
>  	{ "Text",             pgd_text_create_widget },
> +    { "Tagged Structure", pgd_taggedstruct_create_widget },

Bad indented.

::: glib/demo/taggedstruct.c
@@ +52,5 @@
> +
> +static void
> +populate_store_aux (GtkTreeStore *store, GtkTreeIter *parent, PopplerStructureElementIter *iter)
> +{
> +  g_print ("iter %p\n", iter);

Remove this.

@@ +95,5 @@
> +}
> +
> +
> +static void
> +pgd_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)

You can use PgdTaggedStructDemo *demo directly instead of user_data since you
are using a cast for the callback in g_signal_connect

@@ +138,5 @@
> +    }
> +
> +  gtk_label_set_text (GTK_LABEL (demo->link_target), "");
> +  if (poppler_structure_element_get_reference_type (element) ==
> +      POPPLER_STRUCTURE_REFERENCE_LINK)

I haven't found the patch that adds the reference link.

@@ +250,5 @@
> +                    G_CALLBACK (pgd_row_activated),
> +                    demo);
> +  g_signal_connect (demo->view, "cursor-changed",
> +                    G_CALLBACK (pgd_cursor_changed),
> +                    demo);

I think GtkTreeSelection::changed is what you want instead of these two
signals.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20140209/4ec0c928/attachment.html>


More information about the Poppler-bugs mailing list