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).
parent
6f292de9ca
commit
dba05505ee
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -907,6 +907,13 @@ Port settings take effect after you restart [APP_NAME].
|
|||
The new skin will appear after you restart [APP_NAME].
|
||||
</notification>
|
||||
|
||||
<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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue