Hello, ....
g_snprintf ( c, 32, "%g%s", adjustment->value, sp_unit_selector_get_unit (us)->abbr );
and this one needs to be replaced.
Se attached diff for the function that causes the komma. For now I don't see other cases that generate wrong number output even there are a lot printfs.
Many thanks,
Adib.
--- desktop-properties.cvs.cpp 2004-03-14 20:20:44.000000000 +0100 +++ desktop-properties.cpp 2004-03-28 00:49:54.000000000 +0100 @@ -54,8 +54,9 @@ #include "../xml/repr.h" #include "../xml/repr-private.h"
#include "desktop-properties.h" +#include "svg/stringstream.h"
static void sp_dtw_activate_desktop ( Inkscape::Application *inkscape, SPDesktop *desktop, GtkWidget *dialog); @@ -232,9 +233,10 @@ SPDocument *doc; SPRepr *repr; SPUnitSelector *us; const gchar *key; - gchar c[32]; + Inkscape::SVGOStringStream os; +
if (gtk_object_get_data (GTK_OBJECT (dialog), "update")) return;
dt = SP_ACTIVE_DESKTOP; @@ -250,15 +252,15 @@ * cm when writing */ const SPUnit *unit = sp_unit_selector_get_unit (us); if (!strcmp(unit->abbr, "m")) { - g_snprintf (c, 32, "%g%s", 100*adjustment->value, "cm"); + os << 100*adjustment->value << "cm"; } else { - g_snprintf ( c, 32, "%g%s", adjustment->value, unit->abbr); + os << adjustment->value << unit->abbr; }
- sp_repr_set_attr (repr, key, c); + sp_repr_set_attr (repr, key, os.str().c_str());
/* Save this for later if (!strcmp(key, "width") || !strcmp(key, "height")) {