diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 19:22:00 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 19:22:00 +0100 |
commit | e416840f85dc4a367894036b9fe483f17d959c54 (patch) | |
tree | e12956cbe7a0082bbaaa545cb80d9e86b13f88e8 /indra/newview/llpanellandmedia.cpp | |
parent | 98cc2365034a93c69704daa69efb389799cc9627 (diff) |
Backed out changeset c3d41f18ce2b
back-out the back-out for this branch. yay.
Diffstat (limited to 'indra/newview/llpanellandmedia.cpp')
-rw-r--r-- | indra/newview/llpanellandmedia.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index ef15f971c9..f17defda55 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -139,7 +139,7 @@ void LLPanelLandMedia::refresh() mMediaURLEdit->setText(parcel->getMediaURL()); mMediaURLEdit->setEnabled( FALSE ); - childSetText("current_url", parcel->getMediaCurrentURL()); + getChild<LLUICtrl>("current_url")->setValue(parcel->getMediaCurrentURL()); mMediaDescEdit->setText(parcel->getMediaDesc()); mMediaDescEdit->setEnabled( can_change_media ); @@ -151,7 +151,7 @@ void LLPanelLandMedia::refresh() } setMediaType(mime_type); mMediaTypeCombo->setEnabled( can_change_media ); - childSetText("mime_type", mime_type); + getChild<LLUICtrl>("mime_type")->setValue(mime_type); mMediaUrlCheck->set( parcel->getObscureMedia() ); mMediaUrlCheck->setEnabled( can_change_media ); @@ -249,7 +249,7 @@ void LLPanelLandMedia::setMediaType(const std::string& mime_type) // localizable - "none" for example (see EXT-6542) mime_str = LLMIMETypes::getDefaultMimeTypeTranslation(); } - childSetText("mime_type", mime_str); + getChild<LLUICtrl>("mime_type")->setValue(mime_str); } void LLPanelLandMedia::setMediaURL(const std::string& media_url) @@ -263,7 +263,7 @@ void LLPanelLandMedia::setMediaURL(const std::string& media_url) mMediaURLEdit->onCommit(); // LLViewerParcelMedia::sendMediaNavigateMessage(media_url); - childSetText("current_url", media_url); + getChild<LLUICtrl>("current_url")->setValue(media_url); } std::string LLPanelLandMedia::getMediaURL() { @@ -274,11 +274,11 @@ std::string LLPanelLandMedia::getMediaURL() void LLPanelLandMedia::onCommitType(LLUICtrl *ctrl, void *userdata) { LLPanelLandMedia *self = (LLPanelLandMedia *)userdata; - std::string current_type = LLMIMETypes::widgetType(self->childGetText("mime_type")); + std::string current_type = LLMIMETypes::widgetType(self->getChild<LLUICtrl>("mime_type")->getValue().asString()); std::string new_type = self->mMediaTypeCombo->getValue(); if(current_type != new_type) { - self->childSetText("mime_type", LLMIMETypes::findDefaultMimeType(new_type)); + self->getChild<LLUICtrl>("mime_type")->setValue(LLMIMETypes::findDefaultMimeType(new_type)); } onCommitAny(ctrl, userdata); @@ -298,7 +298,7 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) // Extract data from UI std::string media_url = self->mMediaURLEdit->getText(); std::string media_desc = self->mMediaDescEdit->getText(); - std::string mime_type = self->childGetText("mime_type"); + std::string mime_type = self->getChild<LLUICtrl>("mime_type")->getValue().asString(); U8 media_auto_scale = self->mMediaAutoScaleCheck->get(); U8 media_loop = self->mMediaLoopCheck->get(); U8 obscure_media = self->mMediaUrlCheck->get(); @@ -307,7 +307,7 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID(); - self->childSetText("mime_type", mime_type); + self->getChild<LLUICtrl>("mime_type")->setValue(mime_type); // Remove leading/trailing whitespace (common when copying/pasting) LLStringUtil::trim(media_url); @@ -348,7 +348,7 @@ void LLPanelLandMedia::onResetBtn(void *userdata) LLParcel* parcel = self->mParcel->getParcel(); // LLViewerMedia::navigateHome(); self->refresh(); - self->childSetText("current_url", parcel->getMediaURL()); + self->getChild<LLUICtrl>("current_url")->setValue(parcel->getMediaURL()); // LLViewerParcelMedia::sendMediaNavigateMessage(parcel->getMediaURL()); } |