/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "executor.h"
#include "psppire-data-window.h"
#include "dict-display.h"
-#include <language/syntax-string-source.h>
#include "helper.h"
#include <gtk/gtk.h>
/* Pops up the Weight Cases dialog box */
void
-weight_cases_dialog (GObject *o, gpointer data)
+weight_cases_dialog (PsppireDataWindow *de)
{
gint response;
- PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
struct weight_cases_dialog wcd;
GtkBuilder *xml = builder_new ("psppire.ui");
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&wcd);
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&wcd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&wcd);
- paste_syntax_in_new_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&wcd)));
break;
default:
break;