X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fvar-type-dialog.c;h=a4c2a22769c3be34911893232659125d14dd726b;hb=cc5b378f1f8931ecd107a6f88c4918a13f4d28d8;hp=fb1977a5ab211a1f3c33bf2241bc02642cea14fd;hpb=49ad45764ab062f60a205dd84d0c3b600f051727;p=pspp diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index fb1977a5ab..a4c2a22769 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -21,18 +21,15 @@ #include #include - #include #include -#include "var-type-dialog.h" - -#include "helper.h" - -#include -#include -#include - +#include "data/data-out.h" +#include "data/settings.h" +#include "data/variable.h" +#include "libpspp/message.h" +#include "ui/gui/helper.h" +#include "ui/gui/var-type-dialog.h" struct tgs { @@ -262,12 +259,12 @@ preview_custom (GtkWidget *w, gpointer data) union value v; v.f = 1234.56; - sample_text = value_to_text (v, dialog->vs->dictionary, dialog->fmt_l); + sample_text = g_strchug (data_out (&v, NULL, &dialog->fmt_l)); gtk_label_set_text (GTK_LABEL (dialog->label_psample), sample_text); g_free (sample_text); v.f = -v.f; - sample_text = value_to_text (v, dialog->vs->dictionary, dialog->fmt_l); + sample_text = g_strchug (data_out (&v, NULL, &dialog->fmt_l)); gtk_label_set_text (GTK_LABEL (dialog->label_nsample), sample_text); g_free (sample_text); } @@ -320,15 +317,13 @@ set_format_type_from_treeview (GtkTreeView *treeview, gpointer data) /* Create the structure */ struct var_type_dialog * -var_type_dialog_create (GtkWindow *toplevel, PsppireVarStore *vs) +var_type_dialog_create (GtkWindow *toplevel) { gint i; struct var_type_dialog *dialog = g_malloc (sizeof (struct var_type_dialog)); GtkBuilder *xml = builder_new ("var-sheet-dialogs.ui"); - dialog->vs = vs; - dialog->window = get_widget_assert (xml,"var_type_dialog"); dialog->active_button = -1;