/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
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
#include "select-cases-dialog.h"
#include <gtk/gtk.h>
-#include "helper.h"
+#include "executor.h"
#include "psppire-dialog.h"
#include "psppire-data-window.h"
-#include "dialog-common.h"
+#include "psppire-selector.h"
#include "dict-display.h"
+#include "dialog-common.h"
#include "widget-io.h"
#include <language/syntax-string-source.h>
#include "helper.h"
+#include <xalloc.h>
#include <gettext.h>
gtk_table_attach_defaults (GTK_TABLE (table),
scd->hbox1, 1, 2, 0, 1);
- g_signal_connect (G_OBJECT (percent), "toggled",
+ g_signal_connect (percent, "toggled",
G_CALLBACK (set_sensitivity_from_toggle), scd->hbox1);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (percent), TRUE);
gtk_table_attach_defaults (GTK_TABLE (table),
scd->hbox2, 1, 2, 1, 2);
- g_signal_connect (G_OBJECT (sample_n_cases), "toggled",
+ g_signal_connect (sample_n_cases, "toggled",
G_CALLBACK (set_sensitivity_from_toggle), scd->hbox2);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sample_n_cases), FALSE);
{
GtkWidget *source = get_widget_assert (scd.xml, "select-cases-treeview");
- attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
- scd.data_store->dict,
- GTK_SELECTION_SINGLE, NULL);
+ g_object_set (source, "model",
+ scd.data_store->dict,
+ "selection-mode",
+ GTK_SELECTION_SINGLE, NULL);
- psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
- source,
- entry,
- insert_source_row_into_entry,
- is_currently_in_entry,
- NULL);
+ psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector),
+ is_currently_in_entry);
}
(GTK_TOGGLE_BUTTON (get_widget_assert (scd->xml,
"radiobutton-all"))))
{
- return strdup ("\n");
+ return xstrdup ("\n");
}
string = g_string_new ("");