X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fbinomial-dialog.c;h=90d9118ea6e29ea5c593cfc2d6438548974ebaaf;hb=refs%2Fbuilds%2F20121129032043%2Fpspp;hp=130c3dd6d4645ad66ca20f3111013843089bac14;hpb=006e4c8eef534aa82d28869a34c49a382076371d;p=pspp diff --git a/src/ui/gui/binomial-dialog.c b/src/ui/gui/binomial-dialog.c index 130c3dd6d4..90d9118ea6 100644 --- a/src/ui/gui/binomial-dialog.c +++ b/src/ui/gui/binomial-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 "binomial-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 @@ -148,7 +146,6 @@ binomial_dialog (PsppireDataWindow *dw) struct binomial_dialog bin_d; GtkBuilder *xml = builder_new ("binomial.ui"); - PsppireVarStore *vs; GtkWidget *dialog = get_widget_assert (xml, "binomial-dialog"); @@ -156,8 +153,6 @@ binomial_dialog (PsppireDataWindow *dw) GtkWidget *dict_view = get_widget_assert (xml, "dict-view"); - g_object_get (dw->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (dw)); bin_d.var_view = get_widget_assert (xml, "variables-treeview"); @@ -167,7 +162,7 @@ binomial_dialog (PsppireDataWindow *dw) bin_d.cutpoint_entry = get_widget_assert (xml, "cutpoint-entry"); bin_d.cutpoint_button = get_widget_assert (xml, "radiobutton4"); - g_object_get (vs, "dictionary", &bin_d.dict, NULL); + g_object_get (dw->data_editor, "dictionary", &bin_d.dict, NULL); g_object_set (dict_view, "model", bin_d.dict, "predicate", var_is_numeric, @@ -187,21 +182,10 @@ binomial_dialog (PsppireDataWindow *dw) switch (response) { case GTK_RESPONSE_OK: - { - gchar *syntax = generate_syntax (&bin_d); - - struct getl_interface *sss = create_syntax_string_source (syntax); - execute_syntax (sss); - - g_free (syntax); - } + g_free (execute_syntax_string (dw, generate_syntax (&bin_d))); break; case PSPPIRE_RESPONSE_PASTE: - { - gchar *syntax = generate_syntax (&bin_d); - paste_syntax_to_window (syntax); - g_free (syntax); - } + g_free (paste_syntax_to_window (generate_syntax (&bin_d))); break; default: break;