summaryrefslogtreecommitdiff
path: root/shell/ev-sidebar-annotations.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ev-sidebar-annotations.c')
-rw-r--r--shell/ev-sidebar-annotations.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/shell/ev-sidebar-annotations.c b/shell/ev-sidebar-annotations.c
index cc39617f..0c75656b 100644
--- a/shell/ev-sidebar-annotations.c
+++ b/shell/ev-sidebar-annotations.c
@@ -333,6 +333,10 @@ job_finished_callback (EvJobAnnots *job,
GList *l;
GdkPixbuf *text_icon = NULL;
GdkPixbuf *attachment_icon = NULL;
+ GdkPixbuf *highlight_icon = NULL;
+ GdkPixbuf *strike_out_icon = NULL;
+ GdkPixbuf *underline_icon = NULL;
+ GdkPixbuf *squiggly_icon = NULL;
priv = sidebar_annots->priv;
@@ -421,6 +425,51 @@ job_finished_callback (EvJobAnnots *job,
NULL);
}
pixbuf = attachment_icon;
+ } else if (EV_IS_ANNOTATION_TEXT_MARKUP (annot)) {
+ switch (ev_annotation_text_markup_get_markup_type (EV_ANNOTATION_TEXT_MARKUP (annot))) {
+ case EV_ANNOTATION_TEXT_MARKUP_HIGHLIGHT:
+ 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;
+ break;
+ case EV_ANNOTATION_TEXT_MARKUP_STRIKE_OUT:
+ if (!strike_out_icon) {
+ strike_out_icon = gtk_icon_theme_load_icon (icon_theme,
+ "format-text-strikethrough",
+ GTK_ICON_SIZE_BUTTON,
+ GTK_ICON_LOOKUP_FORCE_REGULAR,
+ NULL);
+ }
+ pixbuf = strike_out_icon;
+ break;
+ case EV_ANNOTATION_TEXT_MARKUP_UNDERLINE:
+ if (!underline_icon) {
+ underline_icon = gtk_icon_theme_load_icon (icon_theme,
+ "format-text-underline",
+ GTK_ICON_SIZE_BUTTON,
+ GTK_ICON_LOOKUP_FORCE_REGULAR,
+ NULL);
+ }
+ pixbuf = underline_icon;
+ break;
+ case EV_ANNOTATION_TEXT_MARKUP_SQUIGGLY:
+ if (!squiggly_icon) {
+ squiggly_icon = gtk_icon_theme_load_icon (icon_theme,
+ "format-text-underline",
+ GTK_ICON_SIZE_BUTTON,
+ GTK_ICON_LOOKUP_FORCE_REGULAR,
+ NULL);
+ }
+ pixbuf = squiggly_icon;
+ break;
+ default:
+ break;
+ }
}
gtk_tree_store_append (model, &child_iter, &iter);
@@ -445,6 +494,14 @@ 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);
+ if (strike_out_icon)
+ g_object_unref (strike_out_icon);
+ if (underline_icon)
+ g_object_unref (underline_icon);
+ if (squiggly_icon)
+ g_object_unref (squiggly_icon);
g_object_unref (job);
priv->job = NULL;