Refactor common code in dialog implementations
[pspp-builds.git] / src / ui / gui / text-data-import-dialog.c
index f749de38581f9a02640472d350f00fc311135e53..fa55bba5e95d64e561682245050b6e3cd56ddf1f 100644 (file)
@@ -45,7 +45,7 @@
 #include <ui/gui/psppire-dialog.h>
 #include <ui/gui/psppire-var-sheet.h>
 #include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
 
 #include "error.h"
 #include "xalloc.h"
@@ -293,13 +293,7 @@ text_data_import_assistant (GObject *o, gpointer de_)
     case PSPPIRE_RESPONSE_PASTE:
       {
        char *syntax = generate_syntax (ia);
-
-        GtkWidget *se = psppire_syntax_window_new ();
-
-       gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
-       gtk_widget_show (se);
-
+        paste_syntax_in_new_window (syntax);
        free (syntax);
       }
       break;