Commit 2a8bab17 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

serialize the unit factor with g_ascii_formatd() so it is locale

2002-04-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpunits.c: serialize the unit factor with
	g_ascii_formatd() so it is locale independent.
parent 65cfa8db
2002-04-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpunits.c: serialize the unit factor with
g_ascii_formatd() so it is locale independent.
2002-04-14 Michael Natterer <mitch@gimp.org>
 
* app/file/file-utils.[ch]: added utility functions
......
......@@ -193,16 +193,19 @@ gimp_unitrc_save (Gimp *gimp)
{
if (gimp_unit_get_deletion_flag (i) == FALSE)
{
gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
fprintf (fp,
"(unit-info \"%s\"\n"
" (factor %f)\n"
" (factor %s)\n"
" (digits %d)\n"
" (symbol \"%s\")\n"
" (abbreviation \"%s\")\n"
" (singular \"%s\")\n"
" (plural \"%s\"))\n\n",
gimp_unit_get_identifier (i),
gimp_unit_get_factor (i),
g_ascii_formatd (buf, sizeof (buf), "%f",
gimp_unit_get_factor (i)),
gimp_unit_get_digits (i),
gimp_unit_get_symbol (i),
gimp_unit_get_abbreviation (i),
......
......@@ -193,16 +193,19 @@ gimp_unitrc_save (Gimp *gimp)
{
if (gimp_unit_get_deletion_flag (i) == FALSE)
{
gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
fprintf (fp,
"(unit-info \"%s\"\n"
" (factor %f)\n"
" (factor %s)\n"
" (digits %d)\n"
" (symbol \"%s\")\n"
" (abbreviation \"%s\")\n"
" (singular \"%s\")\n"
" (plural \"%s\"))\n\n",
gimp_unit_get_identifier (i),
gimp_unit_get_factor (i),
g_ascii_formatd (buf, sizeof (buf), "%f",
gimp_unit_get_factor (i)),
gimp_unit_get_digits (i),
gimp_unit_get_symbol (i),
gimp_unit_get_abbreviation (i),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment