diff options
author | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
commit | 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch) | |
tree | 95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/newview/llappviewerlinux.cpp | |
parent | Second Life viewer sources 1.20.6 (diff) | |
download | meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2 meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz |
Second Life viewer sources 1.20.7
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llappviewerlinux.cpp | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/linden/indra/newview/llappviewerlinux.cpp b/linden/indra/newview/llappviewerlinux.cpp index 084df9b..e41c505 100644 --- a/linden/indra/newview/llappviewerlinux.cpp +++ b/linden/indra/newview/llappviewerlinux.cpp | |||
@@ -37,7 +37,9 @@ | |||
37 | 37 | ||
38 | #include "llmemtype.h" | 38 | #include "llmemtype.h" |
39 | #include "llviewernetwork.h" | 39 | #include "llviewernetwork.h" |
40 | #include "llviewercontrol.h" | ||
40 | #include "llmd5.h" | 41 | #include "llmd5.h" |
42 | #include "llfindlocale.h" | ||
41 | 43 | ||
42 | #include <exception> | 44 | #include <exception> |
43 | 45 | ||
@@ -129,7 +131,7 @@ static inline BOOL do_basic_glibc_backtrace() | |||
129 | 131 | ||
130 | std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); | 132 | std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); |
131 | llinfos << "Opening stack trace file " << strace_filename << llendl; | 133 | llinfos << "Opening stack trace file " << strace_filename << llendl; |
132 | FILE* StraceFile = LLFile::fopen(strace_filename.c_str(), "w"); | 134 | LLFILE* StraceFile = LLFile::fopen(strace_filename.c_str(), "w"); |
133 | if (!StraceFile) | 135 | if (!StraceFile) |
134 | { | 136 | { |
135 | llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; | 137 | llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; |
@@ -160,7 +162,7 @@ static inline BOOL do_basic_glibc_backtrace() | |||
160 | 162 | ||
161 | std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); | 163 | std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); |
162 | llinfos << "Opening stack trace file " << strace_filename << llendl; | 164 | llinfos << "Opening stack trace file " << strace_filename << llendl; |
163 | FILE* StraceFile = LLFile::fopen(strace_filename.c_str(), "w"); // Flawfinder: ignore | 165 | LLFILE* StraceFile = LLFile::fopen(strace_filename.c_str(), "w"); // Flawfinder: ignore |
164 | if (!StraceFile) | 166 | if (!StraceFile) |
165 | { | 167 | { |
166 | llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; | 168 | llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; |
@@ -198,7 +200,7 @@ static inline BOOL do_elfio_glibc_backtrace() | |||
198 | 200 | ||
199 | std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); | 201 | std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); |
200 | llinfos << "Opening stack trace file " << strace_filename << llendl; | 202 | llinfos << "Opening stack trace file " << strace_filename << llendl; |
201 | FILE* StraceFile = LLFile::fopen(strace_filename.c_str(), "w"); // Flawfinder: ignore | 203 | LLFILE* StraceFile = LLFile::fopen(strace_filename.c_str(), "w"); // Flawfinder: ignore |
202 | if (!StraceFile) | 204 | if (!StraceFile) |
203 | { | 205 | { |
204 | llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; | 206 | llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl; |
@@ -346,7 +348,7 @@ void LLAppViewerLinux::handleCrashReporting() | |||
346 | {(char*)cmd.c_str(), | 348 | {(char*)cmd.c_str(), |
347 | ask_dialog, | 349 | ask_dialog, |
348 | (char*)"-user", | 350 | (char*)"-user", |
349 | (char*)gGridName.c_str(), | 351 | (char*)LLViewerLogin::getInstance()->getGridLabel().c_str(), |
350 | (char*)"-name", | 352 | (char*)"-name", |
351 | (char*)LLAppViewer::instance()->getSecondLifeTitle().c_str(), | 353 | (char*)LLAppViewer::instance()->getSecondLifeTitle().c_str(), |
352 | NULL}; | 354 | NULL}; |
@@ -432,7 +434,27 @@ bool LLAppViewerLinux::initLogging() | |||
432 | 434 | ||
433 | bool LLAppViewerLinux::initParseCommandLine(LLCommandLineParser& clp) | 435 | bool LLAppViewerLinux::initParseCommandLine(LLCommandLineParser& clp) |
434 | { | 436 | { |
435 | clp.parseCommandLine(gArgC, gArgV); | 437 | if (!clp.parseCommandLine(gArgC, gArgV)) |
438 | { | ||
439 | return false; | ||
440 | } | ||
441 | |||
442 | // Find the system language. | ||
443 | FL_Locale *locale = NULL; | ||
444 | FL_Success success = FL_FindLocale(&locale, FL_MESSAGES); | ||
445 | if (success != 0) | ||
446 | { | ||
447 | if (success >= 2 && locale->lang) // confident! | ||
448 | { | ||
449 | LLControlVariable* c = gSavedSettings.getControl("SystemLanguage"); | ||
450 | if(c) | ||
451 | { | ||
452 | c->setValue(std::string(locale->lang), false); | ||
453 | } | ||
454 | } | ||
455 | FL_FreeLocale(&locale); | ||
456 | } | ||
457 | |||
436 | return true; | 458 | return true; |
437 | } | 459 | } |
438 | 460 | ||