From: Nickolay V. Shmyrev Date: Sun, 3 Jul 2005 10:36:35 +0000 (+0000) Subject: Scroll to current page when exit from presentation. X-Git-Tag: EVINCE_0_3_3~182 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=3c322258656221ad2416396e42e587b5569fcd42;p=evince.git Scroll to current page when exit from presentation. --- diff --git a/shell/ev-view.c b/shell/ev-view.c index 476c791b..131966b9 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -371,7 +371,7 @@ scroll_to_current_page (EvView *view, GtkOrientation orientation) { GdkRectangle page_area; GtkBorder border; - + get_page_extents (view, view->current_page, &page_area, &border); if (orientation == GTK_ORIENTATION_VERTICAL) { @@ -2141,11 +2141,12 @@ ev_view_set_fullscreen (EvView *view, fullscreen = fullscreen != FALSE; - if (view->fullscreen != fullscreen) { - view->fullscreen = fullscreen; - gtk_widget_queue_resize (GTK_WIDGET (view)); - } - + if (view->fullscreen == fullscreen) + return; + + view->fullscreen = fullscreen; + gtk_widget_queue_resize (GTK_WIDGET (view)); + g_object_notify (G_OBJECT (view), "fullscreen"); } @@ -2169,7 +2170,9 @@ ev_view_set_presentation (EvView *view, return; view->presentation = presentation; + view->pending_scroll = SCROLL_TO_CURRENT_PAGE; gtk_widget_queue_resize (GTK_WIDGET (view)); + if (GTK_WIDGET_REALIZED (view)) { if (view->presentation) gdk_window_set_background (GTK_WIDGET(view)->window,