diff --git a/main.c b/main.c index 5309c4d..cdf2b19 100644 --- a/main.c +++ b/main.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "main-window.h" #include "command-line.h" #include "external-renderer.h" @@ -85,8 +86,6 @@ static int start_gui(int argc, char **argv) g_application_register(G_APPLICATION(gapp), NULL, NULL); g_signal_connect(gapp, "activate", G_CALLBACK(gapp_activate), &appdata); - - menu = g_menu_new(); m_quit = g_menu_new(); m_about = g_menu_new(); @@ -115,6 +114,7 @@ int main(int argc, char **argv) GOptionContext *context; gchar *gds_name; gchar *basename; + struct lconv *temp_locale; gchar *pdfname = NULL, *texname = NULL, *mappingname = NULL, *cellname = NULL, *svgname = NULL; gboolean tikz = FALSE, pdf = FALSE, pdf_layers = FALSE, pdf_standalone = FALSE, svg = FALSE; gchar *custom_library_path = NULL; @@ -122,6 +122,11 @@ int main(int argc, char **argv) int scale = 1000; int app_status; + /* Set locale for layer mapping file */ + setlocale(LC_NUMERIC, ""); + temp_locale = localeconv(); + strcpy(temp_locale->decimal_point, "."); + strcpy(temp_locale->thousands_sep, "'"); GOptionEntry entries[] = { {"tikz", 't', 0, G_OPTION_ARG_NONE, &tikz, "Output TikZ code", NULL },