[evince/wip/highlight: 3/16] Support reading poppler highlight annotation



commit aa931a8d5efe352d962710d81e34af8420203ca5
Author: Giselle Reis <gisellemnr src gnome org>
Date:   Thu Aug 7 16:18:16 2014 +0200

    Support reading poppler highlight annotation
    
    Highlight annotations are recognized and appear in
    the sidebar annotation list with an icon.

 backend/pdf/ev-poppler.cc      |    5 ++++-
 shell/ev-sidebar-annotations.c |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 631eab4..d6a3b6a 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -2872,6 +2872,10 @@ ev_annot_from_poppler_annot (PopplerAnnot *poppler_annot,
                                g_object_unref (poppler_attachment);
                }
                        break;
+               case POPPLER_ANNOT_HIGHLIGHT: {
+                       ev_annot = ev_annotation_text_markup_highlight_new (page);
+               }
+                       break;
                case POPPLER_ANNOT_LINK:
                case POPPLER_ANNOT_WIDGET:
                        /* Ignore link and widgets annots since they are already handled */
@@ -2879,7 +2883,6 @@ ev_annot_from_poppler_annot (PopplerAnnot *poppler_annot,
                case POPPLER_ANNOT_3D:
                case POPPLER_ANNOT_CARET:
                case POPPLER_ANNOT_FREE_TEXT:
-               case POPPLER_ANNOT_HIGHLIGHT:
                case POPPLER_ANNOT_LINE:
                case POPPLER_ANNOT_SCREEN:
                case POPPLER_ANNOT_SOUND:
diff --git a/shell/ev-sidebar-annotations.c b/shell/ev-sidebar-annotations.c
index f40aba4..6d6a735 100644
--- a/shell/ev-sidebar-annotations.c
+++ b/shell/ev-sidebar-annotations.c
@@ -426,7 +426,7 @@ job_finished_callback (EvJobAnnots          *job,
                                markup = g_strdup_printf ("<span weight=\"bold\">%s</span>", label);
                        }
 
-                       if (EV_IS_ANNOTATION_TEXT (annot)) {
+                       if (EV_IS_ANNOTATION_TEXT (annot) || EV_IS_ANNOTATION_TEXT_MARKUP (annot)) {
                                if (!text_icon) {
                                        /* FIXME: use a better icon than EDIT */
                                        text_icon = gtk_widget_render_icon_pixbuf (priv->tree_view,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]