X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fweight-cases-dialog.c;h=9d103e1c97c8e6b58023afd88be4fbdf00e1ff43;hb=df6a0fd4dc5faea7930e6f9093892dfcc8124acc;hp=3b1db1b93a57272d4d8a37398745b7e6ba368f44;hpb=d43a876351d94acce0e8d565ad2cb4d690727fe9;p=pspp diff --git a/src/ui/gui/weight-cases-dialog.c b/src/ui/gui/weight-cases-dialog.c index 3b1db1b93a..9d103e1c97 100644 --- a/src/ui/gui/weight-cases-dialog.c +++ b/src/ui/gui/weight-cases-dialog.c @@ -20,10 +20,10 @@ #include "psppire-selector.h" #include "psppire-dialog.h" #include "helper.h" -#include "data-editor.h" +#include "psppire-data-window.h" #include "dict-display.h" #include -#include "psppire-syntax-window.h" +#include "helper.h" #include #include @@ -104,7 +104,7 @@ void weight_cases_dialog (GObject *o, gpointer data) { gint response; - struct data_editor *de = data; + PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); struct weight_cases_dialog wcd; GladeXML *xml = XML_NEW ("psppire.glade"); @@ -122,7 +122,7 @@ weight_cases_dialog (GObject *o, gpointer data) g_object_get (de->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), de->parent.window); + gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); g_signal_connect (radiobutton1, "toggled", G_CALLBACK (on_toggle), entry); g_signal_connect (selector, "selected", G_CALLBACK (on_select), @@ -172,13 +172,7 @@ weight_cases_dialog (GObject *o, gpointer data) case PSPPIRE_RESPONSE_PASTE: { gchar *syntax = generate_syntax (&wcd); - - 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;