projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Separated psppire_selector_set_subjects into two individual functions
[pspp-builds.git]
/
src
/
ui
/
gui
/
t-test-independent-samples-dialog.c
diff --git
a/src/ui/gui/t-test-independent-samples-dialog.c
b/src/ui/gui/t-test-independent-samples-dialog.c
index e5a04a076a22d833a2397a9b899c97ef695860ff..473e04e02b2f86d09dd150862cff4baadb4e78dd 100644
(file)
--- a/
src/ui/gui/t-test-independent-samples-dialog.c
+++ b/
src/ui/gui/t-test-independent-samples-dialog.c
@@
-1,5
+1,5
@@
/* PSPPIRE - a graphical user interface for PSPP.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007
, 2009
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
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
@@
-21,7
+21,7
@@
#include "t-test-independent-samples-dialog.h"
#include "psppire-dict.h"
#include "psppire-var-store.h"
#include "t-test-independent-samples-dialog.h"
#include "psppire-dict.h"
#include "psppire-var-store.h"
-#include "
helpe
r.h"
+#include "
executo
r.h"
#include "psppire-data-window.h"
#include "psppire-dialog.h"
#include "dialog-common.h"
#include "psppire-data-window.h"
#include "psppire-dialog.h"
#include "dialog-common.h"
@@
-117,8
+117,8
@@
tt_groups_dialog_create (GtkBuilder *xml, GtkWindow *parent)
gtk_window_set_transient_for (GTK_WINDOW (grps->dialog), parent);
gtk_window_set_transient_for (GTK_WINDOW (grps->dialog), parent);
- grps->val[0] = strdup ("");
- grps->val[1] = strdup ("");
+ grps->val[0] =
x
strdup ("");
+ grps->val[1] =
x
strdup ("");
return grps;
}
return grps;
}
@@
-340,10
+340,10
@@
run_define_groups (struct tt_indep_samples_dialog *ttd)
grps->group_defn = GROUPS_VALUES;
grps->val[0] =
grps->group_defn = GROUPS_VALUES;
grps->val[0] =
- strdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[0])));
+
x
strdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[0])));
grps->val[1] =
grps->val[1] =
- strdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[1])));
+
x
strdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[1])));
}
else
{
}
else
{
@@
-352,7
+352,7
@@
run_define_groups (struct tt_indep_samples_dialog *ttd)
grps->val[1] = NULL;
grps->val[0] =
grps->val[1] = NULL;
grps->val[0] =
- strdup (gtk_entry_get_text (GTK_ENTRY (grps->cut_point_entry)));
+
x
strdup (gtk_entry_get_text (GTK_ENTRY (grps->cut_point_entry)));
}
psppire_dialog_notify_change (PSPPIRE_DIALOG (ttd->dialog));
}
psppire_dialog_notify_change (PSPPIRE_DIALOG (ttd->dialog));
@@
-416,7
+416,7
@@
t_test_independent_samples_dialog (GObject *o, gpointer data)
tt_d.dialog = get_widget_assert (xml, "t-test-independent-samples-dialog");
tt_d.xml = xml;
tt_d.dialog = get_widget_assert (xml, "t-test-independent-samples-dialog");
tt_d.xml = xml;
-
tt_d.dict = vs->dict
;
+
g_object_get (vs, "dictionary", &tt_d.dict, NULL)
;
tt_d.define_groups_button = get_widget_assert (xml, "define-groups-button");
tt_d.groups_entry = get_widget_assert (xml, "indep-samples-t-test-entry");
tt_d.define_groups_button = get_widget_assert (xml, "define-groups-button");
tt_d.groups_entry = get_widget_assert (xml, "indep-samples-t-test-entry");
@@
-426,29
+426,26
@@
t_test_independent_samples_dialog (GObject *o, gpointer data)
gtk_window_set_transient_for (GTK_WINDOW (tt_d.dialog), GTK_WINDOW (de));
gtk_window_set_transient_for (GTK_WINDOW (tt_d.dialog), GTK_WINDOW (de));
- g_object_set (dict_view, "dictionary",
- vs->dict,
- NULL);
+ g_object_set (dict_view, "model", tt_d.dict, NULL);
- set_dest_model (GTK_TREE_VIEW (test_variables_treeview),
vs->
dict);
+ set_dest_model (GTK_TREE_VIEW (test_variables_treeview),
tt_d.
dict);
- psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1),
- dict_view, test_variables_treeview,
+ psppire_selector_set_select_func (PSPPIRE_SELECTOR (selector1),
insert_source_row_into_tree_view,
insert_source_row_into_tree_view,
- NULL,
NULL);
psppire_selector_set_allow (PSPPIRE_SELECTOR (selector1),
numeric_only);
NULL);
psppire_selector_set_allow (PSPPIRE_SELECTOR (selector1),
numeric_only);
- psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2),
- dict_view, tt_d.groups_entry,
+ psppire_selector_set_select_func (PSPPIRE_SELECTOR (selector2),
insert_source_row_into_entry,
insert_source_row_into_entry,
- is_currently_in_entry,
NULL);
NULL);
+ psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector2),
+ is_currently_in_entry);
+
g_signal_connect_swapped (tt_d.define_groups_button, "clicked",
G_CALLBACK (run_define_groups), &tt_d);
g_signal_connect_swapped (tt_d.define_groups_button, "clicked",
G_CALLBACK (run_define_groups), &tt_d);