From 12554bffb34895533ed11013a780bfa088756a67 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 4 Jan 2013 20:23:14 -0800 Subject: CHUI-580 : Fixed : Avoid fetching names while reacting to display name checkbox change (overkill), make display name pref disabled when usePeopleAPI is off --- indra/newview/llfloaterpreference.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpreference.cpp') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 13d8a79f8d..3d4a1c44d8 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1682,6 +1682,17 @@ LLPanelPreference::LLPanelPreference() //virtual BOOL LLPanelPreference::postBuild() { + ////////////////////// PanelGeneral /////////////////// + if (hasChild("display_names_check")) + { + BOOL use_people_api = gSavedSettings.getBOOL("UsePeopleAPI"); + LLCheckBoxCtrl* ctrl_display_name = getChild("display_names_check"); + ctrl_display_name->setEnabled(use_people_api); + if (!use_people_api) + { + ctrl_display_name->setValue(FALSE); + } + } ////////////////////// PanelVoice /////////////////// if (hasChild("voice_unavailable")) @@ -1732,7 +1743,7 @@ BOOL LLPanelPreference::postBuild() getChild("favorites_on_login_check")->setCommitCallback(boost::bind(&showFavoritesOnLoginWarning, _1, _2)); } - // Panel Advanced + //////////////////////PanelAdvanced /////////////////// if (hasChild("modifier_combo")) { //localizing if push2talk button is set to middle mouse -- cgit v1.2.3