/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2009 Free Software Foundation
+ Copyright (C) 2009, 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 <config.h>
#include "dialog-common.h"
-#include <language/syntax-string-source.h>
#include "reliability-dialog.h"
#include "psppire-selector.h"
#include "psppire-dictview.h"
GtkWidget *variables;
GtkWidget *split_point_hbox;
GtkWidget *split_spinbutton;
+ GtkWidget *scale_if_item_deleted_checkbutton;
};
gtk_spin_button_set_range (GTK_SPIN_BUTTON (rd->split_spinbutton),
0, 0);
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->scale_if_item_deleted_checkbutton),
+ FALSE);
}
rd.model_combo = get_widget_assert (xml, "combobox1");
rd.split_spinbutton = get_widget_assert (xml, "spinbutton1");
+ rd.scale_if_item_deleted_checkbutton = get_widget_assert (xml, "totals-checkbutton");
+
g_signal_connect_swapped (rd.model_combo, "changed",
G_CALLBACK (on_method_change), &rd);
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&rd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&rd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&rd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&rd)));
break;
default:
break;
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (rd->split_spinbutton))
);
+ if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->scale_if_item_deleted_checkbutton)))
+ g_string_append (string, "\n\t/SUMMARY = TOTAL");
+
g_string_append (string, ".\n");
text = string->str;