]> www.fi.muni.cz Git - evince.git/commitdiff
[shell] dualscreen compile fixes
authorLukáš Bezdička <255993@mail.muni.cz>
Tue, 5 Apr 2011 12:48:19 +0000 (14:48 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 1 Jun 2011 11:09:20 +0000 (13:09 +0200)
shell/ev-dualscreen.c
shell/ev-window.c
shell/ev-window.h

index 8fc6953a2c5a4d55b6244792fe31588fecdf42da..4df456cc3575527dd41c10995a1f2e8e175783ca 100644 (file)
@@ -192,7 +192,7 @@ ev_dscwindow_init (EvDSCWindow *ev_dscwindow)
 
        ev_dscwindow->priv->overview_scrolled_window = GTK_WIDGET (g_object_new (
                        GTK_TYPE_SCROLLED_WINDOW, "shadow-type", GTK_SHADOW_IN, NULL));
-       gtk_box_pack_start_defaults (GTK_BOX (v), ev_dscwindow->priv->overview_scrolled_window);
+       gtk_box_pack_start (GTK_BOX (v), ev_dscwindow->priv->overview_scrolled_window, TRUE, TRUE, 0);
 
        ev_dscwindow->priv->model = ev_document_model_new ();
        ev_dscwindow->priv->overview = ev_view_new ();
@@ -203,8 +203,8 @@ ev_dscwindow_init (EvDSCWindow *ev_dscwindow)
        ev_document_model_set_sizing_mode (ev_dscwindow->priv->model, EV_SIZING_BEST_FIT);
 
 
-       gtk_container_add (GTK_CONTAINER (priv->overview_scrolled_window),
-                                  priv->overview);
+       gtk_container_add (GTK_CONTAINER (ev_dscwindow->priv->overview_scrolled_window),
+                                  ev_dscwindow->priv->overview);
 
 
        GtkWidget *e = gtk_expander_new (_("Expensive features"));
@@ -216,13 +216,13 @@ ev_dscwindow_init (EvDSCWindow *ev_dscwindow)
        gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (b_switch), "object-flip-horizontal");
        gtk_toolbar_insert (GTK_TOOLBAR (t), b_switch, -1);
        g_signal_connect (b_switch, "clicked",
-               G_CALLBACK (ev_dscwindow_switch_monitors), self);
+               G_CALLBACK (ev_dscwindow_switch_monitors), ev_dscwindow);
 
        GtkToolItem* b_notes = gtk_tool_button_new (NULL, _("Load notes ..."));
        gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (b_notes), "object-flip-horizontal");
        gtk_toolbar_insert (GTK_TOOLBAR (t), b_notes, -1);
        g_signal_connect (b_notes, "clicked",
-               G_CALLBACK (ev_dscwindow_notes_interaction), self);
+               G_CALLBACK (ev_dscwindow_notes_interaction), ev_dscwindow);
 
        GtkToolItem* b_close = gtk_tool_button_new (NULL, _("End presentation"));
        gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (b_close), "view-restore");
@@ -292,7 +292,8 @@ ev_dscwindow_dispose (GObject *obj)
 +              ev_view_set_document (EV_VIEW (priv->notesview), NULL);
 +              g_object_unref (priv->notesview);
 +      }*/
-       ev_window_stop_presentation (priv->presentation_window);
+/*TODO: save fulscreen state*/
+       ev_window_stop_presentation (priv->presentation_window, 0);
 
        if (priv->moveback_monitor >= 0) {
                GtkWindow * presentation_window = GTK_WINDOW (priv->presentation_window);
@@ -305,24 +306,24 @@ ev_dscwindow_dispose (GObject *obj)
                gtk_window_move (presentation_window, coords.x, coords.y);
        }
 
-       G_OBJECT_CLASS (parent_class)->dispose (obj);
+       G_OBJECT_CLASS (ev_dscwindow_parent_class)->dispose (obj);
 }
 
 
 static void
-ev_dscwindow_class_init (EvDSCWindowClass * klass)
+ev_dscwindow_class_init (EvDSCWindowClass *ev_dscwindow_class)
 {
-       GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
-       parent_class = g_type_class_peek_parent (klass);
-       g_type_class_add_private (klass, sizeof (EvDSCWindowPrivate));
+       GObjectClass *g_object_class = G_OBJECT_CLASS (ev_dscwindow_class);
+       /*parent_class = g_type_class_peek_parent (ev_dscwindow_class);*/
+       g_type_class_add_private (g_object_class, sizeof (EvDSCWindowPrivate));
        g_object_class->dispose  = ev_dscwindow_dispose;
 }
 
 GtkWidget *
 ev_dscwindow_new (void)
 {
-       EvDSCWindow *dsc_window;
+       EvDSCWindow *ev_dscwindow;
 
-       dsc_window = g_object_new (EV_TYPE_DSCWINDOW, "type", GTK_WINDOW_TOPLEVEL, NULL);
-       return GTK_WIDGET (dsc_window);
+       ev_dscwindow = g_object_new (EV_TYPE_DSCWINDOW, "type", GTK_WINDOW_TOPLEVEL, NULL);
+       return GTK_WIDGET (ev_dscwindow);
 }
index aac080d49a30b0eeee1f0bf66c64f3c5e4a90fca..95908d4db382054b58ed703540250abd5b963931 100644 (file)
@@ -309,9 +309,9 @@ 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              (EvWindow         *window);
+/*static void     ev_window_run_presentation              (EvWindow         *window);
 static void     ev_window_stop_presentation             (EvWindow         *window,
-                                                        gboolean          unfullscreen_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,
@@ -3999,7 +3999,7 @@ ev_window_view_presentation_focus_out (EvWindow *window)
        return FALSE;
 }
 
-static void
+void
 ev_window_run_presentation (EvWindow *window)
 {
        gboolean fullscreen_window = TRUE;
@@ -4055,7 +4055,7 @@ ev_window_run_presentation (EvWindow *window)
                ev_metadata_set_boolean (window->priv->metadata, "presentation", TRUE);
 }
 
-static void
+void
 ev_window_stop_presentation (EvWindow *window,
                             gboolean  unfullscreen_window)
 {
index 1173390b88e0bdc541b7d2b0ff48d02213e7cdb1..dea451964b3a21a9763f5f5c8158573a0333c622 100644 (file)
@@ -82,6 +82,9 @@ void          ev_window_open_document (EvWindow       *ev_window,
                                         EvWindowRunMode mode,
                                         const gchar    *search_string);
 gboolean       ev_window_is_empty      (const EvWindow *ev_window);
+void           ev_window_run_presentation (EvWindow    *ev_window);
+void           ev_window_stop_presentation (EvWindow   *ev_window,
+                                       gboolean        unfullscreen_window);
 void           ev_window_print_range   (EvWindow       *ev_window,
                                         int             first_page,
                                         int             last_page);