After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 107497 - GIMP should use locale setting for US/metric units as the default
GIMP should use locale setting for US/metric units as the default
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
unspecified
Other All
: Low enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2003-03-03 21:38 UTC by Christian Rose
Modified: 2005-08-18 15:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Rose 2003-03-03 21:38:51 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.
Comment 1 Raphaël Quinet 2003-03-04 08:02:45 UTC
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.
Comment 2 Michael Natterer 2003-03-04 10:00:38 UTC
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.
Comment 3 Dave Neary 2003-07-24 15:19:28 UTC
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.
Comment 4 Dave Neary 2003-07-26 10:33:22 UTC
Bumping a bunch of enhancement requests which will not be done by the feature
freeze to Future. 

Dave.
Comment 5 Peter Oliver 2004-01-10 14:55:30 UTC
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.
Comment 6 Sven Neumann 2004-01-10 15:39:34 UTC
Issues with the print plug-in are supposed to be reported against
gimp-print which has a bug-tracker on sourceforge.
Comment 7 Sven Neumann 2005-07-13 16:16:15 UTC
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.
Comment 8 Sven Neumann 2005-07-26 15:13:55 UTC
No idea, anyone?
Comment 9 Sven Neumann 2005-08-17 17:03:45 UTC
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.
Comment 10 Sven Neumann 2005-08-18 15:10:16 UTC
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).