Re: gtk_list and double type
- From: Gonzalo Paniagua Javier <gonzalo gnome-db org>
- To: gtk-app-devel-list gnome org
- Subject: Re: gtk_list and double type
- Date: Wed, 19 Jun 2002 03:19:51 +0200
* [ Olivier Mougin <themac club-internet fr>
* Wed, 19 Jun 2002 02:33:10 +0200 ]
Hello all,
In my list_store i've got strange thinks
all field of type double appear like: 2.50000 or 3,000000
how can i do for remove all this 0 and have think like that:
2.5
The value transformation from double to string is (gvaluetransform.c):
DEFINE_SPRINTF (double_string, v_double, "%f");
So it uses the default for %f (6 digits of precision).
May be you can register a new type which is just a double but with other
type name and then register a transformation function from your type to
string using, for example, %g or whatever you want.
Cheers.
--
Gonzalo Paniagua Javier <gonzalo gnome-db org>
http://www.gnome-db.org/~gonzalo/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]