]> www.fi.muni.cz Git - evince.git/commitdiff
Ignore zoom for xyz destinations when it's <= 1, keeping user preferences
authorCarlos Garcia Campos <carlosgc@gnome.org>
Thu, 10 Aug 2006 17:14:36 +0000 (17:14 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Thu, 10 Aug 2006 17:14:36 +0000 (17:14 +0000)
2006-08-10  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-view.c: (goto_fith_dest), (goto_fit_dest), (goto_xyz_dest):
Ignore zoom for xyz destinations when it's <= 1, keeping user
preferences instead. Set correct sizing-mode for fith and fitv
destinations rather than EV_SIZING_FREE. Fixes bug #349433

ChangeLog
shell/ev-view.c

index 4e125b917ea28ff8bb5c67cd979a14784a2935e4..84d1c477e5d7643232d45d34a3f26f8cd16a82ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-10  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (goto_fith_dest), (goto_fit_dest), (goto_xyz_dest):
+
+       Ignore zoom for xyz destinations when it's <= 1, keeping user
+       preferences instead. Set correct sizing-mode for fith and fitv
+       destinations rather than EV_SIZING_FREE. Fixes bug #349433
+
 2006-08-08  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * NEWS:
index 6ef026b60c7b814630df6775a46470ce775374f2..757194d7800814c2f8adadf3d918145c5e48f829 100644 (file)
@@ -1144,7 +1144,7 @@ goto_fith_dest (EvView *view, EvLinkDest *dest)
                                        ev_view_get_width (view),
                                        ev_view_get_height (view), 0);
 
-       ev_view_set_sizing_mode (view, EV_SIZING_FREE);
+       ev_view_set_sizing_mode (view, EV_SIZING_FIT_WIDTH);
        ev_view_set_zoom (view, zoom, FALSE);
 
        view->current_page = page;
@@ -1167,7 +1167,7 @@ goto_fit_dest (EvView *view, EvLinkDest *dest)
        zoom = zoom_for_size_best_fit (doc_width, doc_height, ev_view_get_width (view),
                                       ev_view_get_height (view), 0, 0);
 
-       ev_view_set_sizing_mode (view, EV_SIZING_FREE);
+       ev_view_set_sizing_mode (view, EV_SIZING_BEST_FIT);
        ev_view_set_zoom (view, zoom, FALSE);
 
        view->current_page = page;
@@ -1180,14 +1180,13 @@ static void
 goto_xyz_dest (EvView *view, EvLinkDest *dest)
 {
        EvPoint doc_point;
-       int height, page;
+       gint page;
        double zoom;
 
        zoom = ev_link_dest_get_zoom (dest);
        page = ev_link_dest_get_page (dest);
-       ev_page_cache_get_size (view->page_cache, page, 0, 1.0, NULL, &height);
 
-       if (zoom != 0) {
+       if (zoom > 1) {
                ev_view_set_sizing_mode (view, EV_SIZING_FREE);
                ev_view_set_zoom (view, zoom, FALSE);
        }
@@ -2278,7 +2277,7 @@ draw_one_page (EvView          *view,
        gint current_page;
 
        g_assert (view->document);
-       
+
        if (! gdk_rectangle_intersect (page_area, expose_area, &overlap))
                return;
        
@@ -2407,6 +2406,7 @@ ev_view_destroy (GtkObject *object)
 
        if (view->link_tooltip) {
                gtk_widget_destroy (view->link_tooltip);
+               view->link_tooltip = NULL;
        }
 
        if (view->selection_scroll_id) {