#include <stdlib.h>
#include <language/syntax-string-source.h>
-#include <ui/gui/data-editor.h>
+#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
-#include "helper.h"
+#include "executor.h"
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/syntax-editor.h>
+#include <ui/gui/helper.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
crosstabs_dialog (GObject *o, gpointer data)
{
gint response;
- struct data_editor *de = data;
-
struct crosstabs_dialog cd;
GtkBuilder *xml = builder_new ("crosstabs.ui");
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");
cells
);
- 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,
- GTK_SELECTION_MULTIPLE, NULL);
+ g_object_get (vs, "dictionary", &dict, NULL);
+ g_object_set (source, "dictionary", dict, NULL);
- set_dest_model (GTK_TREE_VIEW (dest_rows), vs->dict);
- set_dest_model (GTK_TREE_VIEW (dest_cols), vs->dict);
+ 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),
source,
cd.row_vars = GTK_TREE_VIEW (dest_rows);
cd.col_vars = GTK_TREE_VIEW (dest_cols);
- cd.dict = vs->dict;
+ g_object_get (vs, "dictionary", &cd.dict, NULL);
cd.format_dialog = get_widget_assert (xml, "format-dialog");
cd.table_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "print-tables"));
cd.pivot_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "pivot"));
cd.current_opts.table = TRUE;
cd.current_opts.pivot = TRUE;
- gtk_window_set_transient_for (GTK_WINDOW (cd.format_dialog), de->parent.window);
- gtk_window_set_transient_for (GTK_WINDOW (cd.cell_dialog), de->parent.window);
- gtk_window_set_transient_for (GTK_WINDOW (cd.stat_dialog), de->parent.window);
+ gtk_window_set_transient_for (GTK_WINDOW (cd.format_dialog), GTK_WINDOW (de));
+ gtk_window_set_transient_for (GTK_WINDOW (cd.cell_dialog), GTK_WINDOW (de));
+ gtk_window_set_transient_for (GTK_WINDOW (cd.stat_dialog), GTK_WINDOW (de));
g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &cd);
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&cd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
{
gchar *syntax = generate_syntax (&cd);
- 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);
}