]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-window.c
[presentation] Allow finish presentation by clicking on end page
[evince.git] / shell / ev-window.c
index d7565fffe46562bd568a290b07c6d5765f2a8302..086a4bea09f2098ab04b69b5dc7f9c82eab54987 100644 (file)
@@ -3577,6 +3577,12 @@ ev_window_update_presentation_action (EvWindow *window)
                (action, G_CALLBACK (ev_window_cmd_view_presentation), window);
 }
 
+static void
+ev_window_view_presentation_finished (EvWindow *window)
+{
+       ev_window_stop_presentation (window, TRUE);
+}
+
 static void
 ev_window_run_presentation (EvWindow *window)
 {
@@ -3596,6 +3602,9 @@ ev_window_run_presentation (EvWindow *window)
        rotation = ev_document_model_get_rotation (window->priv->model);
        window->priv->presentation_view =
                ev_view_presentation_new (window->priv->document, current_page, rotation);
+       g_signal_connect_swapped (window->priv->presentation_view, "finished",
+                                 G_CALLBACK (ev_window_view_presentation_finished),
+                                 window);
 
        gtk_box_pack_start (GTK_BOX (window->priv->main_box),
                            window->priv->presentation_view,