[evince] shell: Show annotation contents in sidebar when available
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: Show annotation contents in sidebar when available
- Date: Sat, 26 Jun 2021 20:18:12 +0000 (UTC)
commit aeccfc35a93138617e460052fc8515df9ae4e2a4
Author: Mads Chr. Olesen <mads mchro dk>
Date: Wed Jan 15 20:03:10 2020 +0100
shell: Show annotation contents in sidebar when available
Most annotations can have content associated (e.g. a comment
on a highlighted text, the comment inside a post-it like note).
We dislpay that content in the sidebar, as it is saves times to
the user, and it is convenient to have there for revision.
That is, without the user going annotation after annotation to
review each content.
Fixes #386
shell/ev-sidebar-annotations.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/shell/ev-sidebar-annotations.c b/shell/ev-sidebar-annotations.c
index f7961276..9e325ef5 100644
--- a/shell/ev-sidebar-annotations.c
+++ b/shell/ev-sidebar-annotations.c
@@ -408,6 +408,7 @@ job_finished_callback (EvJobAnnots *job,
EvAnnotation *annot;
const gchar *label;
const gchar *modified;
+ const gchar *contents;
gchar *markup;
GtkTreeIter child_iter;
GdkPixbuf *pixbuf = NULL;
@@ -418,7 +419,10 @@ job_finished_callback (EvJobAnnots *job,
label = ev_annotation_markup_get_label (EV_ANNOTATION_MARKUP (annot));
modified = ev_annotation_get_modified (annot);
- if (modified) {
+ contents = ev_annotation_get_contents (annot);
+ if (contents) {
+ markup = g_strdup_printf ("%s", contents);
+ } else if (modified) {
markup = g_strdup_printf ("<span weight=\"bold\">%s</span>\n%s",
label, modified);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]