gvalue type conversions


I noticed that GValue currently only has the type conversions you
might expect for C types (e.g. int<->uint). 

What are the guidelines for which conversions are allowed, and when
conversion should be performed?

It would seem useful to support conversions from most primitive types
(int, float, etc.) to strings, for the purposes of the TreeView. If
you have a GtkListStore containing integers, for example, it would be
convenient if GtkCellRendererText could automatically display those as
text.  It looks like adding an int->string conversion makes this
happen automatically, because you can set the "text" property from a
GValue with type G_VALUE_INT.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]