]> www.fi.muni.cz Git - evince.git/blobdiff - libview/ev-view.c
Add options to open and save attachment annotations to context menu
[evince.git] / libview / ev-view.c
index effbd362e0eb44af5f2b979df543e8a4379540ca..8c59ec8157a7e41ae7b98634babf70960fc2fad0 100644 (file)
@@ -3209,8 +3209,9 @@ ev_view_do_popup_menu (EvView *view,
                       gdouble x,
                       gdouble y)
 {
-       EvLink  *link;
-       EvImage *image;
+       EvLink       *link;
+       EvImage      *image;
+       EvAnnotation *annot;
 
        image = ev_view_get_image_at_location (view, x, y);
        if (image) {
@@ -3224,6 +3225,12 @@ ev_view_do_popup_menu (EvView *view,
                return TRUE;
        }
 
+       annot = ev_view_get_annotation_at_location (view, x, y);
+       if (annot) {
+               g_signal_emit (view, signals[SIGNAL_POPUP_MENU], 0, annot);
+               return TRUE;
+       }
+
        g_signal_emit (view, signals[SIGNAL_POPUP_MENU], 0, NULL);
 
        return TRUE;