New objects psppire-window and psppire-syntax-window.
[pspp-builds.git] / src / ui / gui / variable-info-dialog.c
index ba9c043dcd53fb0eaf5cc5a8239f5636327cb838..dcd1b911fcbe79d71b746598ff12cba2558ce016 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-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 "psppire-syntax-window.h"
 
 
 #include <gettext.h>
@@ -216,10 +215,11 @@ variable_info_dialog (GObject *o, gpointer data)
       {
        gchar *syntax = generate_syntax (GTK_TREE_VIEW (treeview));
 
-       struct syntax_editor *se =
-         (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL);
+        GtkWidget *se = psppire_syntax_window_new ();
 
-       gtk_text_buffer_insert_at_cursor (se->buffer, syntax, -1);
+       gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
+
+       gtk_widget_show (se);
 
        g_free (syntax);
       }