X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fchi-square-dialog.c;h=64a6356ce188f3d0356c3d6051102ddbe083f942;hb=refs%2Fbuilds%2F20121125032007%2Fpspp;hp=6bb42e4755c302ca5e0b702ecb8a633fe5be5a56;hpb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;p=pspp diff --git a/src/ui/gui/chi-square-dialog.c b/src/ui/gui/chi-square-dialog.c index 6bb42e4755..64a6356ce1 100644 --- a/src/ui/gui/chi-square-dialog.c +++ b/src/ui/gui/chi-square-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010 Free Software Foundation + Copyright (C) 2010, 2011, 2012 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 @@ -18,16 +18,14 @@ #include "chi-square-dialog.h" -#include - #include "psppire-dialog.h" #include "psppire-var-view.h" #include "psppire-acr.h" #include "dialog-common.h" -#include "helper.h" +#include "builder-wrapper.h" #include "executor.h" - +#include "helper.h" #include @@ -164,7 +162,6 @@ chisquare_dialog (PsppireDataWindow *dw) struct chisquare_dialog csd; GtkBuilder *xml = builder_new ("chi-square.ui"); - PsppireVarStore *vs; GtkWidget *dialog = get_widget_assert (xml, "chisquare-dialog"); @@ -191,12 +188,10 @@ chisquare_dialog (PsppireDataWindow *dw) csd.values_button = get_widget_assert (xml, "radiobutton2"); - g_object_get (dw->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (dw)); - g_object_get (vs, "dictionary", &csd.dict, NULL); + g_object_get (dw->data_editor, "dictionary", &csd.dict, NULL); g_object_set (dict_view, "model", csd.dict, "predicate", var_is_numeric, @@ -230,25 +225,15 @@ chisquare_dialog (PsppireDataWindow *dw) switch (response) { case GTK_RESPONSE_OK: - { - gchar *syntax = generate_syntax (&csd); - - struct getl_interface *sss = create_syntax_string_source (syntax); - execute_syntax (sss); - - g_free (syntax); - } + g_free (execute_syntax_string (dw, generate_syntax (&csd))); break; case PSPPIRE_RESPONSE_PASTE: - { - gchar *syntax = generate_syntax (&csd); - paste_syntax_to_window (syntax); - g_free (syntax); - } + g_free (paste_syntax_to_window (generate_syntax (&csd))); break; default: break; } + g_object_unref (csd.expected_list); g_object_unref (xml); }