GNOME Bugzilla – Bug 682882
python binding can't get the index of a pdf file
Last modified: 2012-09-06 15:26:02 UTC
Created attachment 222636 [details] read_pdf_index.py is a minimal testcase to get the index in a pdf file I am trying to get the index in a pdf file using the pygi bindings, but after finish the JobLinks, the model is None. A testcase is attached. To use it, substitute the pdf uri by one with a index. If the pdf does not have a index, a message is displayed in the command line. I think I am doing the same than in ev-sidebar-links.c
Created attachment 223649 [details] [review] Proposed patch
Created attachment 223651 [details] Updated test case
I found a solution. Attached a patch, and updated the test case.
Review of attachment 223649 [details] [review]: Patch looks good, thanks! I have a few minor comments, though. ::: libview/ev-jobs.c @@ +413,3 @@ +/** + * ev_job_links_get_model Missing trailing : here @@ +415,3 @@ + * ev_job_links_get_model + * @job: #EvJobLinks + * Return value: (transfer none): The GtkTreeModel loaded Leave a blank line between parameters and body. Use #GtkTreeModel @@ +416,3 @@ + * @job: #EvJobLinks + * Return value: (transfer none): The GtkTreeModel loaded + * Get a GtkTreeModel loaded with the links #GtkTreeModel here too. This line goes before the Return value: tag. See other api doc comments. See also the gtk-doc manual for more info: http://developer.gnome.org/gtk-doc-manual/stable/ ::: libview/ev-jobs.h @@ +462,3 @@ GType ev_job_links_get_type (void) G_GNUC_CONST; EvJob *ev_job_links_new (EvDocument *document); +GtkTreeModel* ev_job_links_get_model (EvJobLinks *job); Please follow the existing coding style, the * goes with the function name not the variable, like in ev_job_links_new, and parameters are lined up
Created attachment 223661 [details] [review] New patch, addressing comments
Thanks by the review, attached a new patch with the changes requested. (In reply to comment #4) > Review of attachment 223649 [details] [review]: > > Patch looks good, thanks! I have a few minor comments, though. > > .....
Comment on attachment 223661 [details] [review] New patch, addressing comments Thanks!