diff options
author | Aleric Inglewood | 2010-10-20 18:31:42 +0200 |
---|---|---|
committer | Aleric Inglewood | 2010-10-20 18:31:42 +0200 |
commit | 2f4e17af336c9a399a0274b7836f40fc7ff56e21 (patch) | |
tree | 1c5c9d83bab4a602b58b439ffccd758ebca54836 /linden/indra/llui/lltexteditor.cpp | |
parent | Update WebKit Version in About floater. (diff) | |
download | meta-impy-2f4e17af336c9a399a0274b7836f40fc7ff56e21.zip meta-impy-2f4e17af336c9a399a0274b7836f40fc7ff56e21.tar.gz meta-impy-2f4e17af336c9a399a0274b7836f40fc7ff56e21.tar.bz2 meta-impy-2f4e17af336c9a399a0274b7836f40fc7ff56e21.tar.xz |
LindenUserDir fixes.
The LindenUserDir (~/.imprudence/first_last/) cannot be initialized
before the user logged in. However, several singletons (that only can be
initialized once) depend on this directory for initialization. Therefore
we have to take care not to instantiate those singletons until after the
user logged in.
With regard to webit, this fixes the browser_profile (cache and cookies)
directory that the builtin browser uses.
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index fdf8bcf..004d063 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -57,6 +57,7 @@ | |||
57 | #include "llimagegl.h" | 57 | #include "llimagegl.h" |
58 | #include "llwindow.h" | 58 | #include "llwindow.h" |
59 | #include "lltextparser.h" | 59 | #include "lltextparser.h" |
60 | #include "lldir.h" | ||
60 | #include <queue> | 61 | #include <queue> |
61 | 62 | ||
62 | #include "llmenugl.h" | 63 | #include "llmenugl.h" |
@@ -4205,7 +4206,10 @@ void LLTextEditor::appendColoredText(const std::string &new_text, | |||
4205 | const std::string& font_name) | 4206 | const std::string& font_name) |
4206 | { | 4207 | { |
4207 | LLColor4 lcolor=color; | 4208 | LLColor4 lcolor=color; |
4208 | if (mParseHighlights) | 4209 | // If LindenUserDir is empty then we didn't login yet. |
4210 | // In that case we can't instantiate LLTextParser, which | ||
4211 | // is initialized per user. | ||
4212 | if (mParseHighlights && !gDirUtilp->getLindenUserDir(true).empty()) | ||
4209 | { | 4213 | { |
4210 | LLTextParser* highlight = LLTextParser::getInstance(); | 4214 | LLTextParser* highlight = LLTextParser::getInstance(); |
4211 | highlight->parseFullLineHighlights(new_text, &lcolor); | 4215 | highlight->parseFullLineHighlights(new_text, &lcolor); |
@@ -4285,7 +4289,10 @@ void LLTextEditor::appendHighlightedText(const std::string &new_text, | |||
4285 | S32 highlight_part, | 4289 | S32 highlight_part, |
4286 | LLStyleSP stylep) | 4290 | LLStyleSP stylep) |
4287 | { | 4291 | { |
4288 | if (mParseHighlights) | 4292 | // If LindenUserDir is empty then we didn't login yet. |
4293 | // In that case we can't instantiate LLTextParser, which | ||
4294 | // is initialized per user. | ||
4295 | if (mParseHighlights && !gDirUtilp->getLindenUserDir(true).empty()) | ||
4289 | { | 4296 | { |
4290 | LLTextParser* highlight = LLTextParser::getInstance(); | 4297 | LLTextParser* highlight = LLTextParser::getInstance(); |
4291 | 4298 | ||