X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fcrosstabs-dialog.c;h=7d94e375c0ab3042e91edb9e7ee239a1f6f15a01;hb=33c65b85425187f4cb06f7c8302e49d571c4c3a7;hp=791eea2563871ec7768e5356d8b619632fd7c6b8;hpb=a9a69251edd625a50f271af5d64c157533b5fe48;p=pspp diff --git a/src/ui/gui/crosstabs-dialog.c b/src/ui/gui/crosstabs-dialog.c index 791eea2563..7d94e375c0 100644 --- a/src/ui/gui/crosstabs-dialog.c +++ b/src/ui/gui/crosstabs-dialog.c @@ -18,6 +18,7 @@ #include "checkbox-treeview.h" #include "crosstabs-dialog.h" +#include "psppire-var-view.h" #include #include @@ -259,9 +260,9 @@ generate_syntax (const struct crosstabs_dialog *cd) GString *string = g_string_new ("CROSSTABS"); g_string_append (string, "\n\t/TABLES="); - append_variable_names (string, cd->dict, GTK_TREE_VIEW (cd->row_vars), 0); + psppire_var_view_append_names (PSPPIRE_VAR_VIEW (cd->row_vars), 0, string); g_string_append (string, "\tBY\t"); - append_variable_names (string, cd->dict, GTK_TREE_VIEW (cd->col_vars), 0); + psppire_var_view_append_names (PSPPIRE_VAR_VIEW (cd->col_vars), 0, string); g_string_append (string, "\n\t/FORMAT="); @@ -382,7 +383,7 @@ dialog_state_valid (gpointer data) /* Pops up the Crosstabs dialog box */ void -crosstabs_dialog (GObject *o, gpointer data) +crosstabs_dialog (PsppireDataWindow *de) { gint response; struct crosstabs_dialog cd; @@ -391,15 +392,11 @@ crosstabs_dialog (GObject *o, gpointer data) PsppireVarStore *vs = NULL; PsppireDict *dict = NULL; - PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); - GtkWidget *dialog = get_widget_assert (xml, "crosstabs-dialog"); GtkWidget *source = get_widget_assert (xml, "dict-treeview"); GtkWidget *dest_rows = get_widget_assert (xml, "rows"); GtkWidget *dest_cols = get_widget_assert (xml, "cols"); - GtkWidget *row_selector = get_widget_assert (xml, "row-selector"); - GtkWidget *col_selector = get_widget_assert (xml, "col-selector"); GtkWidget *format_button = get_widget_assert (xml, "format-button"); GtkWidget *stat_button = get_widget_assert (xml, "stats-button"); GtkWidget *cell_button = get_widget_assert (xml, "cell-button"); @@ -426,19 +423,6 @@ crosstabs_dialog (GObject *o, gpointer data) g_object_get (vs, "dictionary", &dict, NULL); g_object_set (source, "model", dict, NULL); - set_dest_model (GTK_TREE_VIEW (dest_rows), dict); - set_dest_model (GTK_TREE_VIEW (dest_cols), dict); - - psppire_selector_set_subjects (PSPPIRE_SELECTOR (row_selector), - insert_source_row_into_tree_view, - NULL, - NULL); - - psppire_selector_set_subjects (PSPPIRE_SELECTOR (col_selector), - insert_source_row_into_tree_view, - NULL, - NULL); - cd.row_vars = GTK_TREE_VIEW (dest_rows); cd.col_vars = GTK_TREE_VIEW (dest_cols); g_object_get (vs, "dictionary", &cd.dict, NULL); @@ -493,7 +477,7 @@ crosstabs_dialog (GObject *o, gpointer data) { gchar *syntax = generate_syntax (&cd); - paste_syntax_in_new_window (syntax); + paste_syntax_to_window (syntax); g_free (syntax); }