X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-window.c;h=799f64d66c6d66dd7e482f8e3666ce09a65f17e3;hb=d3bc7b9497f6205eaa0c6dece068caff6411ce8c;hp=f0593b2373f53a7a6f51f121dfb879b7689776b6;hpb=3242d87af0dbd37088249a6b42ac27237cabdd8d;p=evince.git diff --git a/shell/ev-window.c b/shell/ev-window.c index f0593b23..799f64d6 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -51,6 +51,7 @@ #include "ephy-zoom.h" #include "ev-application.h" +#include "ev-dualscreen.h" #include "ev-document-factory.h" #include "ev-document-find.h" #include "ev-document-fonts.h" @@ -309,9 +310,6 @@ static void ev_window_stop_fullscreen (EvWindow *windo gboolean unfullscreen_window); static void ev_window_cmd_view_fullscreen (GtkAction *action, EvWindow *window); -static void ev_window_run_presentation_wrapper (EvWindow *window); -static void ev_window_stop_presentation_wrapper (EvWindow *window, - gboolean unfullscreen_window); static void ev_window_cmd_view_presentation (GtkAction *action, EvWindow *window); static void ev_view_popup_cmd_open_link (GtkAction *action, @@ -1026,7 +1024,7 @@ static void update_document_mode (EvWindow *window, EvDocumentMode mode) { if (mode == EV_DOCUMENT_MODE_PRESENTATION) { - ev_window_run_presentation_wrapper (window); + ev_window_run_presentation (window); } else if (mode == EV_DOCUMENT_MODE_FULL_SCREEN) { ev_window_run_fullscreen (window); @@ -1317,7 +1315,7 @@ setup_view_from_metadata (EvWindow *window) /* Presentation */ if (ev_metadata_get_boolean (window->priv->metadata, "presentation", &presentation)) { if (presentation) { - ev_window_run_presentation_wrapper (window); + ev_window_run_presentation (window); } } } @@ -1483,7 +1481,7 @@ ev_window_set_document (EvWindow *ev_window, EvDocument *document) /* Update the model with the current presentation page */ ev_document_model_set_page (ev_window->priv->model, current_page); - ev_window_run_presentation_wrapper (ev_window); + ev_window_run_presentation (ev_window); } if (ev_window->priv->setup_document_idle > 0) @@ -1620,7 +1618,7 @@ ev_window_load_job_cb (EvJob *job, ev_window_run_fullscreen (ev_window); break; case EV_WINDOW_MODE_PRESENTATION: - ev_window_run_presentation_wrapper (ev_window); + ev_window_run_presentation (ev_window); break; default: break; @@ -2157,7 +2155,7 @@ ev_window_open_document (EvWindow *ev_window, ev_window_run_fullscreen (ev_window); break; case EV_WINDOW_MODE_PRESENTATION: - ev_window_run_presentation_wrapper (ev_window); + ev_window_run_presentation (ev_window); break; default: break; @@ -3999,13 +3997,6 @@ ev_window_view_presentation_focus_out (EvWindow *window) return FALSE; } -static void -ev_window_run_presentation_wrapper(){ -} -static void -ev_window_stop_presentation_wrapper(){ -} - void ev_window_run_presentation (EvWindow *window) { @@ -4029,6 +4020,7 @@ ev_window_run_presentation (EvWindow *window) current_page, rotation, inverted_colors); + g_signal_connect_swapped (window->priv->presentation_view, "finished", G_CALLBACK (ev_window_view_presentation_finished), window); @@ -4060,6 +4052,14 @@ ev_window_run_presentation (EvWindow *window) if (window->priv->metadata && !ev_window_is_empty (window)) ev_metadata_set_boolean (window->priv->metadata, "presentation", TRUE); + +// if ( get_num_monitors(GTK_WINDOW(window)) > 1) { + EvDSCWindow *control = ev_dscwindow_get_control(); + gtk_window_present (GTK_WINDOW (control)); + ev_dscwindow_set_presentation (control, window, + window->priv->document, + EV_VIEW_PRESENTATION(window->priv->presentation_view)); +// } } void @@ -4102,7 +4102,7 @@ ev_window_cmd_view_presentation (GtkAction *action, EvWindow *window) presentation = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); if (presentation) { - ev_window_run_presentation_wrapper (window); + ev_window_run_presentation (window); } } @@ -4580,7 +4580,7 @@ ev_window_cmd_leave_fullscreen (GtkAction *action, EvWindow *window) static void ev_window_cmd_start_presentation (GtkAction *action, EvWindow *window) { - ev_window_run_presentation_wrapper (window); + ev_window_run_presentation (window); } static void @@ -6771,7 +6771,7 @@ ev_window_media_player_key_pressed (EvWindow *window, * often seen keys */ if (strcmp (key, "Play") == 0) { - ev_window_run_presentation_wrapper (window); + ev_window_run_presentation (window); } else if (strcmp (key, "Previous") == 0) { if (EV_WINDOW_IS_PRESENTATION (window)) ev_view_presentation_previous_page (EV_VIEW_PRESENTATION (window->priv->presentation_view));