K-means dialog only should accept numeric variables
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 25 Jul 2011 17:15:20 +0000 (19:15 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 25 Jul 2011 17:15:20 +0000 (19:15 +0200)
src/ui/gui/k-means-dialog.c

index 1de9b74c2b116d5f401d0674abfd5ab62e430750..0b2f00fa9c9a6153415f7ed25e784d5324428d6f 100644 (file)
@@ -113,14 +113,13 @@ k_means_dialog (PsppireDataWindow *dw)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fd.de));
 
   g_object_get (vs, "dictionary", &fd.dict, NULL);
-  g_object_set (source, "model", fd.dict, NULL);
+  g_object_set (source, "model", fd.dict,
+               "predicate", var_is_numeric,
+               NULL);
 
   psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
                                      dialog_state_valid, &fd);
 
-  psppire_selector_set_allow (PSPPIRE_SELECTOR (get_widget_assert (fd.xml, "psppire-selector1")),
-                             numeric_only);
-
   response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
 
   switch (response)