X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Froc-dialog.c;h=4d1a7d30b18ad435bf2b54decf5b755f48237269;hb=38a4aa5aaf58d39eafa0574416f36b16ebb9c4f6;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..4d1a7d30 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,6 +148,8 @@ 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),