diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-05-12 16:46:26 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-05-12 16:46:26 -0700 |
commit | c3ccbecfdae1df3738775d1165cb3361b4f06d90 (patch) | |
tree | b69e48c4547368320f17dc9916e5f6055904163e | |
parent | d36cffcb7b6b7eaed4e110dd1c92d0e397e7cfe6 (diff) |
DEV-50013 Add "Turning off Display Names" preference
reviewed by James
-rw-r--r-- | indra/newview/app_settings/settings.xml | 13 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 6 |
4 files changed, 26 insertions, 12 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aeba46a92d..c76772f18d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -24,7 +24,7 @@ <key>Value</key> <integer>0</integer> </map> - <key>AgentPause</key> + <key>AgentPause</key> <map> <key>Comment</key> <string>Ask the simulator to stop updating the agent while enabled</string> @@ -10218,6 +10218,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>UseDisplayNames</key> + <map> + <key>Comment</key> + <string>Use new, changeable, unicode names</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>UseEnergy</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 45ff38421f..3281e15e2c 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -186,6 +186,7 @@ void LLVoiceSetKeyDialog::onCancel(void* user_data) // a static member and update all our static callbacks void handleNameTagOptionChanged(const LLSD& newvalue); +void handleDisplayNamesOptionChanged(const LLSD& newvalue); bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response); //bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater); @@ -226,6 +227,12 @@ void handleNameTagOptionChanged(const LLSD& newvalue) LLVOAvatar::invalidateNameTags(); } +void handleDisplayNamesOptionChanged(const LLSD& newvalue) +{ + LLAvatarNameCache::setUseDisplayNames(newvalue.asBoolean()); +} + + /*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -319,7 +326,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) sSkin = gSavedSettings.getString("SkinCurrent"); - gSavedSettings.getControl("NameTagShowSLIDs")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); + gSavedSettings.getControl("NameTagShowSLIDs")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); + gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2)); } BOOL LLFloaterPreference::postBuild() @@ -456,10 +464,6 @@ void LLFloaterPreference::apply() } } - LLUICtrl* display_names_check = getChild<LLUICtrl>("display_names_check"); - bool use_display_names = display_names_check->getValue().asBoolean(); - LLAvatarNameCache::setUseDisplayNames(use_display_names); - applyResolution(); } @@ -542,10 +546,6 @@ void LLFloaterPreference::onOpen(const LLSD& key) LLPanelLogin::setAlwaysRefresh(true); refresh(); - bool use_display_names = LLAvatarNameCache::useDisplayNames(); - LLUICtrl* display_names_check = getChild<LLUICtrl>("display_names_check"); - display_names_check->setValue( LLSD(use_display_names) ); - // Make sure the current state of prefs are saved away when // when the floater is opened. That will make cancel do its // job diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9867372001..8f53463269 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2783,6 +2783,7 @@ void LLStartUp::initNameCache() // Start cache in not-running state until we figure out if we have // capabilities for display name lookup LLAvatarNameCache::initClass(false); + LLAvatarNameCache::setUseDisplayNames(gSavedSettings.getBOOL("UseDisplayNames")); } void LLStartUp::cleanupNameCache() diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 2452067383..e3ee14771c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -125,7 +125,8 @@ Automatic position for: left_pad="30" name="first_person_avatar_visible" width="256" /> - <check_box + +<check_box control_name="ArrowKeysAlwaysMove" follows="left|top" height="20" @@ -322,6 +323,7 @@ Automatic position for: parameter="pref_joystick" /> </button> <check_box + control_name="UseDisplayNames" follows="top|left" height="15" label="Use Display Names (PLACEHOLDER)" @@ -330,5 +332,5 @@ Automatic position for: name="display_names_check" width="237" tool_tip="Check to use display names in chat, IM, name tags, etc." - top_pad="5"/> + top_pad="5"/> </panel> |