]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-view.c
Fixes desktop file issues. See bug #473471.
[evince.git] / shell / ev-view.c
index cbdffd80d235eb7369ba6a43bfeae682de299fac..761594a53f3c16452b1aec4cbc9e91ea231fddb2 100644 (file)
@@ -489,7 +489,7 @@ view_update_range_and_current_page (EvView *view)
                                }
 
                                view->end_page = i;
                                }
 
                                view->end_page = i;
-                       } else if (found) {
+                       } else if (found && view->current_page <= view->end_page) {
                                break;
                        }
                }
                                break;
                        }
                }
@@ -1498,6 +1498,12 @@ ev_view_handle_cursor_over_xy (EvView *view, gint x, gint y)
 
        if (view->cursor == EV_VIEW_CURSOR_HIDDEN)
                return;
 
        if (view->cursor == EV_VIEW_CURSOR_HIDDEN)
                return;
+
+       if (view->drag_info.in_drag) {
+               if (view->cursor != EV_VIEW_CURSOR_DRAG)
+                       ev_view_set_cursor (view, EV_VIEW_CURSOR_DRAG);
+               return;
+       }
        
        link = ev_view_get_link_at_location (view, x, y);
        
        
        link = ev_view_get_link_at_location (view, x, y);
        
@@ -2981,21 +2987,20 @@ ev_view_button_release_event (GtkWidget      *widget,
                              GdkEventButton *event)
 {
        EvView *view = EV_VIEW (widget);
                              GdkEventButton *event)
 {
        EvView *view = EV_VIEW (widget);
-       EvLink *link;
+       EvLink *link = NULL;
+
+       view->drag_info.in_drag = FALSE;
+       view->image_dnd_info.in_drag = FALSE;
 
        if (view->pressed_button == 2) {
 
        if (view->pressed_button == 2) {
-               ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
+               ev_view_handle_cursor_over_xy (view, event->x, event->y);
        }
 
        if (view->document && view->pressed_button != 3) {
                link = ev_view_get_link_at_location (view, event->x, event->y);
        }
 
        if (view->document && view->pressed_button != 3) {
                link = ev_view_get_link_at_location (view, event->x, event->y);
-       } else {
-               link = NULL;
        }
 
        view->pressed_button = -1;
        }
 
        view->pressed_button = -1;
-       view->drag_info.in_drag = FALSE;
-       view->image_dnd_info.in_drag = FALSE;
 
        if (view->selection_scroll_id) {
            g_source_remove (view->selection_scroll_id);
 
        if (view->selection_scroll_id) {
            g_source_remove (view->selection_scroll_id);
@@ -3357,9 +3362,8 @@ static gboolean
 ev_view_leave_notify_event (GtkWidget *widget, GdkEventCrossing   *event)
 {
        EvView *view = EV_VIEW (widget);
 ev_view_leave_notify_event (GtkWidget *widget, GdkEventCrossing   *event)
 {
        EvView *view = EV_VIEW (widget);
-    
-       if (view->cursor == EV_VIEW_CURSOR_LINK ||
-           view->cursor == EV_VIEW_CURSOR_IBEAM)
+
+       if (view->cursor != EV_VIEW_CURSOR_NORMAL)
                ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
 
 #if !GTK_CHECK_VERSION (2, 11, 7)
                ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
 
 #if !GTK_CHECK_VERSION (2, 11, 7)