[evince] Remember the current page when document is reloaded in presentation mode



commit 64f2cca8898d08f2b8c549d98a9c5869f7035e3f
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sun Jan 30 13:54:11 2011 +0100

    Remember the current page when document is reloaded in presentation mode
    
    Fixes bug #637594.

 shell/ev-window.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 3c41017..9c4d68f 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -1466,8 +1466,15 @@ ev_window_set_document (EvWindow *ev_window, EvDocument *document)
 	}
 
 	if (EV_WINDOW_IS_PRESENTATION (ev_window)) {
+		gint current_page;
+
+		current_page = ev_view_presentation_get_current_page (
+			EV_VIEW_PRESENTATION (ev_window->priv->presentation_view));
 		gtk_widget_destroy (ev_window->priv->presentation_view);
 		ev_window->priv->presentation_view = NULL;
+
+		/* Update the model with the current presentation page */
+		ev_document_model_set_page (ev_window->priv->model, current_page);
 		ev_window_run_presentation (ev_window);
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]