summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2010-11-22 17:18:59 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2010-11-22 17:18:59 +0200
commitdba05505ee0d5ad23cd7b2fab44271b3487b2712 (patch)
treed8be373bd6775f5fe9d54e59d74b3c90a37f75b3 /indra/newview
parent6f292de9caf0abd645774f2d0d569baeda6c668b (diff)
STORM-517 FIXED Warn user that language change will only take effect after restarting viewer.
The warning is shown only once (until the preferences floater is reopened).
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpreference.cpp18
-rw-r--r--indra/newview/llfloaterpreference.h2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml7
3 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index ac940f4f77..6a7b5171b5 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -283,6 +283,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
: LLFloater(key),
mGotPersonalInfo(false),
mOriginalIMViaEmail(false),
+ mLanguageChanged(false),
mDoubleClickActionDirty(false)
{
//Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
@@ -351,6 +352,8 @@ BOOL LLFloaterPreference::postBuild()
std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
setCacheLocation(cache_location);
+ getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this));
+
// if floater is opened before login set default localized busy message
if (LLStartUp::getStartupState() < STATE_STARTED)
{
@@ -570,6 +573,9 @@ void LLFloaterPreference::onOpen(const LLSD& key)
getChildView("maturity_desired_combobox")->setVisible( false);
}
+ // Forget previous language changes.
+ mLanguageChanged = false;
+
// Display selected maturity icons.
onChangeMaturity();
@@ -727,6 +733,18 @@ void LLFloaterPreference::onClickBrowserClearCache()
LLNotificationsUtil::add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache);
}
+// Called when user changes language via the combobox.
+void LLFloaterPreference::onLanguageChange()
+{
+ // Let the user know that the change will only take effect after restart.
+ // Do it only once so that we're not too irritating.
+ if (!mLanguageChanged)
+ {
+ LLNotificationsUtil::add("ChangeLanguage");
+ mLanguageChanged = true;
+ }
+}
+
void LLFloaterPreference::onClickSetCache()
{
std::string cur_name(gSavedSettings.getString("CacheLocation"));
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 46f50d9a4d..bb871e7e25 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -83,6 +83,7 @@ protected:
void onBtnApply();
void onClickBrowserClearCache();
+ void onLanguageChange();
// set value of "BusyResponseChanged" in account settings depending on whether busy response
// string differs from default after user changes.
@@ -158,6 +159,7 @@ private:
bool mDoubleClickActionDirty;
bool mGotPersonalInfo;
bool mOriginalIMViaEmail;
+ bool mLanguageChanged;
bool mOriginalHideOnlineStatus;
std::string mDirectoryVisibility;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9536bf2cf7..60b876d163 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -909,6 +909,13 @@ The new skin will appear after you restart [APP_NAME].
<notification
icon="alertmodal.tga"
+ name="ChangeLanguage"
+ type="alertmodal">
+Changing language will take effect after you restart [APP_NAME].
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="GoToAuctionPage"
type="alertmodal">
Go to the [SECOND_LIFE] web page to see auction details or make a bid?