X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Ftranspose-dialog.c;h=7ff758b0d279824a67f4c4043feb8b999f648ed1;hb=df83cf8a655317445e3237457658bd827282f970;hp=272ef1b3934daaa4f07043dc3dc2f5a5d9e04a8d;hpb=a1efcf97ca2f75f4be6a0389ff2372c03ed2d4e1;p=pspp-builds.git diff --git a/src/ui/gui/transpose-dialog.c b/src/ui/gui/transpose-dialog.c index 272ef1b3..7ff758b0 100644 --- a/src/ui/gui/transpose-dialog.c +++ b/src/ui/gui/transpose-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 "syntax-editor.h" +#include "helper.h" #include "dialog-common.h" @@ -79,7 +79,7 @@ void transpose_dialog (GObject *o, gpointer data) { gint response ; - struct data_editor *de = data; + PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); GtkBuilder *xml = builder_new ("psppire.ui"); @@ -94,9 +94,7 @@ transpose_dialog (GObject *o, gpointer data) g_object_get (de->data_editor, "var-store", &vs, NULL); - attach_dictionary_to_treeview (GTK_TREE_VIEW (source), - vs->dict, - GTK_SELECTION_MULTIPLE, NULL); + g_object_set (source, "dictionary", vs->dict, NULL); set_dest_model (GTK_TREE_VIEW (dest), vs->dict); @@ -116,7 +114,7 @@ transpose_dialog (GObject *o, gpointer data) g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), xml); - gtk_window_set_transient_for (GTK_WINDOW (dialog), de->parent.window); + gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog), dialog_state_valid, xml); @@ -128,6 +126,7 @@ transpose_dialog (GObject *o, gpointer data) case GTK_RESPONSE_OK: { gchar *syntax = generate_syntax (vs->dict, xml); + struct getl_interface *sss = create_syntax_string_source (syntax); execute_syntax (sss); @@ -137,11 +136,7 @@ transpose_dialog (GObject *o, gpointer data) case PSPPIRE_RESPONSE_PASTE: { gchar *syntax = generate_syntax (vs->dict, xml); - - struct syntax_editor *se = - (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL); - - gtk_text_buffer_insert_at_cursor (se->buffer, syntax, -1); + paste_syntax_in_new_window (syntax); g_free (syntax); }