From 6ade38440fe2fa866e6dda407ab09555a3052f21 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 16 Jan 2016 09:32:30 +0100 Subject: [PATCH] Populate select dialog's dialog_is_valid function Closes bug #46901 --- src/ui/gui/psppire-dialog-action-select.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; } -- 2.30.2