From db4f8b66d2851b83e65a3ee94f1b21a71b66efa8 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Wed, 19 Apr 2017 12:05:31 +0200 Subject: [PATCH] Make missing-value-dialog return a status --- src/ui/gui/missing-val-dialog.c | 6 ++++-- src/ui/gui/missing-val-dialog.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ui/gui/missing-val-dialog.c b/src/ui/gui/missing-val-dialog.c index 45916dd932..83ec504edd 100644 --- a/src/ui/gui/missing-val-dialog.c +++ b/src/ui/gui/missing-val-dialog.c @@ -151,7 +151,7 @@ psppire_missing_val_dialog_new (const struct variable *var) NULL)); } -void +gint psppire_missing_val_dialog_run (GtkWindow *parent_window, const struct variable *var, struct missing_values *mv) @@ -163,12 +163,14 @@ psppire_missing_val_dialog_run (GtkWindow *parent_window, gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_widget_show (GTK_WIDGET (dialog)); - if (psppire_dialog_run (PSPPIRE_DIALOG (dialog)) == GTK_RESPONSE_OK) + gint result = psppire_dialog_run (PSPPIRE_DIALOG (dialog)); + if (result == GTK_RESPONSE_OK) mv_copy (mv, psppire_missing_val_dialog_get_missing_values (dialog)); else mv_copy (mv, var_get_missing_values (var)); gtk_widget_destroy (GTK_WIDGET (dialog)); + return result; } diff --git a/src/ui/gui/missing-val-dialog.h b/src/ui/gui/missing-val-dialog.h index 12bf110129..6d04d55bd5 100644 --- a/src/ui/gui/missing-val-dialog.h +++ b/src/ui/gui/missing-val-dialog.h @@ -71,7 +71,7 @@ void psppire_missing_val_dialog_set_variable (PsppireMissingValDialog *, const struct missing_values *psppire_missing_val_dialog_get_missing_values ( const PsppireMissingValDialog *); -void psppire_missing_val_dialog_run (GtkWindow *parent_window, +gint psppire_missing_val_dialog_run (GtkWindow *parent_window, const struct variable *, struct missing_values *); -- 2.30.2