1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-07-02 15:48:59 +00:00

backends: Handle labels as optional on markup annotations

Label is an optional property of a markup annotation, so when Evince
reads markup annotations which have no label it should not print
critical messages.

Therefore, fon't set label property with a NULL value in
ev_annot_from_poppler_annot() function of ev-poppler.c because
otherwise a critical message will be printed to the console.

Fixes #1814
This commit is contained in:
Nelson Benítez León 2022-06-25 22:13:30 +01:00 committed by Germán Poo-Caamaño
parent bd503c72b3
commit 5d9c3d620c

View File

@ -2979,10 +2979,11 @@ ev_annot_from_poppler_annot (PopplerAnnot *poppler_annot,
}
label = poppler_annot_markup_get_label (markup);
if (label)
g_object_set (ev_annot, "label", label, NULL);
opacity = poppler_annot_markup_get_opacity (markup);
g_object_set (ev_annot,
"label", label,
"opacity", opacity,
"can_have_popup", TRUE,
NULL);