From 6de5133609140d91af3ba61fd817ea37f45f73c3 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 13 Jan 2017 20:14:45 +0000 Subject: [PATCH] GTK: default to the en_US locale if LANGUAGE is set and empty. --- CONTRIBUTING.md | 10 ++++++++++ src/platform/gtkmain.cpp | 3 +++ 2 files changed, 13 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 107722d1..d74a2a1c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -238,3 +238,13 @@ any other information that is requested: This will generate a large file called `core` in the current directory; it can be later re-loaded using `lldb -c core`. + +### Debugging GUI-related bugs on Linux + +There are several environment variables available that make crashes +earlier and errors more informative. Before running SolveSpace, run +the following commands in your shell: + + export G_DEBUG=fatal_warnings + export LIBGL_DEBUG=1 + export MESA_DEBUG=1 diff --git a/src/platform/gtkmain.cpp b/src/platform/gtkmain.cpp index 19365b51..249db3ae 100644 --- a/src/platform/gtkmain.cpp +++ b/src/platform/gtkmain.cpp @@ -1433,6 +1433,9 @@ int main(int argc, char** argv) { while(*langNames) { if(SetLocale(*langNames++)) break; } + if(!*langNames) { + SetLocale("en_US"); + } #if defined(HAVE_SPACEWARE) && defined(GDK_WINDOWING_X11) if(GDK_IS_X11_DISPLAY(Gdk::Display::get_default()->gobj())) {