GNOME Bugzilla – Bug 107497
GIMP should use locale setting for US/metric units as the default
Last modified: 2005-08-18 15:10:16 UTC
Currently GIMP defaults to use US units in the interface. The information about which unit system to use is already provided in the locale (LC_MEASUREMENT; 1 for metric, 2 for US), so it would probably make sense for GIMP to also use this information for the default unit setting unless otherwise specified by the user.
I agree. This, together with other things such as guessing an appropriate value for the tile cache size (see the thread on the developers mailing list in November 2002), should be set when the GIMP is run for the first time. So these things should be part of the install procedure for the user.
It's trivial to add another page to the user_install dialog and taking over locale dependent settings from the user's environment is a good idea IMHO. Setting severity to "enhancment" because GIMP already supports metric units.
What's the status for this? Is there any code which does the logic of this selection? As for adding another page to the install for locale settings, I'd be against that. I think it would be better to use the LC_MEASUREMENT variable (or one which controls it) if it's set, otherwise do what we default to now. Cheers, Dave.
Bumping a bunch of enhancement requests which will not be done by the feature freeze to Future. Dave.
Similarly, I notice that the print dialogue defaults to Letter paper, when, presumably, my inheritted $LC_PAPER setting of "en_GB.iso88591" should suggest that A4 would be more sensible.
Issues with the print plug-in are supposed to be reported against gimp-print which has a bug-tracker on sourceforge.
If I use setlocale() to query for LC_MEASUREMENT in my C program, all I get is a string like "en_US.UTF-8" or "de_DE.UTF-8". At the shell prompt, I can use "locale LC_MEASUREMENT" to get 1 (for metric) or 2 (for imperial). So, I have no idea how to access this setting from C. Otherwise this would be a trivial fix.
No idea, anyone?
The whole thing is probably not much of an issue nowadays since we default to pixels in most places. However since I figured out the secrets of nl_langinfo(), I have now done this change: 2005-08-17 Sven Neumann <sven@gimp.org> * configure.in: check for langinfo.h and _NL_MEASUREMENT_MEASUREMENT. * app/core/gimptemplate.c: try to determine the default unit from the locale settings. Supposed to fix bug #107497.
This is much better and probably what the bug report asked for initially: 2005-08-18 Sven Neumann <sven@gimp.org> * app/core/gimptemplate.c: go back to using dpi as the default resolution unit. * app/core/gimp-utils.[ch]: moved the code to determine the unit from the locale settings here as gimp_get_default_unit(). * app/dialogs/print-size-dialog.c * app/widgets/gimpimagepropview.c: use the unit returned by the new function to display the print size (bug #107497).