[recipes] Fix the langinfo check
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Fix the langinfo check
- Date: Mon, 5 Jun 2017 22:46:29 +0000 (UTC)
commit 1641d1c74375808f3ba2727845f4e4d1e0e78519
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 5 18:41:38 2017 -0400
Fix the langinfo check
_NL_MEASUREMENT_MEASUREMENT is not a define, so checking it
with #ifdef does not work. Check LC_MEASUREMENT instead,
which is a define.
src/gr-recipe-formatter.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-recipe-formatter.c b/src/gr-recipe-formatter.c
index e797d5c..b7334ef 100644
--- a/src/gr-recipe-formatter.c
+++ b/src/gr-recipe-formatter.c
@@ -44,11 +44,12 @@ static int
get_temperature_unit (void)
{
int unit;
-
GSettings *settings = gr_settings_get ();
- unit = g_settings_get_enum (settings, "temperature-unit");
+
+ unit = g_settings_get_enum (settings, "temperature-unit");
+
if (unit == GR_TEMPERATURE_UNIT_LOCALE) {
-#ifdef _NL_MEASUREMENT_MEASUREMENT
+#ifdef LC_MEASUREMENT
const char *fmt;
fmt = nl_langinfo (_NL_MEASUREMENT_MEASUREMENT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]