X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-select.c;h=376cc9f59c2b1ae294fd307e03fe4808f31eaa4e;hb=6ade38440fe2fa866e6dda407ab09555a3052f21;hp=d3eee6570dcf242ff19516122ce52d9c597c0956;hpb=567296e593b62f7d36d8c768debb2ed04d34e3a1;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-select.c b/src/ui/gui/psppire-dialog-action-select.c index d3eee6570d..376cc9f59c 100644 --- a/src/ui/gui/psppire-dialog-action-select.c +++ b/src/ui/gui/psppire-dialog-action-select.c @@ -47,6 +47,18 @@ G_DEFINE_TYPE (PsppireDialogActionSelect, psppire_dialog_action_select, PSPPIRE_ static gboolean dialog_state_valid (gpointer data) { + PsppireDialogActionSelect *act = PSPPIRE_DIALOG_ACTION_SELECT (data); + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (act->radiobutton_all))) + { + return TRUE; + } + else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (act->radiobutton_filter_variable))) + { + const gchar *text = gtk_entry_get_text (GTK_ENTRY (act->entry)); + if (!psppire_dict_lookup_var (PSPPIRE_DIALOG_ACTION (act)->dict, text)) + return FALSE; + } + return TRUE; }