X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=libview%2Fev-view.c;h=e1c84037e2209902e708ce14e4bee609cfc4e6be;hb=ca55431d2dddabea2a1b102e489a23e826ff82c3;hp=b7ca94331ee3c3a58e76d76fc6d4c16f7b987f05;hpb=c05ac2f90eae9f4a56c27a136b60fbe20f202dfe;p=evince.git diff --git a/libview/ev-view.c b/libview/ev-view.c index b7ca9433..e1c84037 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -2314,6 +2314,9 @@ show_annotation_windows (EvView *view, if (!EV_IS_ANNOTATION_MARKUP (annot)) continue; + if (!ev_annotation_markup_has_popup (EV_ANNOTATION_MARKUP (annot))) + continue; + window = g_object_get_data (G_OBJECT (annot), "popup"); if (window) { ev_view_window_child_move_with_parent (view, window); @@ -2732,7 +2735,9 @@ ev_view_scroll_event (GtkWidget *widget, GdkEventScroll *event) state &= ~GDK_SHIFT_MASK; } - if (state == 0 && view->presentation) { + if (state == 0 && + (view->presentation || + (view->sizing_mode == EV_SIZING_BEST_FIT && !view->continuous))) { switch (event->direction) { case GDK_SCROLL_DOWN: case GDK_SCROLL_RIGHT: @@ -3015,26 +3020,28 @@ static void start_selection_for_event (EvView *view, GdkEventButton *event) { - EvSelectionStyle style; - clear_selection (view); - + view->selection_info.start.x = event->x + view->scroll_x; view->selection_info.start.y = event->y + view->scroll_y; switch (event->type) { case GDK_2BUTTON_PRESS: - style = EV_SELECTION_STYLE_WORD; + view->selection_info.style = EV_SELECTION_STYLE_WORD; break; case GDK_3BUTTON_PRESS: - style = EV_SELECTION_STYLE_LINE; + view->selection_info.style = EV_SELECTION_STYLE_LINE; break; default: - style = EV_SELECTION_STYLE_GLYPH; - break; + view->selection_info.style = EV_SELECTION_STYLE_GLYPH; + return; } - view->selection_info.style = style; + /* In case of WORD or LINE, compute selections now */ + compute_selections (view, + view->selection_info.style, + &(view->selection_info.start), + &(view->selection_info.start)); } static gboolean @@ -3517,14 +3524,6 @@ ev_view_button_release_event (GtkWidget *widget, view->selection_update_id = 0; } - if (!view->selection_info.in_selection && - view->selection_info.style != EV_SELECTION_STYLE_GLYPH) { - compute_selections (view, - view->selection_info.style, - &(view->selection_info.start), - &(view->selection_info.start)); - } - if (view->selection_info.selections) { clear_link_selected (view); ev_view_update_primary_selection (view); @@ -4625,10 +4624,14 @@ ev_view_presentation_animation_start (EvView *view, if (!effect) return; - surface = ev_pixbuf_cache_get_surface (view->pixbuf_cache, view->current_page); view->animation = ev_transition_animation_new (effect); + + surface = ev_pixbuf_cache_get_surface (view->pixbuf_cache, view->current_page); ev_transition_animation_set_origin_surface (view->animation, surface); - + surface = ev_pixbuf_cache_get_surface (view->pixbuf_cache, new_page); + if (surface) + ev_transition_animation_set_dest_surface (view->animation, surface); + g_signal_connect (view->animation, "frame", G_CALLBACK (ev_view_transition_animation_frame), view); g_signal_connect (view->animation, "finished",