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,
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);
/* Presentation */
if (ev_metadata_get_boolean (window->priv->metadata, "presentation", &presentation)) {
if (presentation) {
- ev_window_run_presentation_wrapper (window);
+ ev_window_run_presentation (window);
}
}
}
/* 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)
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;
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;
return FALSE;
}
-static void
-ev_window_run_presentation_wrapper (EvWindow *window)
-{
- if ( get_num_monitors(GTK_WINDOW(window)) > 1) {
- EvWindow *presentation_window = window;
- EvDSCWindow *control = ev_dscwindow_get_control();
-
- ev_dscwindow_set_presentation (control, presentation_window,
- presentation_window->priv->document);
- gtk_window_present (GTK_WINDOW (control));
- } else
- ev_window_run_presentation (window);
-
-}
-static void
-ev_window_stop_presentation_wrapper(EvWindow *window, gboolean unfullscreen_window)
-{
-}
-
void
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);
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();
+ ev_dscwindow_set_presentation (control, window,
+ window->priv->document,
+ EV_VIEW_PRESENTATION(window->priv->presentation_view));
+ gtk_window_present (GTK_WINDOW (control));
+ //}
}
void
presentation = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (presentation) {
- ev_window_run_presentation_wrapper (window);
+ ev_window_run_presentation (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
* 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));