From 30c97c5f7cfd396cd66ff227a84010f2451aa107 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 22 Jan 2012 18:09:12 +0100 Subject: [PATCH 2/3] Convert the descriptives dialog box to a PsppireDialogAction object --- src/ui/gui/automake.mk | 4 +- src/ui/gui/data-editor.ui | 3 +- src/ui/gui/descriptives-dialog.c | 271 ----------------------- src/ui/gui/descriptives-dialog.h | 24 -- src/ui/gui/psppire-data-window.c | 3 - src/ui/gui/psppire-dialog-action-descriptives.c | 254 +++++++++++++++++++++ src/ui/gui/psppire-dialog-action-descriptives.h | 83 +++++++ src/ui/gui/widgets.c | 4 + 8 files changed, 345 insertions(+), 301 deletions(-) delete mode 100644 src/ui/gui/descriptives-dialog.c delete mode 100644 src/ui/gui/descriptives-dialog.h create mode 100644 src/ui/gui/psppire-dialog-action-descriptives.c create mode 100644 src/ui/gui/psppire-dialog-action-descriptives.h diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 7dcc799..73dcc06 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -162,8 +162,6 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/crosstabs-dialog.h \ src/ui/gui/customentry.c \ src/ui/gui/customentry.h \ - src/ui/gui/descriptives-dialog.c \ - src/ui/gui/descriptives-dialog.h \ src/ui/gui/dialog-common.c \ src/ui/gui/dialog-common.h \ src/ui/gui/dict-display.h \ @@ -214,6 +212,8 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/psppire-dialog.h \ src/ui/gui/psppire-dialog-action.c \ src/ui/gui/psppire-dialog-action.h \ + src/ui/gui/psppire-dialog-action-descriptives.c \ + src/ui/gui/psppire-dialog-action-descriptives.h \ src/ui/gui/psppire-dict.c \ src/ui/gui/psppire-dict.h \ src/ui/gui/psppire-dictview.c \ diff --git a/src/ui/gui/data-editor.ui b/src/ui/gui/data-editor.ui index fcfc8c2..88a228d 100644 --- a/src/ui/gui/data-editor.ui +++ b/src/ui/gui/data-editor.ui @@ -350,7 +350,8 @@ - + + uimanager1 analyze_descriptives _Descriptives... diff --git a/src/ui/gui/descriptives-dialog.c b/src/ui/gui/descriptives-dialog.c deleted file mode 100644 index 670f14b..0000000 --- a/src/ui/gui/descriptives-dialog.c +++ /dev/null @@ -1,271 +0,0 @@ -/* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "checkbox-treeview.h" -#include "descriptives-dialog.h" -#include "psppire-var-view.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include "executor.h" -#include "helper.h" - -#include "gettext.h" -#define _(msgid) gettext (msgid) -#define N_(msgid) msgid - -#define DESCRIPTIVE_STATS \ - DS (MEAN, N_("Mean")) \ - DS (STDDEV, N_("Standard deviation")) \ - DS (MINIMUM, N_("Minimum")) \ - DS (MAXIMUM, N_("Maximum")) \ - DS (RANGE, N_("Range")) \ - DS (SUM, N_("Sum")) \ - DS (SEMEAN, N_("Standard error")) \ - DS (VARIANCE, N_("Variance")) \ - DS (KURTOSIS, N_("Kurtosis")) \ - DS (SKEWNESS, N_("Skewness")) - -enum - { -#define DS(NAME, LABEL) DS_##NAME, - DESCRIPTIVE_STATS -#undef DS - N_DESCRIPTIVE_STATS - }; - -enum - { -#define DS(NAME, LABEL) B_DS_##NAME = 1u << DS_##NAME, - DESCRIPTIVE_STATS -#undef DS - B_DS_ALL = (1u << N_DESCRIPTIVE_STATS) - 1, - B_DS_DEFAULT = B_DS_MEAN | B_DS_STDDEV | B_DS_MINIMUM | B_DS_MAXIMUM - }; - - -static const struct checkbox_entry_item stats[] = - { -#define DS(NAME, LABEL) {#NAME, LABEL}, - DESCRIPTIVE_STATS -#undef DS - }; - -struct descriptives_dialog -{ - GtkTreeView *stat_vars; - GtkTreeModel *stats; - PsppireDict *dict; - GtkToggleButton *exclude_missing_listwise; - GtkToggleButton *include_user_missing; - GtkToggleButton *save_z_scores; -}; - -static void -refresh (PsppireDialog *dialog, struct descriptives_dialog *scd) -{ - GtkTreeModel *liststore; - GtkTreeIter iter; - size_t i; - bool ok; - - liststore = gtk_tree_view_get_model (scd->stat_vars); - gtk_list_store_clear (GTK_LIST_STORE (liststore)); - - for (i = 0, ok = gtk_tree_model_get_iter_first (scd->stats, &iter); ok; - i++, ok = gtk_tree_model_iter_next (scd->stats, &iter)) - gtk_list_store_set (GTK_LIST_STORE (scd->stats), &iter, - CHECKBOX_COLUMN_SELECTED, - (B_DS_DEFAULT & (1u << i)) ? true : false, -1); - - gtk_toggle_button_set_active (scd->exclude_missing_listwise, false); - gtk_toggle_button_set_active (scd->include_user_missing, false); - gtk_toggle_button_set_active (scd->save_z_scores, false); -} - -static char * -generate_syntax (const struct descriptives_dialog *scd) -{ - gchar *text; - GString *string; - GtkTreeIter iter; - unsigned int selected; - size_t i; - bool listwise, include; - bool ok; - - string = g_string_new ("DESCRIPTIVES"); - g_string_append (string, "\n /VARIABLES="); - psppire_var_view_append_names (PSPPIRE_VAR_VIEW (scd->stat_vars), 0, string); - - listwise = gtk_toggle_button_get_active (scd->exclude_missing_listwise); - include = gtk_toggle_button_get_active (scd->include_user_missing); - if (listwise || include) - { - g_string_append (string, "\n /MISSING="); - if (listwise) - { - g_string_append (string, "LISTWISE"); - if (include) - g_string_append (string, " "); - } - if (include) - g_string_append (string, "INCLUDE"); - } - - selected = 0; - for (i = 0, ok = gtk_tree_model_get_iter_first (scd->stats, &iter); ok; - i++, ok = gtk_tree_model_iter_next (scd->stats, &iter)) - { - gboolean toggled; - gtk_tree_model_get (scd->stats, &iter, - CHECKBOX_COLUMN_SELECTED, &toggled, -1); - if (toggled) - selected |= 1u << i; - } - - if (selected != B_DS_DEFAULT) - { - g_string_append (string, "\n /STATISTICS="); - if (selected == B_DS_ALL) - g_string_append (string, "ALL"); - else if (selected == 0) - g_string_append (string, "NONE"); - else - { - int n = 0; - if ((selected & B_DS_DEFAULT) == B_DS_DEFAULT) - { - g_string_append (string, "DEFAULT"); - selected &= ~B_DS_DEFAULT; - n++; - } - for (i = 0; i < N_DESCRIPTIVE_STATS; i++) - if (selected & (1u << i)) - { - if (n++) - g_string_append (string, " "); - g_string_append (string, stats[i].name); - } - } - } - - if (gtk_toggle_button_get_active (scd->save_z_scores)) - g_string_append (string, "\n /SAVE"); - - g_string_append (string, "."); - - if (gtk_toggle_button_get_active (scd->save_z_scores)) - g_string_append (string, "\nEXECUTE."); - - text = string->str; - - g_string_free (string, FALSE); - - return text; -} - - -/* Dialog is valid iff at least one variable has been selected */ -static gboolean -dialog_state_valid (gpointer data) -{ - struct descriptives_dialog *dd = data; - - GtkTreeModel *vars = gtk_tree_view_get_model (dd->stat_vars); - - GtkTreeIter notused; - - return gtk_tree_model_get_iter_first (vars, ¬used); -} - -/* Pops up the Descriptives dialog box */ -void -descriptives_dialog (PsppireDataWindow *de) -{ - gint response; - - struct descriptives_dialog scd; - - GtkBuilder *xml = builder_new ("descriptives.ui"); - - GtkWidget *dialog = get_widget_assert (xml, "descriptives-dialog"); - - - GtkWidget *source = get_widget_assert (xml, "all-variables"); - GtkWidget *dest = get_widget_assert (xml, "stat-variables"); - - GtkWidget *stats_treeview = get_widget_assert (xml, "statistics"); - - PsppireVarStore *vs = NULL; - PsppireDict *dict; - - g_object_get (de->data_editor, "var-store", &vs, NULL); - g_object_get (vs, "dictionary", &dict, NULL); - - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); - - - g_object_set (source, "model", dict, - "predicate", var_is_numeric, NULL); - - put_checkbox_items_in_treeview (GTK_TREE_VIEW (stats_treeview), - B_DS_DEFAULT, - N_DESCRIPTIVE_STATS, stats); - - scd.stat_vars = GTK_TREE_VIEW (dest); - scd.stats = gtk_tree_view_get_model (GTK_TREE_VIEW (stats_treeview)); - - g_object_get (vs, "dictionary", &scd.dict, NULL); - - scd.include_user_missing = - GTK_TOGGLE_BUTTON (get_widget_assert (xml, "include_user_missing")); - scd.exclude_missing_listwise = - GTK_TOGGLE_BUTTON (get_widget_assert (xml, "exclude_missing_listwise")); - scd.save_z_scores = - GTK_TOGGLE_BUTTON (get_widget_assert (xml, "save_z_scores")); - - g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &scd); - - psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog), - dialog_state_valid, &scd); - - response = psppire_dialog_run (PSPPIRE_DIALOG (dialog)); - - - switch (response) - { - case GTK_RESPONSE_OK: - g_free (execute_syntax_string (de, generate_syntax (&scd))); - break; - case PSPPIRE_RESPONSE_PASTE: - g_free (paste_syntax_to_window (generate_syntax (&scd))); - break; - default: - break; - } - - g_object_unref (xml); -} diff --git a/src/ui/gui/descriptives-dialog.h b/src/ui/gui/descriptives-dialog.h deleted file mode 100644 index 1819576..0000000 --- a/src/ui/gui/descriptives-dialog.h +++ /dev/null @@ -1,24 +0,0 @@ -/* PSPPIRE - a graphical user interface for PSPP. - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef __DESCRIPTIVES_DIALOG_H -#define __DESCRIPTIVES_DIALOG_H - -#include "psppire-data-window.h" - -void descriptives_dialog (PsppireDataWindow * data); - -#endif diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index b2607a0..8ef9307 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -34,7 +34,6 @@ #include "ui/gui/correlation-dialog.h" #include "ui/gui/count-dialog.h" #include "ui/gui/crosstabs-dialog.h" -#include "ui/gui/descriptives-dialog.h" #include "ui/gui/entry-dialog.h" #include "ui/gui/examine-dialog.h" #include "ui/gui/executor.h" @@ -1105,8 +1104,6 @@ psppire_data_window_finish_init (PsppireDataWindow *de, connect_action (de, "transform_recode-different", G_CALLBACK (recode_different_dialog)); - connect_action (de, "analyze_descriptives", G_CALLBACK (descriptives_dialog)); - connect_action (de, "analyze_frequencies", G_CALLBACK (frequencies_dialog)); connect_action (de, "crosstabs", G_CALLBACK (crosstabs_dialog)); diff --git a/src/ui/gui/psppire-dialog-action-descriptives.c b/src/ui/gui/psppire-dialog-action-descriptives.c new file mode 100644 index 0000000..b45afa5 --- /dev/null +++ b/src/ui/gui/psppire-dialog-action-descriptives.c @@ -0,0 +1,254 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +#include + +#include "psppire-dialog-action-descriptives.h" + +#include "checkbox-treeview.h" + +#include "psppire-var-view.h" +#include "psppire-dict.h" +#include "psppire-dialog.h" +#include "builder-wrapper.h" + +#include "gettext.h" +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + +static void psppire_dialog_action_descriptives_class_init (PsppireDialogActionDescriptivesClass *class); + +G_DEFINE_TYPE (PsppireDialogActionDescriptives, psppire_dialog_action_descriptives, PSPPIRE_TYPE_DIALOG_ACTION); + + +#define DESCRIPTIVE_STATS \ + DS (MEAN, N_("Mean")) \ + DS (STDDEV, N_("Standard deviation")) \ + DS (MINIMUM, N_("Minimum")) \ + DS (MAXIMUM, N_("Maximum")) \ + DS (RANGE, N_("Range")) \ + DS (SUM, N_("Sum")) \ + DS (SEMEAN, N_("Standard error")) \ + DS (VARIANCE, N_("Variance")) \ + DS (KURTOSIS, N_("Kurtosis")) \ + DS (SKEWNESS, N_("Skewness")) + +enum + { +#define DS(NAME, LABEL) DS_##NAME, + DESCRIPTIVE_STATS +#undef DS + N_DESCRIPTIVE_STATS + }; + +enum + { +#define DS(NAME, LABEL) B_DS_##NAME = 1u << DS_##NAME, + DESCRIPTIVE_STATS +#undef DS + B_DS_ALL = (1u << N_DESCRIPTIVE_STATS) - 1, + B_DS_DEFAULT = B_DS_MEAN | B_DS_STDDEV | B_DS_MINIMUM | B_DS_MAXIMUM + }; + + +static const struct checkbox_entry_item stats[] = + { +#define DS(NAME, LABEL) {#NAME, LABEL}, + DESCRIPTIVE_STATS +#undef DS + }; + + +static char * +generate_syntax (PsppireDialogAction *act) +{ + PsppireDialogActionDescriptives *scd = PSPPIRE_DIALOG_ACTION_DESCRIPTIVES (act); + gchar *text; + GString *string; + GtkTreeIter iter; + unsigned int selected; + size_t i; + bool listwise, include; + bool ok; + + printf ("%s\n", __FUNCTION__); + + string = g_string_new ("DESCRIPTIVES"); + g_string_append (string, "\n /VARIABLES="); + psppire_var_view_append_names (PSPPIRE_VAR_VIEW (scd->stat_vars), 0, string); + + listwise = gtk_toggle_button_get_active (scd->exclude_missing_listwise); + include = gtk_toggle_button_get_active (scd->include_user_missing); + if (listwise || include) + { + g_string_append (string, "\n /MISSING="); + if (listwise) + { + g_string_append (string, "LISTWISE"); + if (include) + g_string_append (string, " "); + } + if (include) + g_string_append (string, "INCLUDE"); + } + + selected = 0; + for (i = 0, ok = gtk_tree_model_get_iter_first (scd->stats, &iter); ok; + i++, ok = gtk_tree_model_iter_next (scd->stats, &iter)) + { + gboolean toggled; + gtk_tree_model_get (scd->stats, &iter, + CHECKBOX_COLUMN_SELECTED, &toggled, -1); + if (toggled) + selected |= 1u << i; + } + + if (selected != B_DS_DEFAULT) + { + g_string_append (string, "\n /STATISTICS="); + if (selected == B_DS_ALL) + g_string_append (string, "ALL"); + else if (selected == 0) + g_string_append (string, "NONE"); + else + { + int n = 0; + if ((selected & B_DS_DEFAULT) == B_DS_DEFAULT) + { + g_string_append (string, "DEFAULT"); + selected &= ~B_DS_DEFAULT; + n++; + } + for (i = 0; i < N_DESCRIPTIVE_STATS; i++) + if (selected & (1u << i)) + { + if (n++) + g_string_append (string, " "); + g_string_append (string, stats[i].name); + } + } + } + + if (gtk_toggle_button_get_active (scd->save_z_scores)) + g_string_append (string, "\n /SAVE"); + + g_string_append (string, "."); + + if (gtk_toggle_button_get_active (scd->save_z_scores)) + g_string_append (string, "\nEXECUTE."); + + text = string->str; + + g_string_free (string, FALSE); + + return text; +} + +static gboolean +dialog_state_valid (gpointer data) +{ + PsppireDialogActionDescriptives *dd = data; + + GtkTreeModel *vars = gtk_tree_view_get_model (dd->stat_vars); + + GtkTreeIter notused; + + return gtk_tree_model_get_iter_first (vars, ¬used); +} + +static void +refresh (PsppireDialog *dialog, PsppireDialogActionDescriptives *scd) +{ + GtkTreeModel *liststore; + GtkTreeIter iter; + size_t i; + bool ok; + + liststore = gtk_tree_view_get_model (scd->stat_vars); + gtk_list_store_clear (GTK_LIST_STORE (liststore)); + + for (i = 0, ok = gtk_tree_model_get_iter_first (scd->stats, &iter); ok; + i++, ok = gtk_tree_model_iter_next (scd->stats, &iter)) + gtk_list_store_set (GTK_LIST_STORE (scd->stats), &iter, + CHECKBOX_COLUMN_SELECTED, + (B_DS_DEFAULT & (1u << i)) ? true : false, -1); + + gtk_toggle_button_set_active (scd->exclude_missing_listwise, false); + gtk_toggle_button_set_active (scd->include_user_missing, false); + gtk_toggle_button_set_active (scd->save_z_scores, false); +} + +static void +psppire_dialog_action_descriptives_activate (GtkAction *a) +{ + PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); + PsppireDialogActionDescriptives *act = PSPPIRE_DIALOG_ACTION_DESCRIPTIVES (a); + + GtkBuilder *xml = builder_new ("descriptives.ui"); + + GtkWidget *stats_treeview = get_widget_assert (xml, "statistics"); + + pda->dialog = get_widget_assert (xml, "descriptives-dialog"); + pda->source = get_widget_assert (xml, "all-variables"); + act->variables = get_widget_assert (xml, "stat-variables"); + + g_object_set (pda->source, "model", pda->dict, + "predicate", var_is_numeric, NULL); + + put_checkbox_items_in_treeview (GTK_TREE_VIEW (stats_treeview), + B_DS_DEFAULT, + N_DESCRIPTIVE_STATS, stats); + + act->stat_vars = GTK_TREE_VIEW (act->variables); + act->stats = gtk_tree_view_get_model (GTK_TREE_VIEW (stats_treeview)); + + act->include_user_missing = + GTK_TOGGLE_BUTTON (get_widget_assert (xml, "include_user_missing")); + act->exclude_missing_listwise = + GTK_TOGGLE_BUTTON (get_widget_assert (xml, "exclude_missing_listwise")); + act->save_z_scores = + GTK_TOGGLE_BUTTON (get_widget_assert (xml, "save_z_scores")); + + + { + // FIXME: move these two to the parent class + g_signal_connect (pda->dialog, "refresh", G_CALLBACK (refresh), pda); + + psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (pda->dialog), + dialog_state_valid, pda); + } + + if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_descriptives_parent_class)->activate) + PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_descriptives_parent_class)->activate (pda); +} + +static void +psppire_dialog_action_descriptives_class_init (PsppireDialogActionDescriptivesClass *class) +{ + GtkActionClass *action_class = GTK_ACTION_CLASS (class); + + action_class->activate = psppire_dialog_action_descriptives_activate; + + PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax; +} + + +static void +psppire_dialog_action_descriptives_init (PsppireDialogActionDescriptives *act) +{ +} + diff --git a/src/ui/gui/psppire-dialog-action-descriptives.h b/src/ui/gui/psppire-dialog-action-descriptives.h new file mode 100644 index 0000000..3bb2e2c --- /dev/null +++ b/src/ui/gui/psppire-dialog-action-descriptives.h @@ -0,0 +1,83 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +#include +#include + +#include "psppire-dialog-action.h" + +#ifndef __PSPPIRE_DIALOG_ACTION_DESCRIPTIVES_H__ +#define __PSPPIRE_DIALOG_ACTION_DESCRIPTIVES_H__ + +G_BEGIN_DECLS + + +#define PSPPIRE_TYPE_DIALOG_ACTION_DESCRIPTIVES (psppire_dialog_action_descriptives_get_type ()) + +#define PSPPIRE_DIALOG_ACTION_DESCRIPTIVES(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + PSPPIRE_TYPE_DIALOG_ACTION_DESCRIPTIVES, PsppireDialogActionDescriptives)) + +#define PSPPIRE_DIALOG_ACTION_DESCRIPTIVES_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ + PSPPIRE_TYPE_DIALOG_ACTION_DESCRIPTIVES, \ + PsppireDialogActionDescriptivesClass)) + + +#define PSPPIRE_IS_DIALOG_ACTION_DESCRIPTIVES(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_DIALOG_ACTION_DESCRIPTIVES)) + +#define PSPPIRE_IS_DIALOG_ACTION_DESCRIPTIVES_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_TYPE_DIALOG_ACTION_DESCRIPTIVES)) + + +#define PSPPIRE_DIALOG_ACTION_DESCRIPTIVES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + PSPPIRE_TYPE_DIALOG_ACTION_DESCRIPTIVES, \ + PsppireDialogActionDescriptivesClass)) + +typedef struct _PsppireDialogActionDescriptives PsppireDialogActionDescriptives; +typedef struct _PsppireDialogActionDescriptivesClass PsppireDialogActionDescriptivesClass; + + +struct _PsppireDialogActionDescriptives +{ + PsppireDialogAction parent; + + /*< private >*/ + gboolean dispose_has_run ; + + GtkWidget *variables; + GtkTreeView *stat_vars; + GtkTreeModel *stats; + // PsppireDict *dict; + GtkToggleButton *exclude_missing_listwise; + GtkToggleButton *include_user_missing; + GtkToggleButton *save_z_scores; +}; + + +struct _PsppireDialogActionDescriptivesClass +{ + PsppireDialogActionClass parent_class; +}; + + +GType psppire_dialog_action_descriptives_get_type (void) ; + +G_END_DECLS + +#endif /* __PSPPIRE_DIALOG_ACTION_DESCRIPTIVES_H__ */ diff --git a/src/ui/gui/widgets.c b/src/ui/gui/widgets.c index 9a634f7..6111bdf 100644 --- a/src/ui/gui/widgets.c +++ b/src/ui/gui/widgets.c @@ -13,6 +13,8 @@ #include "psppire-var-view.h" #include "psppire-val-chooser.h" +#include "psppire-dialog-action-descriptives.h" + /* Any custom widgets which are to be used in GtkBuilder ui files need to be preregistered, otherwise GtkBuilder refuses to @@ -29,4 +31,6 @@ preregister_widgets (void) psppire_acr_get_type (); psppire_dict_view_get_type (); psppire_var_view_get_type (); + + psppire_dialog_action_descriptives_get_type (); } -- 1.7.2.5