<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Add implementation of Square and Circle annotations"
href="https://bugs.freedesktop.org/show_bug.cgi?id=70983#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Add implementation of Square and Circle annotations"
href="https://bugs.freedesktop.org/show_bug.cgi?id=70983">bug 70983</a>
from <span class="vcard"><a class="email" href="mailto:carlosgc@gnome.org" title="Carlos Garcia Campos <carlosgc@gnome.org>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=89941" name="attach_89941" title="glib: Add implementation of Square and Circle annotations">attachment 89941</a> <a href="attachment.cgi?id=89941&action=edit" title="glib: Add implementation of Square and Circle annotations">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=70983&attachment=89941'>[review]</a>
glib: Add implementation of Square and Circle annotations
Review of <span class=""><a href="attachment.cgi?id=89941" name="attach_89941" title="glib: Add implementation of Square and Circle annotations">attachment 89941</a> <a href="attachment.cgi?id=89941&action=edit" title="glib: Add implementation of Square and Circle annotations">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=70983&attachment=89941'>[review]</a>:
-----------------------------------------------------------------
Pushed the patch after addressing my comments below. Thank you very much.
::: glib/poppler-annot.cc
@@ +425,5 @@
<span class="quote">> + *
> + * Creates a new Circle annotation that will be
> + * located on @rect when added to a page. See
> + * poppler_page_add_annot()
> +*</span >
This is wrongly indented.
@@ +426,5 @@
<span class="quote">> + * Creates a new Circle annotation that will be
> + * located on @rect when added to a page. See
> + * poppler_page_add_annot()
> +*
> +* Creates a new empty #PopplerAnnotCircle circle.</span >
This line looks redundant
@@ +428,5 @@
<span class="quote">> + * poppler_page_add_annot()
> +*
> +* Creates a new empty #PopplerAnnotCircle circle.
> +*
> +* Return value: a newly #PopplerAnnotCircle annotation</span >
newly created
@@ +470,5 @@
<span class="quote">> + * Creates a new Square annotation that will be
> + * located on @rect when added to a page. See
> + * poppler_page_add_annot()
> + *
> + * Return value: a newly #PopplerAnnotSquare annotation</span >
newly created
@@ +691,5 @@
<span class="quote">> poppler_annot->annot->setFlags ((guint) flags);
> }
>
> +static PopplerColor *
> +_poppler_new_poppler_color (AnnotColor *color)</span >
We don't use the _ prefix for private static functions, but only for private
functions declared in a header file. The name is a bit confusing, it could be
called create_poppler_color_from_annot_color
@@ +727,5 @@
<span class="quote">> return poppler_color;
> }
>
> +static AnnotColor *
> +_poppler_new_annot_color (PopplerColor *poppler_color)</span >
And this create_annot_color_from_poppler_color
@@ +729,5 @@
<span class="quote">>
> +static AnnotColor *
> +_poppler_new_annot_color (PopplerColor *poppler_color)
> +{
> + AnnotColor *color = NULL;</span >
We don't need the local variable if we return early when passed in pointer is
NULL and then we can just return new AnnotColor()
@@ +1635,5 @@
<span class="quote">> +{
> + AnnotGeometry *annot;
> +
> + g_return_val_if_fail (POPPLER_IS_ANNOT_CIRCLE (poppler_annot) ||
> + POPPLER_IS_ANNOT_SQUARE (poppler_annot), NULL);</span >
Do not use g_return macros in private methods. Also these checks are already
done by the callers.
@@ +1649,5 @@
<span class="quote">> +{
> + AnnotGeometry *annot;
> +
> + g_return_if_fail (POPPLER_IS_ANNOT_CIRCLE (poppler_annot) ||
> + POPPLER_IS_ANNOT_SQUARE (poppler_annot));</span >
Ditto.
@@ +1679,5 @@
<span class="quote">> +}
> +
> +/**
> + * poppler_annot_circle_set_interior_color:
> + * @poppler_annot: a #PopplerAnnot</span >
a #PopplerAnnotCircle
@@ +1717,5 @@
<span class="quote">> +}
> +
> +/**
> + * poppler_annot_square_set_interior_color:
> + * @poppler_annot: a #PopplerAnnot</span >
a #PopplerAnnotSquare</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>