From: Carlos Garcia Campos Date: Sat, 19 May 2007 13:47:39 +0000 (+0000) Subject: Update cursor and tooltip on page change and view scroll. Fixes bug X-Git-Tag: EVINCE_0_8_2~19 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=e957d648115a3147be30ab8382e669b9d28184ff;p=evince.git Update cursor and tooltip on page change and view scroll. Fixes bug 2007-05-19 Carlos Garcia Campos * shell/ev-view.c: (page_changed_cb), (on_adjustment_value_changed): Update cursor and tooltip on page change and view scroll. Fixes bug #439217. svn path=/branches/gnome-2-18/; revision=2467 --- diff --git a/ChangeLog b/ChangeLog index cb1a0e97..064fad84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-05-19 Carlos Garcia Campos + + * shell/ev-view.c: (page_changed_cb), (on_adjustment_value_changed): + + Update cursor and tooltip on page change and view scroll. Fixes bug + #439217. + 2007-05-14 Carlos Garcia Campos * backend/impress/zip.c: diff --git a/shell/ev-view.c b/shell/ev-view.c index d496a68e..40223a4d 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -1517,7 +1517,6 @@ handle_link_over_xy (EvView *view, gint x, gint y) view->cursor == EV_VIEW_CURSOR_IBEAM) ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL); } - return; } /*** Images ***/ @@ -3406,10 +3405,17 @@ page_changed_cb (EvPageCache *page_cache, EvView *view) { if (view->current_page != new_page) { + gint x, y; + view->current_page = new_page; view->pending_scroll = SCROLL_TO_PAGE_POSITION; + if (view->presentation) ev_view_presentation_transition_start (view); + + gtk_widget_get_pointer (GTK_WIDGET (view), &x, &y); + handle_link_over_xy (view, x, y); + gtk_widget_queue_resize (GTK_WIDGET (view)); } else { gtk_widget_queue_draw (GTK_WIDGET (view)); @@ -3421,10 +3427,12 @@ page_changed_cb (EvPageCache *page_cache, } } -static void on_adjustment_value_changed (GtkAdjustment *adjustment, - EvView *view) +static void +on_adjustment_value_changed (GtkAdjustment *adjustment, + EvView *view) { int dx = 0, dy = 0; + gint x, y; if (! GTK_WIDGET_REALIZED (view)) return; @@ -3443,13 +3451,14 @@ static void on_adjustment_value_changed (GtkAdjustment *adjustment, view->scroll_y = 0; } - if (view->pending_resize) gtk_widget_queue_draw (GTK_WIDGET (view)); else gdk_window_scroll (GTK_WIDGET (view)->window, dx, dy); - + gtk_widget_get_pointer (GTK_WIDGET (view), &x, &y); + handle_link_over_xy (view, x, y); + if (view->document) view_update_range_and_current_page (view); }