New objects psppire-window and psppire-syntax-window.
[pspp-builds.git] / src / ui / gui / weight-cases-dialog.c
index 223568bf0e1a7e6af9afd21028301e206221ba87..3b1db1b93a57272d4d8a37398745b7e6ba368f44 100644 (file)
@@ -23,7 +23,7 @@
 #include "data-editor.h"
 #include "dict-display.h"
 #include <language/syntax-string-source.h>
-#include "syntax-editor.h"
+#include "psppire-syntax-window.h"
 
 #include <gtk/gtk.h>
 #include <glade/glade.h>
@@ -173,10 +173,11 @@ weight_cases_dialog (GObject *o, gpointer data)
       {
        gchar *syntax = generate_syntax (&wcd);
 
-       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);
       }