#include "helper.h"
#include "psppire-dialog.h"
#include "psppire-keypad.h"
-#include "data-editor.h"
+#include "psppire-data-window.h"
#include "psppire-var-store.h"
+#include "psppire-selector.h"
#include "dialog-common.h"
-#include "dict-display.h"
#include <language/expressions/public.h>
#include <language/syntax-string-source.h>
-#include "syntax-editor.h"
+#include "helper.h"
static void function_list_populate (GtkTreeView *tv);
static void
on_keypad_button (PsppireKeypad *kp, const gchar *syntax, gpointer data)
{
- GladeXML *xml = data;
+ GtkBuilder *xml = data;
GtkWidget *rhs = get_widget_assert (xml, "compute-textview1");
static void
erase (PsppireKeypad *kp, gpointer data)
{
- GladeXML *xml = data;
+ GtkBuilder *xml = data;
GtkWidget *rhs = get_widget_assert (xml, "compute-textview1");
compute_dialog (GObject *o, gpointer data)
{
gint response;
- struct data_editor *de = data;
+ PsppireDataWindow *de = data;
PsppireVarStore *vs = NULL;
struct compute_dialog scd;
g_signal_connect (expression, "toggled",
G_CALLBACK(on_expression_toggle), &scd);
- gtk_window_set_transient_for (GTK_WINDOW (dialog), de->parent.window);
-
-
- attach_dictionary_to_treeview (GTK_TREE_VIEW (dict_view),
- vs->dict,
- GTK_SELECTION_SINGLE, NULL);
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
+ g_object_set (dict_view,
+ "dictionary", vs->dict,
+ "selection-mode", GTK_SELECTION_SINGLE,
+ NULL);
psppire_selector_set_subjects (PSPPIRE_SELECTOR (var_selector),
dict_view, syntax_area,
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&scd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
{
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);
}