[evince] shell: adding annotation squiggly.



commit 9f790bed4d091aea0e60058fe1e77c85d5503116
Author: Philipp Reinkemeier <philipp reinkemeier offis de>
Date:   Mon Jun 8 18:57:02 2015 +0200

    shell: adding annotation squiggly.
    
    Underline icon is used for squiggly annotations in the sidebar.
    Squiggly is now a supported markup type, selectable in the combo
    list in the annotation property dialog.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750612

 shell/ev-annotation-properties-dialog.c |    1 +
 shell/ev-sidebar-annotations.c          |   11 +++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/shell/ev-annotation-properties-dialog.c b/shell/ev-annotation-properties-dialog.c
index 6cb25fd..01e83b6 100644
--- a/shell/ev-annotation-properties-dialog.c
+++ b/shell/ev-annotation-properties-dialog.c
@@ -129,6 +129,7 @@ ev_annotation_properties_dialog_constructed (GObject *object)
                 gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dialog->text_markup_type), 
_("Highlight"));
                 gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dialog->text_markup_type), _("Strike 
out"));
                 gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dialog->text_markup_type), 
_("Underline"));
+                gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dialog->text_markup_type), 
_("Squiggly"));
                 gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->text_markup_type), 0);
                 gtk_grid_attach (GTK_GRID (grid), dialog->text_markup_type, 1, 5, 1, 1);
                 gtk_widget_set_hexpand (dialog->text_markup_type, TRUE);
diff --git a/shell/ev-sidebar-annotations.c b/shell/ev-sidebar-annotations.c
index 976482b..d99a9f2 100644
--- a/shell/ev-sidebar-annotations.c
+++ b/shell/ev-sidebar-annotations.c
@@ -398,6 +398,7 @@ job_finished_callback (EvJobAnnots          *job,
         GdkPixbuf *highlight_icon = NULL;
         GdkPixbuf *strike_out_icon = NULL;
         GdkPixbuf *underline_icon = NULL;
+        GdkPixbuf *squiggly_icon = NULL;
 
        priv = sidebar_annots->priv;
 
@@ -508,6 +509,14 @@ job_finished_callback (EvJobAnnots          *job,
                                         }
                                         pixbuf = underline_icon;
                                         break;
+                                case EV_ANNOTATION_TEXT_MARKUP_SQUIGGLY:
+                                        if (!squiggly_icon) {
+                                                squiggly_icon = gtk_widget_render_icon_pixbuf 
(priv->tree_view,
+                                                                                               
GTK_STOCK_UNDERLINE,
+                                                                                               
GTK_ICON_SIZE_BUTTON);
+                                        }
+                                        pixbuf = squiggly_icon;
+                                        break;
                                 }
                         }
 
@@ -539,6 +548,8 @@ job_finished_callback (EvJobAnnots          *job,
                 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]