From 1b104d3b7e603996d5b95c61064d0e646f7dce57 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Wed, 13 May 2026 14:19:45 -0400 Subject: shell: Show highlight annotations in the sidebar Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/18595cc3 --- shell/ev-sidebar-annotations.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'shell') 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; -- cgit v1.2.1