[shotwell] Check for LC_MEASUREMENT in a more portable way



commit b11f1b0fe626f50c5c715018d97bf7e438777fd7
Author: Jens Georg <mail jensge org>
Date:   Tue Mar 14 20:44:44 2017 +0100

    Check for LC_MEASUREMENT in a more portable way
    
    Signed-off-by: Jens Georg <mail jensge org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779844

 src/Resources.vala |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/Resources.vala b/src/Resources.vala
index 13a2b6e..4e39d32 100644
--- a/src/Resources.vala
+++ b/src/Resources.vala
@@ -768,11 +768,6 @@ along with Shotwell; if not, write to the Free Software Foundation, Inc.,
 
     }
 
-    [CCode (cname = "int", cprefix = "LC_", cheader_filename = "locale.h", has_type_id = false)]
-    private enum Lc {
-        MEASUREMENT
-    }
-
     public enum UnitSystem {
         IMPERIAL,
         METRIC,
@@ -788,7 +783,7 @@ along with Shotwell; if not, write to the Free Software Foundation, Inc.,
             return unit_system;
         }
 
-        lc_measurement = Intl.setlocale((LocaleCategory) Lc.MEASUREMENT, null);
+        lc_measurement = Environment.get_variable("LC_MEASUREMENT");
         if (lc_measurement == null) {
             lc_measurement = Intl.get_language_names()[0];
         }


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