X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fdescriptives-dialog.c;h=aaed7eee2c8b2dd7fd04e265b183e5521eae3f38;hb=df6a0fd4dc5faea7930e6f9093892dfcc8124acc;hp=4697c9fdfa073308f08fc1ef823519537f90af97;hpb=c86f5b8a45cca158b46a4fe3b48280e88ce9aba1;p=pspp diff --git a/src/ui/gui/descriptives-dialog.c b/src/ui/gui/descriptives-dialog.c index 4697c9fdfa..aaed7eee2c 100644 --- a/src/ui/gui/descriptives-dialog.c +++ b/src/ui/gui/descriptives-dialog.c @@ -20,17 +20,16 @@ #include "descriptives-dialog.h" #include -#include #include #include -#include +#include #include #include #include #include #include -#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) @@ -118,7 +117,7 @@ generate_syntax (const struct descriptives_dialog *scd) string = g_string_new ("DESCRIPTIVES"); g_string_append (string, "\n /VARIABLES="); - append_variable_names (string, scd->dict, GTK_TREE_VIEW (scd->stat_vars)); + append_variable_names (string, scd->dict, GTK_TREE_VIEW (scd->stat_vars), 0); listwise = gtk_toggle_button_get_active (scd->exclude_missing_listwise); include = gtk_toggle_button_get_active (scd->include_user_missing); @@ -203,7 +202,7 @@ void descriptives_dialog (GObject *o, gpointer data) { gint response; - struct data_editor *de = data; + PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); struct descriptives_dialog scd; @@ -218,12 +217,11 @@ descriptives_dialog (GObject *o, gpointer data) GtkWidget *stats_treeview = get_widget_assert (xml, "statistics"); - GtkSheet *var_sheet = - GTK_SHEET (get_widget_assert (de->xml, "variable_sheet")); + PsppireVarStore *vs = NULL; - PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet)); + 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)); attach_dictionary_to_treeview (GTK_TREE_VIEW (source), vs->dict, @@ -235,6 +233,7 @@ descriptives_dialog (GObject *o, gpointer data) source, dest, insert_source_row_into_tree_view, + NULL, NULL); put_checkbox_items_in_treeview (GTK_TREE_VIEW (stats_treeview), @@ -264,6 +263,7 @@ descriptives_dialog (GObject *o, gpointer data) case GTK_RESPONSE_OK: { gchar *syntax = generate_syntax (&scd); + struct getl_interface *sss = create_syntax_string_source (syntax); execute_syntax (sss); @@ -273,12 +273,7 @@ descriptives_dialog (GObject *o, gpointer data) case PSPPIRE_RESPONSE_PASTE: { gchar *syntax = generate_syntax (&scd); - - 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); } break;