gui: Make syntax execution functions take a PsppireDataWindow argument.
[pspp-builds.git] / src / ui / gui / psppire.c
index 0d41932adc0e6cd51036420908ba439418e33250..1b11c11996a1e03c4ff642e8810fb1e8ab1b9c9f 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004, 2005, 2006, 2009, 2010  Free Software Foundation
+   Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011  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
 #include <unistd.h>
 
 #include "data/casereader.h"
+#include "data/dataset.h"
 #include "data/datasheet.h"
 #include "data/file-handle-def.h"
 #include "data/file-name.h"
 #include "data/por-file-reader.h"
-#include "data/procedure.h"
 #include "data/settings.h"
 #include "data/sys-file-reader.h"
 
@@ -96,7 +96,7 @@ initialize (const char *data_file)
   settings_init ();
   fh_init ();
 
-  the_dataset = create_dataset ();
+  the_dataset = dataset_create ();
   psppire_set_lexer (NULL);
 
   dictionary = psppire_dict_new_from_dict (dataset_dict (the_dataset));
@@ -127,7 +127,7 @@ initialize (const char *data_file)
   if (data_file != NULL)
     load_data_file (data_file);
 
-  execute_const_syntax_string ("");
+  execute_const_syntax_string (PSPPIRE_DATA_WINDOW (the_data_window), "");
 
   gtk_widget_show (the_data_window);
 }
@@ -141,6 +141,11 @@ de_initialize (void)
   i18n_done ();
 }
 
+PsppireDataWindow *
+psppire_default_data_window (void)
+{
+  return PSPPIRE_DATA_WINDOW (the_data_window);
+}
 
 static void
 func (gpointer key, gpointer value, gpointer data)