summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-05-13 14:19:45 -0400
committerVictor Kareh <[email protected]>2026-05-19 16:21:12 -0400
commit1b104d3b7e603996d5b95c61064d0e646f7dce57 (patch)
tree41462b91d64b6fa57c3bf1a9590530d0c5cde940 /shell
parent42b326d629b18a582e2115bbf40d5488c73c8541 (diff)
downloadatril-1b104d3b7e603996d5b95c61064d0e646f7dce57.tar.bz2
atril-1b104d3b7e603996d5b95c61064d0e646f7dce57.tar.xz
shell: Show highlight annotations in the sidebar
Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/18595cc3
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-sidebar-annotations.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/ev-sidebar-annotations.c b/shell/ev-sidebar-annotations.c
index cc39617f..24ff71ae 100644
--- a/shell/ev-sidebar-annotations.c
+++ b/shell/ev-sidebar-annotations.c
@@ -333,6 +333,7 @@ job_finished_callback (EvJobAnnots *job,
GList *l;
GdkPixbuf *text_icon = NULL;
GdkPixbuf *attachment_icon = NULL;
+ GdkPixbuf *highlight_icon = NULL;
priv = sidebar_annots->priv;
@@ -421,6 +422,15 @@ job_finished_callback (EvJobAnnots *job,
NULL);
}
pixbuf = attachment_icon;
+ } else if (EV_IS_ANNOTATION_TEXT_MARKUP (annot)) {
+ if (!highlight_icon) {
+ highlight_icon = gtk_icon_theme_load_icon (icon_theme,
+ "edit-select-all",
+ GTK_ICON_SIZE_BUTTON,
+ GTK_ICON_LOOKUP_FORCE_REGULAR,
+ NULL);
+ }
+ pixbuf = highlight_icon;
}
gtk_tree_store_append (model, &child_iter, &iter);
@@ -445,6 +455,8 @@ job_finished_callback (EvJobAnnots *job,
g_object_unref (text_icon);
if (attachment_icon)
g_object_unref (attachment_icon);
+ if (highlight_icon)
+ g_object_unref (highlight_icon);
g_object_unref (job);
priv->job = NULL;