diff options
author | Adam Moss <moss@lindenlab.com> | 2008-04-17 14:56:00 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2008-04-17 14:56:00 +0000 |
commit | 669d1162f4c7529296d7018ec65960f120cc1c3e (patch) | |
tree | 807a035b4ee593587923e040b49bd5a6a8dc42cf /indra/newview/llappviewerlinux.cpp | |
parent | a3f3ab7e113e44309461b26399d627814f0ce4f9 (diff) |
QAR-460 Automatic XUI selection & Kick-ass Linux Fonts MergeMe
svn merge svn+ssh://svn.lindenlab.com/svn/linden/release@84983
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/fontconfig-merge1
Diffstat (limited to 'indra/newview/llappviewerlinux.cpp')
-rw-r--r-- | indra/newview/llappviewerlinux.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index d7a8e66a4b..3ea8c737c9 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -37,7 +37,9 @@ #include "llmemtype.h" #include "llviewernetwork.h" +#include "llviewercontrol.h" #include "llmd5.h" +#include "llfindlocale.h" #include <exception> @@ -432,7 +434,27 @@ bool LLAppViewerLinux::initLogging() bool LLAppViewerLinux::initParseCommandLine(LLCommandLineParser& clp) { - clp.parseCommandLine(gArgC, gArgV); + if (!clp.parseCommandLine(gArgC, gArgV)) + { + return false; + } + + // Find the system language. + FL_Locale *locale = NULL; + FL_Success success = FL_FindLocale(&locale, FL_MESSAGES); + if (success != 0) + { + if (success >= 2 && locale->lang) // confident! + { + LLControlVariable* c = gSavedSettings.getControl("SystemLanguage"); + if(c) + { + c->setValue(std::string(locale->lang), false); + } + } + FL_FreeLocale(&locale); + } + return true; } |