projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog-action-indep-samps.c
diff --git
a/src/ui/gui/psppire-dialog-action-indep-samps.c
b/src/ui/gui/psppire-dialog-action-indep-samps.c
index 32db97ea13c2c7344d2887d07abdf88f0852f963..31b8cc78c98ede6dc62ccb3f75bc7e57ca243e98 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-indep-samps.c
+++ b/
src/ui/gui/psppire-dialog-action-indep-samps.c
@@
-74,6
+74,7
@@
refresh (PsppireDialogAction *da)
value_destroy (&act->cut_point, width);
value_destroy (&act->grp_val[0], width);
value_destroy (&act->grp_val[1], width);
value_destroy (&act->cut_point, width);
value_destroy (&act->grp_val[0], width);
value_destroy (&act->grp_val[1], width);
+ var_unref (act->grp_var);
act->grp_var = NULL;
act->grp_var_width = -1;
}
act->grp_var = NULL;
act->grp_var_width = -1;
}
@@
-104,7
+105,7
@@
value_entry_contains_invalid (PsppireValueEntry *ve, const struct variable *var)
if (psppire_value_entry_get_value (ve, &val, width))
{
if (psppire_value_entry_get_value (ve, &val, width))
{
- if (var_is_value_missing (var, &val
, MV_SYSTEM)
)
+ if (var_is_value_missing (var, &val
) == MV_SYSTEM
)
{
result = TRUE;
}
{
result = TRUE;
}
@@
-187,7
+188,7
@@
run_define_groups (PsppireDialogActionIndepSamps *act)
psppire_value_entry_set_variable (PSPPIRE_VALUE_ENTRY (act->dg_grp_entry[1]), act->grp_var);
psppire_value_entry_set_variable (PSPPIRE_VALUE_ENTRY (act->dg_cut_point_entry), act->grp_var);
psppire_value_entry_set_variable (PSPPIRE_VALUE_ENTRY (act->dg_grp_entry[1]), act->grp_var);
psppire_value_entry_set_variable (PSPPIRE_VALUE_ENTRY (act->dg_cut_point_entry), act->grp_var);
- if (act->group_defn != GROUPS_CUT_POINT
)
+ if (act->group_defn != GROUPS_CUT_POINT)
{
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (act->dg_cut_point_toggle_button), TRUE);
{
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (act->dg_cut_point_toggle_button), TRUE);
@@
-243,7
+244,7
@@
on_grp_var_change (GtkEntry *entry, PsppireDialogActionIndepSamps *act)
PsppireDialogAction *da = PSPPIRE_DIALOG_ACTION (act);
const gchar *text = gtk_entry_get_text (entry);
PsppireDialogAction *da = PSPPIRE_DIALOG_ACTION (act);
const gchar *text = gtk_entry_get_text (entry);
-
const
struct variable *v = da->dict ? psppire_dict_lookup_var (da->dict, text) : NULL;
+ struct variable *v = da->dict ? psppire_dict_lookup_var (da->dict, text) : NULL;
gtk_widget_set_sensitive (act->define_groups_button, v != NULL);
gtk_widget_set_sensitive (act->define_groups_button, v != NULL);
@@
-276,7
+277,11
@@
on_grp_var_change (GtkEntry *entry, PsppireDialogActionIndepSamps *act)
}
}
}
}
- act->grp_var = v;
+ struct variable *old_grp_var = act->grp_var;
+ if (v)
+ act->grp_var = var_ref (v);
+ if (old_grp_var)
+ var_unref (old_grp_var);
act->grp_var_width = v ? var_get_width (v) : -1;
}
act->grp_var_width = v ? var_get_width (v) : -1;
}
@@
-299,7
+304,7
@@
psppire_dialog_action_indep_samps_activate (PsppireDialogAction *a, GVariant *pa
PsppireDialogActionIndepSamps *act = PSPPIRE_DIALOG_ACTION_INDEP_SAMPS (a);
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionIndepSamps *act = PSPPIRE_DIALOG_ACTION_INDEP_SAMPS (a);
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
- GtkBuilder *xml = builder_new (
"indep-samples.ui");
+ GtkBuilder *xml = builder_new ("indep-samples.ui");
pda->dialog = get_widget_assert (xml,"independent-samples-dialog");
pda->source = get_widget_assert (xml, "indep-samples-treeview1");
pda->dialog = get_widget_assert (xml,"independent-samples-dialog");
pda->source = get_widget_assert (xml, "indep-samples-treeview1");