output-item: Collapse the inheritance hierarchy into a single struct.
[pspp] / src / ui / gui / psppire.c
index e3f8589f7180e26758c01dd9477919bf03266446..e897c599b69bc50a5e6b0108b235ac8bb2848602 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "output/driver.h"
 #include "output/journal.h"
-#include "output/message-item.h"
+#include "output/output-item.h"
 #include "output/spv/spv.h"
 
 #include "ui/gui/dict-display.h"
@@ -105,7 +105,7 @@ initialize (const struct init_source *is)
       bind_textdomain_codeset (PACKAGE, "UTF-8");
       break;
     case 8:
-      if ( ! gtk_parse_args (is->argc, is->argv) )
+      if (! gtk_parse_args (is->argc, is->argv))
        {
          perror ("Error parsing arguments");
          exit (1);
@@ -160,9 +160,9 @@ handle_msg (const struct msg *m_, void *lexer_)
       m.first_column = lex_get_first_column (lexer, 0);
       m.last_column = lex_get_last_column (lexer, 0);
     }
-  m.command_name = output_get_command_name ();
+  m.command_name = output_get_uppercase_command_name ();
 
-  message_item_submit (message_item_create (&m));
+  output_item_submit (message_item_create (&m));
 
   free (m.command_name);
 }
@@ -175,7 +175,7 @@ psppire_set_lexer (struct lexer *lexer)
 
 
 GtkWindow *
-psppire_preload_file (const gchar *file)
+psppire_preload_file (const gchar *file, GtkWindow *victim)
 {
   const gchar *local_encoding = "UTF-8";
 
@@ -191,7 +191,7 @@ psppire_preload_file (const gchar *file)
   /* Check to see if the file is a .sav or a .por file.  If not
      assume that it is a syntax file */
   if (retval == 1)
-    w = open_data_window (NULL, filename, NULL, NULL);
+    w = open_data_window (PSPPIRE_WINDOW (victim), filename, NULL, NULL);
   else if (retval == 0)
     {
       char *error = spv_detect (filename);