From: John Darrington Date: Sat, 13 May 2017 17:26:17 +0000 (+0200) Subject: New Dialog: Non Parametric | K Indepdendent Samples X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc30bc5e0a4d8bdfc56e43ccd1403c070a71dec8;p=pspp New Dialog: Non Parametric | K Indepdendent Samples --- diff --git a/NEWS b/NEWS index 9a83b21c9d..a755a85cbd 100644 --- a/NEWS +++ b/NEWS @@ -15,8 +15,6 @@ Changes from 0.10.2 to 0.10.4: * Some inappropriate properties in selection dialogs have been corrected. - * The graphical user interface has a new menu: Edit|Options - * A bug which could cause the HTML driver to go into a tight loop has been fixed. @@ -31,6 +29,12 @@ Changes from 0.10.2 to 0.10.4: * Gtk+3.14.5 or later must now be used when building. + * Graphical user interface changes: + + ** There is a new menu: Edit|Options + + ** The Non Parametric Statistics Menu has a new item: "K Independent Samples". + * The AUTORECODE command now accepts an optional / before INTO. * The short form of the VECTOR command can now create string variables. diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 3b752c5c3a..b19cccfe61 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -20,6 +20,7 @@ UI_FILES = \ src/ui/gui/frequencies.ui \ src/ui/gui/histogram.ui \ src/ui/gui/indep-samples.ui \ + src/ui/gui/k-independent.ui \ src/ui/gui/k-means.ui \ src/ui/gui/k-related.ui \ src/ui/gui/ks-one-sample.ui \ @@ -228,6 +229,8 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/psppire-dialog-action-kmeans.h \ src/ui/gui/psppire-dialog-action-logistic.c \ src/ui/gui/psppire-dialog-action-logistic.h \ + src/ui/gui/psppire-dialog-action-k-independent.c \ + src/ui/gui/psppire-dialog-action-k-independent.h \ src/ui/gui/psppire-dialog-action-k-related.c \ src/ui/gui/psppire-dialog-action-k-related.h \ src/ui/gui/psppire-dialog-action-means.c \ diff --git a/src/ui/gui/data-editor.ui b/src/ui/gui/data-editor.ui index 9bd7415754..0b0f5911dc 100644 --- a/src/ui/gui/data-editor.ui +++ b/src/ui/gui/data-editor.ui @@ -342,6 +342,10 @@ _K Related Samples... win.PsppireDialogActionKRelated + + K _Independent Samples... + win.PsppireDialogActionKIndependent + diff --git a/src/ui/gui/k-independent.ui b/src/ui/gui/k-independent.ui new file mode 100644 index 0000000000..60ed0957e1 --- /dev/null +++ b/src/ui/gui/k-independent.ui @@ -0,0 +1,442 @@ + + + + + + + 0 + 1 + + + + 0 + 1 + + + + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Define Groups + True + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + 5 + 5 + 5 + 2 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + 5 + 5 + True + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Upper limit: + True + upper-limit-entry + + + 0 + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Lower limit: + True + lower-limit-entry + + + 0 + 0 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + + + 1 + 1 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 0 + + + + + + + + + + vertical + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + vertical + PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK + + + False + False + end + 1 + + + + + + + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Tests for Several Independent Samples + True + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + 5 + 5 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + _Grouping Variable: + True + k-independent-entry + + + False + False + 0 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + ● + + + False + True + 1 + + + + + 2 + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + vertical + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Test _Variable List: + True + k-independent-treeview2 + False + + + False + False + 0 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + etched-in + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + False + False + + + + + + + + True + True + 1 + + + + + 2 + 0 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + k-independent-treeview1 + k-independent-entry + + + 1 + 1 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + center + 5 + k-independent-treeview1 + k-independent-treeview2 + + + 1 + 0 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + never + etched-in + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + False + False + + + + + + + + 0 + 0 + 4 + + + + + vertical + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + 5 + center + + + _Define Groups + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + 0.5 + + + False + False + 0 + + + + + 2 + 2 + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + center + True + 5 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + 0 + + + vertical + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + _Kruskal-Wallis H + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + 0.5 + True + + + False + False + 0 + + + + + _Median + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + 0.5 + True + + + False + False + 1 + + + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Test Type + True + + + + + False + True + 0 + + + + + 2 + 3 + + + + + True + False + + + + + + 1 + 2 + + + + + True + True + 0 + + + + + vertical + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + False + False + end + 1 + + + + + + diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 99c0c6ac69..15fe2e9fe9 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -67,6 +67,7 @@ #include "psppire-dialog-action-frequencies.h" #include "psppire-dialog-action-histogram.h" #include "psppire-dialog-action-indep-samps.h" +#include "psppire-dialog-action-k-independent.h" #include "psppire-dialog-action-k-related.h" #include "psppire-dialog-action-kmeans.h" #include "psppire-dialog-action-logistic.h" @@ -1499,6 +1500,7 @@ psppire_data_window_finish_init (PsppireDataWindow *de, connect_dialog_action (PSPPIRE_TYPE_DIALOG_ACTION_1SKS, de); connect_dialog_action (PSPPIRE_TYPE_DIALOG_ACTION_TWO_SAMPLE, de); connect_dialog_action (PSPPIRE_TYPE_DIALOG_ACTION_K_RELATED, de); + connect_dialog_action (PSPPIRE_TYPE_DIALOG_ACTION_K_INDEPENDENT, de); { GSimpleAction *file_import_action = g_simple_action_new ("file-import", NULL); diff --git a/src/ui/gui/psppire-dialog-action-k-independent.c b/src/ui/gui/psppire-dialog-action-k-independent.c new file mode 100644 index 0000000000..0a578caa20 --- /dev/null +++ b/src/ui/gui/psppire-dialog-action-k-independent.c @@ -0,0 +1,224 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 2017 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-k-independent.h" + +#include "psppire-var-view.h" +#include "psppire-value-entry.h" +#include "psppire-acr.h" + +#include "psppire-dialog.h" +#include "builder-wrapper.h" +#include "helper.h" + + +#include "gettext.h" +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + + + +static void psppire_dialog_action_k_independent_init (PsppireDialogActionKIndependent *act); +static void psppire_dialog_action_k_independent_class_init (PsppireDialogActionKIndependentClass *class); + +G_DEFINE_TYPE (PsppireDialogActionKIndependent, psppire_dialog_action_k_independent, PSPPIRE_TYPE_DIALOG_ACTION); + +const static char *keyword[n_KIDS] = + { + "KRUSKAL-WALLIS", + "MEDIAN" + }; + +static char * +generate_syntax (const PsppireDialogAction *act) +{ + gchar *text; + PsppireDialogActionKIndependent *kid = PSPPIRE_DIALOG_ACTION_K_INDEPENDENT (act); + + GString *string = g_string_new ("NPAR TEST"); + int i; + for (i = 0; i < n_KIDS; ++i) + { + g_string_append (string, "\n\t"); + + if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (kid->checkbutton[i]))) + { + g_string_append_printf (string, "/%s = ", keyword[i]); + psppire_var_view_append_names (PSPPIRE_VAR_VIEW (kid->vars_treeview), + 0, string); + + g_string_append (string, " BY "); + + g_string_append (string, + gtk_entry_get_text (GTK_ENTRY (kid->groupvar_entry))); + + + g_string_append_printf (string, " (%g, %g)", + kid->lower_limit_value.f, + kid->upper_limit_value.f); + } + } + + g_string_append (string, ".\n"); + + text = string->str; + + g_string_free (string, FALSE); + + return text; +} + + +static gboolean +dialog_state_valid (gpointer data) +{ + PsppireDialogActionKIndependent *kid = PSPPIRE_DIALOG_ACTION_K_INDEPENDENT (data); + + GtkTreeModel *vars = + gtk_tree_view_get_model (GTK_TREE_VIEW (kid->vars_treeview)); + + GtkTreeIter notused; + + if ( !gtk_tree_model_get_iter_first (vars, ¬used) ) + return FALSE; + + if ( 0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (kid->groupvar_entry)))) + return FALSE; + + gboolean method_set = FALSE; + gint i; + for (i = 0; i < n_KIDS; ++i) + { + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (kid->checkbutton[i]))) + method_set = TRUE; + } + + return method_set; +} + +static void +refresh (PsppireDialogAction *rd_) +{ + PsppireDialogActionKIndependent *kid = PSPPIRE_DIALOG_ACTION_K_INDEPENDENT (rd_); + + GtkTreeModel *model = + gtk_tree_view_get_model (GTK_TREE_VIEW (kid->vars_treeview)); + + gtk_entry_set_text (GTK_ENTRY (kid->groupvar_entry), ""); + + gtk_list_store_clear (GTK_LIST_STORE (model)); + + gint i; + for (i = 0; i < n_KIDS; ++i) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (kid->checkbutton[i]), + FALSE); + } +} + +static void +run_define_groups_dialog (PsppireDialogActionKIndependent *kid) +{ + if (kid->lower_limit_value.f != SYSMIS) + psppire_value_entry_set_value (PSPPIRE_VALUE_ENTRY (kid->lower_limit_entry), + &kid->lower_limit_value, 0); + + if (kid->upper_limit_value.f != SYSMIS) + psppire_value_entry_set_value (PSPPIRE_VALUE_ENTRY (kid->upper_limit_entry), + &kid->upper_limit_value, 0); + + if (PSPPIRE_RESPONSE_CONTINUE == psppire_dialog_run (kid->subdialog)) + { + psppire_value_entry_get_value (PSPPIRE_VALUE_ENTRY (kid->lower_limit_entry), + &kid->lower_limit_value, 0); + + psppire_value_entry_get_value (PSPPIRE_VALUE_ENTRY (kid->upper_limit_entry), + &kid->upper_limit_value, 0); + } +} + + +static void +set_value_entry_variable (PsppireDialogActionKIndependent *kid, GtkEntry *entry) +{ + PsppireDialogAction *da = PSPPIRE_DIALOG_ACTION (kid); + const gchar *text = gtk_entry_get_text (entry); + + const struct variable *v = da->dict ? + psppire_dict_lookup_var (da->dict, text) : NULL; + + psppire_value_entry_set_variable (kid->lower_limit_entry, v); + psppire_value_entry_set_variable (kid->upper_limit_entry, v); +} + + +static void +psppire_dialog_action_k_independent_activate (PsppireDialogAction *a) +{ + PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); + PsppireDialogActionKIndependent *kid = PSPPIRE_DIALOG_ACTION_K_INDEPENDENT (a); + + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); + GtkBuilder *xml = g_hash_table_lookup (thing, a); + if (!xml) + { + xml = builder_new ("k-independent.ui"); + g_hash_table_insert (thing, a, xml); + + pda->dialog = get_widget_assert (xml, "k-independent-dialog"); + pda->source = get_widget_assert (xml, "k-independent-treeview1"); + + kid->vars_treeview = get_widget_assert (xml, "k-independent-treeview2"); + kid->groupvar_entry = get_widget_assert (xml, "k-independent-entry"); + + kid->subdialog = get_widget_assert (xml, "define-groups-dialog"); + + kid->lower_limit_entry = get_widget_assert (xml, "lower-limit-entry"); + kid->upper_limit_entry = get_widget_assert (xml, "upper-limit-entry"); + + kid->checkbutton[KID_KRUSKAL_WALLIS] = get_widget_assert (xml, + "kruskal-wallis"); + + kid->checkbutton[KID_MEDIAN] = get_widget_assert (xml, "median"); + + g_signal_connect_swapped (get_widget_assert (xml, "define-groups-button"), + "clicked", + G_CALLBACK (run_define_groups_dialog), kid); + + g_signal_connect_swapped (kid->groupvar_entry, "changed", + G_CALLBACK (set_value_entry_variable), kid); + } + + psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid); + psppire_dialog_action_set_refresh (pda, refresh); +} + +static void +psppire_dialog_action_k_independent_class_init (PsppireDialogActionKIndependentClass *class) +{ + psppire_dialog_action_set_activation (class, psppire_dialog_action_k_independent_activate); + PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax; +} + +static void +psppire_dialog_action_k_independent_init (PsppireDialogActionKIndependent *kid) +{ + kid->lower_limit_value.f = SYSMIS; + kid->upper_limit_value.f = SYSMIS; +} diff --git a/src/ui/gui/psppire-dialog-action-k-independent.h b/src/ui/gui/psppire-dialog-action-k-independent.h new file mode 100644 index 0000000000..aa0177b256 --- /dev/null +++ b/src/ui/gui/psppire-dialog-action-k-independent.h @@ -0,0 +1,93 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 2017 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_K_INDEPENDENT_H__ +#define __PSPPIRE_DIALOG_ACTION_K_INDEPENDENT_H__ + +G_BEGIN_DECLS + + +#define PSPPIRE_TYPE_DIALOG_ACTION_K_INDEPENDENT (psppire_dialog_action_k_independent_get_type ()) + +#define PSPPIRE_DIALOG_ACTION_K_INDEPENDENT(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + PSPPIRE_TYPE_DIALOG_ACTION_K_INDEPENDENT, PsppireDialogActionKIndependent)) + +#define PSPPIRE_DIALOG_ACTION_K_INDEPENDENT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ + PSPPIRE_TYPE_DIALOG_ACTION_K_INDEPENDENT, \ + PsppireDialogActionKIndependentClass)) + + +#define PSPPIRE_IS_DIALOG_ACTION_K_INDEPENDENT(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_DIALOG_ACTION_K_INDEPENDENT)) + +#define PSPPIRE_IS_DIALOG_ACTION_K_INDEPENDENT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_TYPE_DIALOG_ACTION_K_INDEPENDENT)) + + +#define PSPPIRE_DIALOG_ACTION_K_INDEPENDENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + PSPPIRE_TYPE_DIALOG_ACTION_K_INDEPENDENT, \ + PsppireDialogActionKIndependentClass)) + +typedef struct _PsppireDialogActionKIndependent PsppireDialogActionKIndependent; +typedef struct _PsppireDialogActionKIndependentClass PsppireDialogActionKIndependentClass; + + +enum + { + KID_KRUSKAL_WALLIS, + KID_MEDIAN, + n_KIDS + }; + +struct _PsppireDialogActionKIndependent +{ + PsppireDialogAction parent; + + /*< private >*/ + GtkWidget *checkbutton[n_KIDS]; + + GtkWidget *vars_treeview; + GtkWidget *groupvar_entry; + + GtkWidget *subdialog; + + GtkWidget *lower_limit_entry; + GtkWidget *upper_limit_entry; + + union value lower_limit_value; + union value upper_limit_value; +}; + + +struct _PsppireDialogActionKIndependentClass +{ + PsppireDialogActionClass parent_class; +}; + + +GType psppire_dialog_action_k_independent_get_type (void) ; + +G_END_DECLS + +#endif /* __PSPPIRE_DIALOG_ACTION_K_INDEPENDENT_H__ */ diff --git a/src/ui/gui/psppire-value-entry.c b/src/ui/gui/psppire-value-entry.c index c45db101bb..a21f10b84b 100644 --- a/src/ui/gui/psppire-value-entry.c +++ b/src/ui/gui/psppire-value-entry.c @@ -442,6 +442,10 @@ psppire_value_entry_set_value (PsppireValueEntry *obj, gchar *string; obj->cur_value = NULL; + + if (value == NULL) + return; + if (obj->show_value_label) { struct val_lab *vl = val_labs_lookup (obj->val_labs, value); diff --git a/src/ui/gui/widgets.c b/src/ui/gui/widgets.c index 37d13bf972..01496cf797 100644 --- a/src/ui/gui/widgets.c +++ b/src/ui/gui/widgets.c @@ -33,6 +33,7 @@ #include "psppire-dialog-action-histogram.h" #include "psppire-dialog-action-indep-samps.h" #include "psppire-dialog-action-k-related.h" +#include "psppire-dialog-action-k-independent.h" #include "psppire-dialog-action-1sks.h" #include "psppire-dialog-action-kmeans.h" #include "psppire-dialog-action-logistic.h" @@ -84,6 +85,7 @@ static const get_type_func dialog_action_types[]= psppire_dialog_action_histogram_get_type, psppire_dialog_action_logistic_get_type, psppire_dialog_action_kmeans_get_type, + psppire_dialog_action_k_independent_get_type, psppire_dialog_action_k_related_get_type, psppire_dialog_action_means_get_type, psppire_dialog_action_oneway_get_type,