[recipes] Initialize locale earlier



commit 082d7cdde25c8f22250ced4d474194eefd11f5b7
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Dec 30 15:42:10 2016 -0500

    Initialize locale earlier
    
    If we rely on GtkApplication to do it for us, it does not
    happen until startup, which is after we loaded the recipe
    database, and thus, too late.

 src/main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 1ad2b92..3062805 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,7 @@
 
 #include <gtk/gtk.h>
 #include <libintl.h>
+#include <locale.h>
 
 #include "gr-app.h"
 #include "gr-cuisine-page.h"
@@ -57,6 +58,7 @@ main (int argc, char *argv[])
         g_type_ensure (GR_TYPE_TIMER_WIDGET);
         g_type_ensure (GR_TYPE_TOGGLE_BUTTON);
 
+        setlocale (LC_ALL, "");
         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
         textdomain (GETTEXT_PACKAGE);


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