more work on datasets
[pspp] / src / ui / gui / psppire-output-window.c
index 66ea9d392707fee19c011aa66436be4684788047..1da4b24673fae15e4d9648ea71d13bd31c81e60e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014  Free Software Foundation
+   Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016  Free Software Foundation
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -28,7 +28,6 @@
 #include "libpspp/cast.h"
 #include "libpspp/message.h"
 #include "libpspp/string-map.h"
-#include "output/cairo.h"
 #include "output/chart-item.h"
 #include "output/driver-provider.h"
 #include "output/message-item.h"
@@ -39,6 +38,7 @@
 #include "ui/gui/help-menu.h"
 #include "ui/gui/builder-wrapper.h"
 #include "ui/gui/psppire-output-view.h"
+#include "ui/gui/windows-menu.h"
 
 #include "gl/xalloc.h"
 
@@ -182,6 +182,15 @@ psppire_output_window_setup (void)
   output_driver_init (d, &psppire_output_class, "PSPPIRE",
                       SETTINGS_DEVICE_UNFILTERED);
   output_driver_register (d);
+
+  text_item_submit (
+    text_item_create (TEXT_ITEM_PARAGRAPH,
+                      _("This is a development version of PSPP.  Please be "
+                        "alert to the likely possibility that it contains "
+                        "more bugs than a PSPP release.  If you encounter "
+                        "bugs, please consider reporting them to the PSPP "
+                        "developers at bug-gnu-pspp@gnu.org, to enable them "
+                        "to be fixed.")));
 }
 
 \f
@@ -474,11 +483,10 @@ psppire_output_window_export (PsppireOutputWindow *window)
 static void
 psppire_output_window_init (PsppireOutputWindow *window)
 {
-  GtkBuilder *xml;
-
-  xml = builder_new ("output-window.ui");
+  GtkBuilder *xml = builder_new ("output-window.ui");
 
-  gtk_widget_reparent (get_widget_assert (xml, "vbox1"), GTK_WIDGET (window));
+  GtkWidget *box = get_widget_assert (xml, "box1");
+  gtk_container_add (GTK_CONTAINER (window), box);
 
   window->dispose_has_run = FALSE;
 
@@ -496,21 +504,14 @@ psppire_output_window_init (PsppireOutputWindow *window)
                    G_CALLBACK (cancel_urgency),
                    NULL);
 
-  g_signal_connect (get_action_assert (xml,"windows_minimise-all"),
-                   "activate",
-                   G_CALLBACK (psppire_window_minimise_all),
-                   NULL);
-
-  {
-    GtkWidget *w;
-    GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1", GTK_TYPE_UI_MANAGER));
-    merge_help_menu (uim);
+  GtkWidget *menubar = get_widget_assert (xml, "menubar");
 
-    w = gtk_ui_manager_get_widget (uim,"/ui/menubar/windows_menuitem/windows_minimise-all");
+  gtk_menu_shell_append (GTK_MENU_SHELL (menubar),
+                        create_windows_menu (GTK_WINDOW (window)));
+    
+  gtk_menu_shell_append (GTK_MENU_SHELL (menubar),
+                        create_help_menu (GTK_WINDOW (window)));
 
-    PSPPIRE_WINDOW (window)->menu =
-      GTK_MENU_SHELL (gtk_widget_get_parent (w));
-  }
 
   g_signal_connect_swapped (get_action_assert (xml, "file_export"), "activate",
                             G_CALLBACK (psppire_output_window_export), window);