[evince/fix_criticals_label_absence] backends: Handle labels as optional on markup annotations
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/fix_criticals_label_absence] backends: Handle labels as optional on markup annotations
- Date: Thu, 30 Jun 2022 00:08:31 +0000 (UTC)
commit 5d9c3d620ceb43668733d421e74628984b8f3b16
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Sat Jun 25 22:13:30 2022 +0100
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
backend/pdf/ev-poppler.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/backend/pdf/ev-poppler.c b/backend/pdf/ev-poppler.c
index b87673412..bc4813140 100644
--- a/backend/pdf/ev-poppler.c
+++ b/backend/pdf/ev-poppler.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]