Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2006-08-10 17:14:36 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2006-08-10 17:14:36 (GMT)
commit36cce1e9da6ca90f14665a5b52b810bc08b8427e (patch)
tree9bcaa3cc51ed52561a963d55b21f12f64f90224c /shell
parent63189b8ff60aad2b1eb51ddca644d9b4a740dc54 (diff)
Ignore zoom for xyz destinations when it's <= 1, keeping user preferences
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
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-view.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 6ef026b..757194d 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -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) {