X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Froc-dialog.c;h=cf0a831f812edbe3171e4a85220ba8f26b38e215;hb=d3bb6901f626d91b0234f5ff1f5f7c2f9023f863;hp=6896ef7b2d183997c63dc5183eec9f192e8af811;hpb=bb025f49673d66a2e490a781d7d59b2f32da0087;p=pspp-builds.git diff --git a/src/ui/gui/roc-dialog.c b/src/ui/gui/roc-dialog.c index 6896ef7b..cf0a831f 100644 --- a/src/ui/gui/roc-dialog.c +++ b/src/ui/gui/roc-dialog.c @@ -100,6 +100,22 @@ dialog_state_valid (gpointer data) return TRUE; } +static void +on_curve_button_toggle (GtkCheckButton *curve, struct roc *rd) +{ + if ( !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (curve))) + { + if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->reference))) + g_object_set (rd->reference, "inconsistent", TRUE, NULL); + g_object_set (rd->reference, "sensitive", FALSE, NULL); + } + else + { + g_object_set (rd->reference, "inconsistent", FALSE, NULL); + g_object_set (rd->reference, "sensitive", TRUE, NULL); + } +} + /* Pops up the Roc dialog box */ void @@ -132,11 +148,16 @@ roc_dialog (GObject *o, gpointer data) g_object_get (vs, "dictionary", &rd.dict, NULL); g_object_set (source, "model", rd.dict, NULL); + g_signal_connect (rd.curve, "toggled", G_CALLBACK (on_curve_button_toggle), &rd); + g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh), &rd); psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog), dialog_state_valid, &rd); + psppire_selector_set_allow (PSPPIRE_SELECTOR (get_widget_assert (xml, "dep-selector")), + numeric_only); + response = psppire_dialog_run (PSPPIRE_DIALOG (dialog)); switch (response)