New objects psppire-window and psppire-syntax-window.
[pspp-builds.git] / src / ui / gui / comments-dialog.c
index f1a4936e6de06e9df95abcff13966f09faa8705e..6b2e800779ce4a300672c75853e4a7e949a1ccb4 100644 (file)
@@ -20,7 +20,7 @@
 #include "helper.h"
 #include "data-editor.h"
 #include <language/syntax-string-source.h>
-#include "syntax-editor.h"
+#include "psppire-syntax-window.h"
 #include "psppire-var-store.h"
 #include <ui/syntax-gen.h>
 
@@ -177,10 +177,11 @@ comments_dialog (GObject *o, gpointer data)
       {
        gchar *syntax = generate_syntax (&cd);
 
-       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);
       }