Refactor common code in dialog implementations
[pspp-builds.git] / src / ui / gui / examine-dialog.c
index 33f8b129e888ca0b375fd644d71a34dc564ad7dc..3c11a08aa477eea73f26f89f2f36ab737741934a 100644 (file)
@@ -28,7 +28,7 @@
 #include <ui/gui/helper.h>
 #include <ui/gui/psppire-dialog.h>
 #include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -346,13 +346,7 @@ examine_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&ex_d);
-
-        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);
        g_free (syntax);
       }
       break;