X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fvar-type-dialog.c;h=a44b04465b475cd014aa68324d1558e52bd3787f;hb=159abf428abd3028a73d064508fac95e542d9f09;hp=7b663383912c91b4f78ff6caac99b05b2be265da;hpb=f00405e1ee47e1bf52ee1a37bae28e383a27c204;p=pspp diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index 7b66338391..a44b04465b 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -84,6 +84,9 @@ static GObject *psppire_var_type_dialog_constructor (GType type, guint, GObjectConstructParam *); static void psppire_var_type_dialog_set_state (PsppireVarTypeDialog *); +static void psppire_var_type_dialog_set_format (PsppireVarTypeDialog *dialog, + const struct fmt_spec *format); + static int find_format (const struct fmt_spec *target, const struct fmt_spec formats[], int n_formats); static int find_format_type (int target, const int types[], int n_types); @@ -145,7 +148,7 @@ psppire_var_type_dialog_get_property (GObject *object, } } -void +static void psppire_var_type_dialog_set_format (PsppireVarTypeDialog *dialog, const struct fmt_spec *format) { @@ -153,7 +156,7 @@ psppire_var_type_dialog_set_format (PsppireVarTypeDialog *dialog, psppire_var_type_dialog_set_state (dialog); } -const struct fmt_spec * +static const struct fmt_spec * psppire_var_type_dialog_get_format (const PsppireVarTypeDialog *dialog) { return &dialog->fmt_l; @@ -207,10 +210,13 @@ psppire_var_type_dialog_run (GtkWindow *parent_window, dialog = psppire_var_type_dialog_new (format); gtk_window_set_transient_for (GTK_WINDOW (dialog), 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) *format = *psppire_var_type_dialog_get_format (dialog); + + gtk_widget_destroy (GTK_WIDGET (dialog)); }