]> www.fi.muni.cz Git - evince.git/commitdiff
Update cursor and tooltip on page change and view scroll. Fixes bug
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sat, 19 May 2007 12:33:33 +0000 (12:33 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sat, 19 May 2007 12:33:33 +0000 (12:33 +0000)
2007-05-19  Carlos Garcia Campos  <carlosgc@gnome.org>
* 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=/trunk/; revision=2466

ChangeLog
shell/ev-view.c

index 1419ab9a3feb07c9e2be5fc5fd5a8d3c2c5c93b5..71f95d4097514f19ce44db0f7429117ef8665bf5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-19  Carlos Garcia Campos  <carlosgc@gnome.org>
+       
+       * 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  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * NEWS:
index d496a68eff824484928ec0260e5a1cc085af00d1..9f59ea1d18445a3ffd72e8ae70233a95d0fb19bb 100644 (file)
@@ -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,12 +3451,13 @@ 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);