Histogram Dialog: Allow only numeric variables to be selected
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 11 Jul 2020 04:37:36 +0000 (06:37 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 11 Jul 2020 04:37:34 +0000 (06:37 +0200)
src/ui/gui/psppire-dialog-action-histogram.c

index e6a6fe733e82381cb1c9f14147afc539500f9e6c..f99000ac2898767180c2663e15971329effe02c2 100644 (file)
@@ -69,6 +69,9 @@ psppire_dialog_action_histogram_activate (PsppireDialogAction *a, GVariant *para
   pda->dialog = get_widget_assert (xml, "histogram-dialog");
   pda->source = get_widget_assert (xml, "dict-view");
 
+  g_object_set (pda->source,
+               "predicate", var_is_numeric, NULL);
+
   act->variable = get_widget_assert (xml, "entry1");
   act->curve = get_widget_assert (xml, "curve");
 
@@ -120,4 +123,3 @@ static void
 psppire_dialog_action_histogram_init (PsppireDialogActionHistogram *act)
 {
 }
-