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 779844 - Check defaults for measurement units
Check defaults for measurement units
Status: RESOLVED FIXED
Product: shotwell
Classification: Other
Component: general
unspecified
Other Linux
: Normal blocker
: 0.26
Assigned To: Shotwell Maintainers
Shotwell Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-10 11:41 UTC by Jens Georg
Modified: 2017-03-15 10:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
printing: Use inch/cm depending on locale settings (4.38 KB, patch)
2017-03-13 18:34 UTC, Jens Georg
committed Details | Review
Check for LC_MEASUREMENT in a more portable way (1.23 KB, patch)
2017-03-14 19:45 UTC, Jens Georg
committed Details | Review

Description Jens Georg 2017-03-10 11:41:37 UTC
E.g. in the printing dialog it defaults to inch
 - Use LC_MEASUREMENT to get the preferred locale
 - Save user's choice

Since measurement isn't easily gathered and the number of lcoales that are imperial is rather limited, we can hardcode them.

cf: bug 736768 and http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qlocale_data_p.h?h=dev#n67

Apparently es_PR should be metric (link missing) and Liberia is currently switching. Myanmar seems to be completely different.
Comment 1 Jens Georg 2017-03-13 18:34:54 UTC
Created attachment 347863 [details] [review]
printing: Use inch/cm depending on locale settings

Signed-off-by: Jens Georg <mail@jensge.org>
Comment 2 Jens Georg 2017-03-13 18:36:54 UTC
Attachment 347863 [details] pushed as eaf7e88 - printing: Use inch/cm depending on locale settings
Comment 3 Antoine Jacoutot 2017-03-14 09:26:58 UTC
Unfortunately, this prevents building shotwell on non-Linux OSes because LC_MEASUREMENT is a GNU extension.
Comment 4 Jens Georg 2017-03-14 09:50:41 UTC
Oh for fucks sake. The unix landscape is severly broken.
Comment 5 Jens Georg 2017-03-14 19:45:57 UTC
Created attachment 347942 [details] [review]
Check for LC_MEASUREMENT in a more portable way

Signed-off-by: Jens Georg <mail@jensge.org>
Comment 6 Jens Georg 2017-03-14 19:48:33 UTC
Attachment 347942 [details] pushed as b11f1b0 - Check for LC_MEASUREMENT in a more portable way
Comment 7 Antoine Jacoutot 2017-03-15 09:54:44 UTC
Thank you Jens. For the record this did not only impact *BSD but also Linux distributions not using GNU libc.
Comment 8 Jens Georg 2017-03-15 10:05:35 UTC
True, but I would consider *BSD the more common case of non-GNU libc