X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fweight-cases-dialog.c;h=1871f7aa9c40a417054c69e12bd4665440e7236b;hb=b94025a12799b6826a772731b8f58907dca2cf5c;hp=8cfae24b74bded8b517a85784c3214bab3852d36;hpb=c3e2ab6b50eb3b3c7e0852f2a4e2122f695714ff;p=pspp-builds.git diff --git a/src/ui/gui/weight-cases-dialog.c b/src/ui/gui/weight-cases-dialog.c index 8cfae24b..1871f7aa 100644 --- a/src/ui/gui/weight-cases-dialog.c +++ b/src/ui/gui/weight-cases-dialog.c @@ -19,7 +19,7 @@ #include "weight-cases-dialog.h" #include "psppire-selector.h" #include "psppire-dialog.h" -#include "helper.h" +#include "executor.h" #include "psppire-data-window.h" #include "dict-display.h" #include @@ -120,6 +120,7 @@ weight_cases_dialog (GObject *o, gpointer data) PsppireVarStore *vs = NULL; g_object_get (de->data_editor, "var-store", &vs, NULL); + g_object_get (vs, "dictionary", &wcd.dict, NULL); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); @@ -130,21 +131,20 @@ weight_cases_dialog (GObject *o, gpointer data) g_signal_connect (selector, "de-selected", G_CALLBACK (on_deselect), radiobutton1); - g_object_set (source, "model", vs->dict, + + g_object_set (source, "model", wcd.dict, "selection-mode", GTK_SELECTION_SINGLE, "predicate", var_is_numeric, NULL); - psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector), - source, - entry, + psppire_selector_set_select_func (PSPPIRE_SELECTOR (selector), insert_source_row_into_entry, - is_currently_in_entry, - NULL - ); + NULL); + + psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector), + is_currently_in_entry); - wcd.dict = vs->dict; wcd.entry = GTK_ENTRY (entry); wcd.status = GTK_LABEL (status); wcd.off = GTK_TOGGLE_BUTTON (radiobutton1);