Remove obsoleted files from build rules
[pspp] / src / ui / gui / variable-info-dialog.c
index ba9c043dcd53fb0eaf5cc5a8239f5636327cb838..43a3832c01822dd5829cc42aa317f29700e949a1 100644 (file)
 #include <config.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
-#include <gtksheet/gtksheet.h>
 
 #include "dict-display.h"
 #include "var-display.h"
 #include <data/variable.h>
+#include <data/format.h>
 #include <data/value-labels.h>
-#include "data-editor.h"
+#include "psppire-data-window.h"
 #include "psppire-dialog.h"
 #include "psppire-var-store.h"
 #include "helper.h"
-#include <gtksheet/gtksheet.h>
 
 #include <language/syntax-string-source.h>
-#include "syntax-editor.h"
+#include "helper.h"
 
 
 #include <gettext.h>
@@ -165,7 +164,7 @@ static gchar * generate_syntax (GtkTreeView *treeview);
 void
 variable_info_dialog (GObject *o, gpointer data)
 {
-  struct data_editor *de = data;
+  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   gint response ;
 
@@ -179,7 +178,7 @@ variable_info_dialog (GObject *o, gpointer data)
 
   g_object_get (de->data_editor, "var-store", &vs, NULL);
 
-  gtk_window_set_transient_for (GTK_WINDOW (dialog), de->parent.window);
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   attach_dictionary_to_treeview (GTK_TREE_VIEW (treeview),
                                 vs->dict,
@@ -215,11 +214,7 @@ variable_info_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (GTK_TREE_VIEW (treeview));
-
-       struct syntax_editor *se =
-         (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL);
-
-       gtk_text_buffer_insert_at_cursor (se->buffer, syntax, -1);
+        paste_syntax_in_new_window (syntax);
 
        g_free (syntax);
       }