Re: g_format_file_size_for_display()



Am Mittwoch, den 19.12.2007, 08:52 +0100 schrieb Sven Neumann:
> Hi,
> 
> On Tue, 2007-12-18 at 17:14 -0600, Federico Mena Quintero wrote:
> 
> > > char *g_format_file_size_for_display (goffset size);
> > > 
> > > Ideally this one needs to take another parameter indicating
> whether you
> > > want 1kb = 1000 bytes or 1kb = 1024 bytes. 
> > 
> > No, because then you'll have applications using either, and then
> someone
> > will want to make them consistent and we'll get an option in the
> control
> > center an an XSETTING, which is yet another thing we'll have to port
> > over when moving from GConf to DConf, and it's just a big fat mess.

The issue seems to be a constant source of conflict, so why shouldn't we
add another preference? The dispute under

http://bugzilla.gnome.org/show_bug.cgi?id=550100 

proofs it. An environment variable would be enough, and if it was
outside the GLib name space it could even be used by console
applications (like ls).

> Yes, because this is a choice that the application developer needs to
> make, not the user. So this is never going to become am option in the
> control center or an XSETTING. We just need to make sure that the API
> docs give the application developer the information they need to make
> the right choice.

I'm not sure why application developers may want to enforce this
decision. Maybe you could give an example where it is important?

I tend to call it a cultural decision, i.e. something like a time format
or measurement units. Maybe it should be put into a LC_* environment
variable (cf. man locale)? That would at least make sense if it directly
depends on the country or origin of the user, rather than being “just” a
matter of taste.

best regards,
 Christian Neumair


-- 
Christian Neumair <cneumair gnome org>



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