New file: builder-wrapper.h and builder-wrapper.c
[pspp-builds.git] / src / ui / gui / k-means-dialog.c
index 1de9b74c2b116d5f401d0674abfd5ab62e430750..329602b336814ba313cf87a0fc8c2eae4a6ce561 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2011  Free Software Foundation
+   Copyright (C) 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
@@ -30,6 +30,7 @@
 
 #include "executor.h"
 #include "helper.h"
+#include "builder-wrapper.h"
 
 #include <gtk/gtk.h>
 
@@ -113,14 +114,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)