From d1b00a324b8e9783212d680361a78b01b462e793 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 3 Feb 2012 19:16:33 -0800 Subject: made hardware settings floater dependent on preferences floater --- indra/newview/llfloaterpreference.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpreference.cpp') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index a333989e7e..655dde3145 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -741,7 +741,8 @@ void LLFloaterPreference::onClose(bool app_quitting) void LLFloaterPreference::onOpenHardwareSettings() { - LLFloaterReg::showInstance("prefs_hardware_settings"); + LLFloater* floater = LLFloaterReg::showInstance("prefs_hardware_settings"); + addDependentFloater(floater, FALSE); } // static void LLFloaterPreference::onBtnOK() -- cgit v1.2.3 From e328dcf4062177c903d3099d0d16477824d23025 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 6 Feb 2012 23:07:41 +0200 Subject: EXP-1849 FIXED Privacy settings could be set to default when modifying other preferences before login. --- indra/newview/llfloaterpreference.cpp | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'indra/newview/llfloaterpreference.cpp') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 655dde3145..173b0e538c 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1801,7 +1801,46 @@ void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) } } +class LLPanelPreferencePrivacy : public LLPanelPreference +{ +public: + LLPanelPreferencePrivacy() + { + mAccountIndependentSettings.push_back("VoiceCallsFriendsOnly"); + mAccountIndependentSettings.push_back("AutoDisengageMic"); + } + + /*virtual*/ void saveSettings() + { + LLPanelPreference::saveSettings(); + + // Don't save (=erase from the saved values map) per-account privacy settings + // if we're not logged in, otherwise they will be reset to defaults on log off. + if (LLStartUp::getStartupState() != STATE_STARTED) + { + // Erase only common settings, assuming there are no color settings on Privacy page. + for (control_values_map_t::iterator it = mSavedValues.begin(); it != mSavedValues.end(); ) + { + const std::string setting = it->first->getName(); + if (std::find(mAccountIndependentSettings.begin(), + mAccountIndependentSettings.end(), setting) == mAccountIndependentSettings.end()) + { + mSavedValues.erase(it++); + } + else + { + ++it; + } + } + } + } + +private: + std::list mAccountIndependentSettings; +}; + static LLRegisterPanelClassWrapper t_pref_graph("panel_preference_graphics"); +static LLRegisterPanelClassWrapper t_pref_privacy("panel_preference_privacy"); BOOL LLPanelPreferenceGraphics::postBuild() { -- cgit v1.2.3