X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-oneway.c;h=c817f71f152a983d8f9515b39cc2e4c15e924c96;hb=14f4522a17db23e67a6fa17876633cc6260cb42b;hp=66b80f6417e901b8b908102e573f33d0aaf557de;hpb=5f91f0868ec7cdbdb7900a2cb6e876b467fb2a6e;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-oneway.c b/src/ui/gui/psppire-dialog-action-oneway.c index 66b80f6417..c817f71f15 100644 --- a/src/ui/gui/psppire-dialog-action-oneway.c +++ b/src/ui/gui/psppire-dialog-action-oneway.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2012, 2013 Free Software Foundation + Copyright (C) 2012, 2013, 2014 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,8 @@ #include "psppire-dialog-action-oneway.h" +#include + #include "psppire-var-view.h" #include "psppire-acr.h" @@ -89,7 +91,7 @@ generate_syntax (PsppireDialogAction *act) gtk_tree_model_get (GTK_TREE_MODEL (ls), &iter, 0, &v, -1); - ds_put_c_format (&dss, " %g", v); + ds_put_c_format (&dss, " %.*g", DBL_DIG + 1, v); } } @@ -177,7 +179,7 @@ list_store_changed (PsppireDialogActionOneway *csd) total += v; } - text = g_strdup_printf ("%g", total); + text = g_strdup_printf ("%.*g", DBL_DIG + 1, total); gtk_entry_set_text (GTK_ENTRY (csd->ctotal), text);