Rewrite output-viewer.c --> psppire-output-window.c
[pspp-builds.git] / src / ui / gui / window-manager.c
index 0bdc2390b1edfd0c17e4e8dffaf6f4cd2cd353b5..065a4db7fdf0f5034da62f6469daf5bca132a2f1 100644 (file)
@@ -1,29 +1,29 @@
-/*
-    PSPPIRE --- A Graphical User Interface for PSPP
-    Copyright (C) 2006, 2007  Free Software Foundation
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2006, 2007  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
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+   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
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA. */
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 
 #include <config.h>
 
+#include "relocatable.h"
+
 #include <glib.h>
-#include "syntax-editor.h"
+#include "psppire-syntax-window.h"
 #include "data-editor.h"
 
+
 #include <gettext.h>
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
@@ -84,11 +84,14 @@ window_create (enum window_type type, const gchar *name)
   switch (type)
     {
     case WINDOW_SYNTAX:
-      e = (struct editor_window *) new_syntax_editor ();
+      //e = (struct editor_window *) new_syntax_editor ();
       break;
     case WINDOW_DATA:
       e = (struct editor_window *) new_data_editor ();
       break;
+    case WINDOW_OUTPUT:
+      //e = (struct editor_window *) new_output_viewer ();
+      break;
     default:
       g_assert_not_reached ();
     };
@@ -100,7 +103,7 @@ window_create (enum window_type type, const gchar *name)
 
 
   gtk_window_set_icon_from_file (GTK_WINDOW (e->window),
-                                PKGDATADIR "/psppicon.png", 0);
+                                relocate (PKGDATADIR "/psppicon.png"), 0);
 
   g_signal_connect (e->window, "destroy",
                    G_CALLBACK (deregister_window), e);
@@ -143,6 +146,10 @@ set_window_name (struct editor_window *e,
       e->name = g_strdup_printf (_("Untitled%d"), next_window_id () );
       title = g_strdup_printf (_("%s --- PSPP Data Editor"), e->name);
       break;
+    case WINDOW_OUTPUT:
+      e->name = g_strdup_printf (_("Output%d"), next_window_id () );
+      title = g_strdup_printf (_("%s --- PSPP Output"), e->name);
+      break;
     default:
       g_assert_not_reached ();
     }