[gtk-server] Re: Formatting floats (Was: gtk-server Digest V5 #3)

  • From: Erik Winkels <euqirea@xxxxxxxxx>
  • To: gtk-server@xxxxxxxxxxxxx
  • Date: Tue, 9 Sep 2008 09:09:02 +0200

Hi Peter,

> Date: Mon, 08 Sep 2008 21:58:04 +0200
> From: Peter van Eerten <administrator@xxxxxxxxxxxxxx>
> Subject: [gtk-server] Re: Formatting floats (Was: gtk-server Digest V5
> Now, I would like to turn your question around. If you are able to  
> provide me with a working and compilable C-example of the  
> functionality you need, I will provide you with an implementation  
> using the GTK-server. How does that sound?

That sounds great.  I was planning on adding my solution below to gtk-
server and send that to you once I had released a first version of my
app but your suggestion is even better.

>> I still think gtk-server providing a pointer to a function for handling
>> the decimals would be the best solution, something like:
>>     > gtk_server_decimals_cell_data_func 2
>>     1098432
>>     > gtk_tree_view_column_set_data_func col renderer 1098432 NULL NULL
>>     ok
>> Where the argument to gtk_server_decimals_cell_data_func is the amount
>> of decimals you want to display.  So it would return different pointers
>> for different arguments.
> Wouldn't that lead to an endless amount of functions?

Yes, that's a downside as I mentioned before :-)

Still, wanting control over the amount of decimals should be one of the
most (of not the most) common cases.

You'll hear back from me later, but it might take a week or two!


Other related posts: