]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-window.c
[dualscreen] beta pageswitch [shell] todo change run_presentation [presentation]...
[evince.git] / shell / ev-window.c
index dcc35360e20f2803803eb6619b99172fc24ccf82..dd9d1167af06e42dae71d871ecdb24d192fd944b 100644 (file)
@@ -310,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,
@@ -1027,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);
@@ -1318,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);
                }
        }
 }
@@ -1484,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)
@@ -1621,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;
@@ -2158,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;
@@ -4000,25 +3997,6 @@ ev_window_view_presentation_focus_out (EvWindow *window)
        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)
 {
@@ -4042,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);
@@ -4073,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();
+       ev_dscwindow_set_presentation   (control, window,
+                                        window->priv->document,
+                                        window->priv->presentation_view);
+       gtk_window_present (GTK_WINDOW (control));
+       //}
 }
 
 void
@@ -4115,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);
        }
 }
 
@@ -4593,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
@@ -6784,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));