X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fmissing-val-dialog.c;h=4e1665456288cdd3581f2feab06680ceb3b268e2;hb=2dd0df69f627a06ffb887128d22e3d686d1cd207;hp=74bc6755537229f13f3ad2d59248369ce712dbd6;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp-builds.git diff --git a/src/ui/gui/missing-val-dialog.c b/src/ui/gui/missing-val-dialog.c index 74bc6755..4e166545 100644 --- a/src/ui/gui/missing-val-dialog.c +++ b/src/ui/gui/missing-val-dialog.c @@ -21,11 +21,17 @@ /* This module describes the behaviour of the Missing Values dialog box, used for input of the missing values in the variable sheet */ +#include +#include +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + + #include "helper.h" #include "missing-val-dialog.h" -#include "missing-values.h" -#include "variable.h" -#include "data-in.h" +#include +#include +#include #include "psppire-variable.h" #include @@ -33,12 +39,12 @@ #include -#define _(A) A /* A simple (sub) dialog box for displaying user input errors */ static void err_dialog(const gchar *msg, GtkWindow *window) { + GtkWidget *hbox ; GtkWidget *label = gtk_label_new (msg); GtkWidget *dialog = @@ -60,7 +66,7 @@ err_dialog(const gchar *msg, GtkWindow *window) G_CALLBACK (gtk_widget_destroy), dialog); - GtkWidget *hbox = gtk_hbox_new(FALSE, 10); + hbox = gtk_hbox_new(FALSE, 10); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), hbox); @@ -117,6 +123,7 @@ missing_val_dialog_accept(GtkWidget *w, gpointer data) if (gtk_toggle_button_get_active(dialog->button_range)) { + gchar *discrete_text ; union value low_val ; union value high_val; @@ -141,10 +148,9 @@ missing_val_dialog_accept(GtkWidget *w, gpointer data) return; } - gchar *discrete_text = + discrete_text = g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog->discrete))); - mv_set_type(&dialog->mvl, MV_NONE); mv_add_num_range(&dialog->mvl, low_val.f, high_val.f); @@ -254,13 +260,15 @@ missing_val_dialog_create(GladeXML *xml) void missing_val_dialog_show(struct missing_val_dialog *dialog) { + const struct fmt_spec *write_spec ; + gint i; g_return_if_fail(dialog); g_return_if_fail(dialog->pv); mv_copy (&dialog->mvl, psppire_variable_get_missing(dialog->pv)); - const struct fmt_spec *write_spec = psppire_variable_get_write_spec(dialog->pv); + write_spec = psppire_variable_get_write_spec(dialog->pv); /* Blank all entry boxes and make them insensitive */ gtk_entry_set_text(GTK_ENTRY(dialog->low), ""); @@ -318,10 +326,11 @@ missing_val_dialog_show(struct missing_val_dialog *dialog) { if ( i < n) { + gchar *text ; union value value; mv_peek_value(&dialog->mvl, &value, i); - gchar *text = value_to_text(value, *write_spec); + text = value_to_text(value, *write_spec); gtk_entry_set_text(GTK_ENTRY(dialog->mv[i]), text); g_free(text); }