X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=shell%2Fev-view.c;h=27a2149a2b63b16a65cb2b5f42abb622aa7ce29d;hb=6c259988fe555ccb2df458db5025e5cf80e881b1;hp=072ca0822336eb1439dbd257f5ea4c674bb6a244;hpb=b8f97c954e2e3c9b40f46dc55f3727cb7b35137c;p=evince.git diff --git a/shell/ev-view.c b/shell/ev-view.c index 072ca082..27a2149a 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -1348,7 +1348,6 @@ ev_view_handle_link (EvView *view, EvLink *link) if (!action) return; - type = ev_link_action_get_action_type (action); switch (type) { @@ -1983,6 +1982,9 @@ ev_view_button_press_event (GtkWidget *widget, GdkEventButton *event) { EvView *view = EV_VIEW (widget); + + if (!view->document) + return FALSE; if (!GTK_WIDGET_HAS_FOCUS (widget)) { gtk_widget_grab_focus (widget); @@ -2005,7 +2007,8 @@ ev_view_button_press_event (GtkWidget *widget, } gtk_widget_queue_draw (widget); - } else if ((image = ev_view_get_image_at_location (view, event->x, event->y))) { + } else if (!location_in_text (view, event->x + view->scroll_x, event->y + view->scroll_y) && + (image = ev_view_get_image_at_location (view, event->x, event->y))) { if (view->image_dnd_info.image) g_object_unref (view->image_dnd_info.image); view->image_dnd_info.image = g_object_ref (image); @@ -2584,6 +2587,9 @@ ev_view_key_press_event (GtkWidget *widget, EvView *view = EV_VIEW (widget); EvPresentationState current; + if (!view->document) + return FALSE; + if (!view->presentation || view->presentation_state == EV_PRESENTATION_END) return gtk_bindings_activate_event (GTK_OBJECT (widget), event); @@ -3782,6 +3788,9 @@ ev_view_zoom_in (EvView *view) { g_return_if_fail (view->sizing_mode == EV_SIZING_FREE); + if (view->presentation) + return; + view->pending_scroll = SCROLL_TO_CENTER; ev_view_set_zoom (view, ZOOM_IN_FACTOR, TRUE); } @@ -3791,6 +3800,9 @@ ev_view_zoom_out (EvView *view) { g_return_if_fail (view->sizing_mode == EV_SIZING_FREE); + if (view->presentation) + return; + view->pending_scroll = SCROLL_TO_CENTER; ev_view_set_zoom (view, ZOOM_OUT_FACTOR, TRUE); }