From 8fd1635b003bf042ecf85839a7d181c55c092a8a Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 9 Apr 2012 21:50:20 +0200 Subject: [PATCH] Examine dialog: Allow only numeric variables to be selected as the dependent variable --- src/ui/gui/psppire-dialog-action-examine.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/gui/psppire-dialog-action-examine.c b/src/ui/gui/psppire-dialog-action-examine.c index 5ecec171b9..c5c8bd85dd 100644 --- a/src/ui/gui/psppire-dialog-action-examine.c +++ b/src/ui/gui/psppire-dialog-action-examine.c @@ -20,6 +20,8 @@ #include "psppire-dialog-action-examine.h" #include "psppire-var-view.h" +#include "dialog-common.h" +#include "psppire-selector.h" #include "psppire-dict.h" #include "psppire-dialog.h" #include "builder-wrapper.h" @@ -206,6 +208,8 @@ psppire_dialog_action_examine_activate (GtkAction *a) GtkWidget *stats_button = get_widget_assert (xml, "stats-button"); GtkWidget *opts_button = get_widget_assert (xml, "opts-button"); + GtkWidget *dep_sel = get_widget_assert (xml, "psppire-selector1"); + pda->dialog = get_widget_assert (xml, "examine-dialog"); pda->source = get_widget_assert (xml, "treeview1"); act->variables = get_widget_assert (xml, "treeview2"); @@ -226,6 +230,8 @@ psppire_dialog_action_examine_activate (GtkAction *a) "model", pda->dict, NULL); + psppire_selector_set_allow (PSPPIRE_SELECTOR (dep_sel), numeric_only); + psppire_dialog_action_set_valid_predicate (pda, (void *) dialog_state_valid); psppire_dialog_action_set_refresh (pda, dialog_refresh); -- 2.30.2