diff options
Diffstat (limited to 'indra/newview/llpanelmediasettingspermissions.cpp')
-rw-r--r-- | indra/newview/llpanelmediasettingspermissions.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp index e5caaaaffc..8fbc8247c4 100644 --- a/indra/newview/llpanelmediasettingspermissions.cpp +++ b/indra/newview/llpanelmediasettingspermissions.cpp @@ -99,7 +99,7 @@ void LLPanelMediaSettingsPermissions::draw() // housekeeping LLPanel::draw(); - childSetText("perms_group_name",LLStringUtil::null); + getChild<LLUICtrl>("perms_group_name")->setValue(LLStringUtil::null); LLUUID group_id; BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) @@ -107,18 +107,16 @@ void LLPanelMediaSettingsPermissions::draw() if(mPermsGroupName) { mPermsGroupName->setNameID(group_id, true); - mPermsGroupName->setEnabled(true); - }; + } } else { if(mPermsGroupName) { mPermsGroupName->setNameID(LLUUID::null, TRUE); - mPermsGroupName->refresh(LLUUID::null, LLStringUtil::null, LLStringUtil::null, true); - mPermsGroupName->setEnabled(false); - }; - }; + mPermsGroupName->refresh(LLUUID::null, std::string(), true); + } + } } //////////////////////////////////////////////////////////////////////////////// @@ -142,6 +140,12 @@ void LLPanelMediaSettingsPermissions::clearValues( void* userdata, bool editable self->mPermsGroupControl->setEnabled(editable); self->mPermsWorldInteract->setEnabled(editable); self->mPermsWorldControl->setEnabled(editable); + + self->getChild< LLTextBox >("controls_label")->setEnabled(editable); + self->getChild< LLTextBox >("owner_label")->setEnabled(editable); + self->getChild< LLTextBox >("group_label")->setEnabled(editable); + self->getChild< LLNameBox >("perms_group_name")->setEnabled(editable); + self->getChild< LLTextBox >("anyone_label")->setEnabled(editable); } //////////////////////////////////////////////////////////////////////////////// @@ -194,7 +198,7 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() ); }; }; - + // *NOTE: If any of a particular flavor is tentative, we have to disable // them all because of an architectural issue: namely that we represent // these as a bit field, and we can't selectively apply only one bit to all selected @@ -216,13 +220,11 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me self->mPermsWorldControl->setEnabled(false); } - - self->childSetEnabled("media_perms_label_owner", editable ); - self->childSetText("media_perms_label_owner", LLTrans::getString("Media Perms Owner") ); - self->childSetEnabled("media_perms_label_group", editable ); - self->childSetText("media_perms_label_group", LLTrans::getString("Media Perms Group") ); - self->childSetEnabled("media_perms_label_anyone", editable ); - self->childSetText("media_perms_label_anyone", LLTrans::getString("Media Perms Anyone") ); + self->getChild< LLTextBox >("controls_label")->setEnabled(editable); + self->getChild< LLTextBox >("owner_label")->setEnabled(editable); + self->getChild< LLTextBox >("group_label")->setEnabled(editable); + self->getChild< LLNameBox >("perms_group_name")->setEnabled(editable); + self->getChild< LLTextBox >("anyone_label")->setEnabled(editable); } //////////////////////////////////////////////////////////////////////////////// |