summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llxml/llcontrol.h4
-rwxr-xr-xindra/newview/llfloaterpreference.cpp39
-rw-r--r--indra/newview/llfloaterpreference.h8
-rw-r--r--indra/newview/llstartup.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences.xml2
5 files changed, 49 insertions, 5 deletions
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index bf38a8b062..597031ec70 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -92,6 +92,8 @@ typedef enum e_control_type
class LLControlVariable : public LLRefCount
{
+ LOG_CLASS(LLControlVariable);
+
friend class LLControlGroup;
public:
@@ -180,6 +182,8 @@ T convert_from_llsd(const LLSD& sd, eControlType type, const std::string& contro
//const U32 STRING_CACHE_SIZE = 10000;
class LLControlGroup : public LLInstanceTracker<LLControlGroup, std::string>
{
+ LOG_CLASS(LLControlGroup);
+
protected:
typedef std::map<std::string, LLControlVariablePtr > ctrl_name_table_t;
ctrl_name_table_t mNameTable;
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<std::string> mAccountIndependentSettings;
+};
+
static LLRegisterPanelClassWrapper<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics");
+static LLRegisterPanelClassWrapper<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy");
BOOL LLPanelPreferenceGraphics::postBuild()
{
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 7ee3294478..ec5994e917 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -198,15 +198,17 @@ public:
virtual void saveSettings();
class Updater;
+
+protected:
+ typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
+ control_values_map_t mSavedValues;
+
private:
//for "Only friends and groups can call or IM me"
static void showFriendsOnlyWarning(LLUICtrl*, const LLSD&);
//for "Show my Favorite Landmarks at Login"
static void showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LLSD& value);
- typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
- control_values_map_t mSavedValues;
-
typedef std::map<std::string, LLColor4> string_color_map_t;
string_color_map_t mSavedColors;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 3923b4510a..0ac8c1fe39 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -880,7 +880,6 @@ bool idle_startup()
LLFile::mkdir(gDirUtilp->getLindenUserDir());
// Set PerAccountSettingsFile to the default value.
- std::string per_account_settings_file = LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount");
gSavedSettings.setString("PerAccountSettingsFile",
gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,
LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount")));
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index 402868bb97..b2662331b0 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -100,7 +100,7 @@
help_topic="preferences_colors_tab"
name="colors" />
<panel
- class="panel_preference"
+ class="panel_preference_privacy"
filename="panel_preferences_privacy.xml"
label="Privacy"
layout="topleft"