New objects psppire-window and psppire-syntax-window.
[pspp-builds.git] / src / ui / gui / variable-info-dialog.c
index 451b60bd6f841f2b378e9f704278ae1866afc242..dcd1b911fcbe79d71b746598ff12cba2558ce016 100644 (file)
@@ -21,6 +21,7 @@
 #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"
@@ -28,7 +29,7 @@
 #include "helper.h"
 
 #include <language/syntax-string-source.h>
-#include "syntax-editor.h"
+#include "psppire-syntax-window.h"
 
 
 #include <gettext.h>
@@ -214,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);
       }