diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llagentlanguage.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/linden/indra/newview/llagentlanguage.cpp b/linden/indra/newview/llagentlanguage.cpp index 5656f76..7f4322a 100644 --- a/linden/indra/newview/llagentlanguage.cpp +++ b/linden/indra/newview/llagentlanguage.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2006-2008, Linden Research, Inc. | 7 | * Copyright (c) 2006-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -31,13 +31,17 @@ | |||
31 | 31 | ||
32 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
33 | #include "llagentlanguage.h" | 33 | #include "llagentlanguage.h" |
34 | // viewer includes | ||
34 | #include "llagent.h" | 35 | #include "llagent.h" |
35 | #include "llviewercontrol.h" | 36 | #include "llviewercontrol.h" |
36 | #include "llviewerregion.h" | 37 | #include "llviewerregion.h" |
38 | // library includes | ||
39 | #include "llui.h" // getLanguage() | ||
37 | 40 | ||
38 | LLAgentLanguage::LLAgentLanguage() | 41 | LLAgentLanguage::LLAgentLanguage() |
39 | { | 42 | { |
40 | gSavedSettings.getControl("Language")->getSignal()->connect(boost::bind(&update)); | 43 | gSavedSettings.getControl("Language")->getSignal()->connect(boost::bind(&update)); |
44 | gSavedSettings.getControl("InstallLanguage")->getSignal()->connect(boost::bind(&update)); | ||
41 | gSavedSettings.getControl("SystemLanguage")->getSignal()->connect(boost::bind(&update)); | 45 | gSavedSettings.getControl("SystemLanguage")->getSignal()->connect(boost::bind(&update)); |
42 | gSavedSettings.getControl("LanguageIsPublic")->getSignal()->connect(boost::bind(&update)); | 46 | gSavedSettings.getControl("LanguageIsPublic")->getSignal()->connect(boost::bind(&update)); |
43 | } | 47 | } |
@@ -51,9 +55,7 @@ bool LLAgentLanguage::update() | |||
51 | std::string url = gAgent.getRegion()->getCapability("UpdateAgentLanguage"); | 55 | std::string url = gAgent.getRegion()->getCapability("UpdateAgentLanguage"); |
52 | if (!url.empty()) | 56 | if (!url.empty()) |
53 | { | 57 | { |
54 | std::string language = gSavedSettings.getString("Language"); | 58 | std::string language = LLUI::getLanguage(); |
55 | if (language == "default") | ||
56 | language = gSavedSettings.getString("SystemLanguage"); | ||
57 | 59 | ||
58 | body["language"] = language; | 60 | body["language"] = language; |
59 | body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); | 61 | body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); |
@@ -62,4 +64,3 @@ bool LLAgentLanguage::update() | |||
62 | } | 64 | } |
63 | return true; | 65 | return true; |
64 | } | 66 | } |
65 | |||