aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanellandmedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanellandmedia.cpp')
-rw-r--r--linden/indra/newview/llpanellandmedia.cpp38
1 files changed, 1 insertions, 37 deletions
diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp
index b7df164..8a0be86 100644
--- a/linden/indra/newview/llpanellandmedia.cpp
+++ b/linden/indra/newview/llpanellandmedia.cpp
@@ -80,9 +80,7 @@ LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel)
80 mMediaSizeCtrlLabel(NULL), 80 mMediaSizeCtrlLabel(NULL),
81 mMediaTextureCtrl(NULL), 81 mMediaTextureCtrl(NULL),
82 mMediaAutoScaleCheck(NULL), 82 mMediaAutoScaleCheck(NULL),
83 mMediaLoopCheck(NULL), 83 mMediaLoopCheck(NULL)
84 mMediaUrlCheck(NULL),
85 mMusicUrlCheck(NULL)
86{ 84{
87} 85}
88 86
@@ -132,12 +130,6 @@ BOOL LLPanelLandMedia::postBuild()
132 mMediaLoopCheck = getChild<LLCheckBoxCtrl>("media_loop"); 130 mMediaLoopCheck = getChild<LLCheckBoxCtrl>("media_loop");
133 childSetCommitCallback("media_loop", onCommitAny, this); 131 childSetCommitCallback("media_loop", onCommitAny, this);
134 132
135 mMediaUrlCheck = getChild<LLCheckBoxCtrl>("hide_media_url");
136 childSetCommitCallback("hide_media_url", onCommitAny, this);
137
138 mMusicUrlCheck = getChild<LLCheckBoxCtrl>("hide_music_url");
139 childSetCommitCallback("hide_music_url", onCommitAny, this);
140
141 mMediaURLEdit = getChild<LLLineEditor>("media_url"); 133 mMediaURLEdit = getChild<LLLineEditor>("media_url");
142 childSetCommitCallback("media_url", onCommitAny, this); 134 childSetCommitCallback("media_url", onCommitAny, this);
143 135
@@ -243,30 +235,6 @@ void LLPanelLandMedia::refresh()
243 mMediaTypeCombo->setEnabled( can_change_media ); 235 mMediaTypeCombo->setEnabled( can_change_media );
244 childSetText("mime_type", mime_type); 236 childSetText("mime_type", mime_type);
245 237
246 mMediaUrlCheck->set( parcel->getObscureMedia() );
247 mMediaUrlCheck->setEnabled( can_change_media );
248
249 mMusicUrlCheck->set( parcel->getObscureMusic() );
250 mMusicUrlCheck->setEnabled( can_change_media );
251
252 // don't display urls if you're not able to change it
253 // much requested change in forums so people can't 'steal' urls
254 // NOTE: bug#2009 means this is still vunerable - however, bug
255 // should be closed since this bug opens up major security issues elsewhere.
256 bool obscure_media = ! can_change_media && parcel->getObscureMedia();
257 bool obscure_music = ! can_change_media && parcel->getObscureMusic();
258
259 // Special code to disable asterixes for html type
260 if(mime_type == "text/html")
261 {
262 obscure_media = false;
263 mMediaUrlCheck->set( 0 );
264 mMediaUrlCheck->setEnabled( false );
265 }
266
267 mMusicURLEdit->setDrawAsterixes( obscure_music );
268 mMediaURLEdit->setDrawAsterixes( obscure_media );
269
270 mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () ); 238 mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () );
271 mMediaAutoScaleCheck->setEnabled ( can_change_media ); 239 mMediaAutoScaleCheck->setEnabled ( can_change_media );
272 240
@@ -413,8 +381,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
413 std::string mime_type = self->childGetText("mime_type"); 381 std::string mime_type = self->childGetText("mime_type");
414 U8 media_auto_scale = self->mMediaAutoScaleCheck->get(); 382 U8 media_auto_scale = self->mMediaAutoScaleCheck->get();
415 U8 media_loop = self->mMediaLoopCheck->get(); 383 U8 media_loop = self->mMediaLoopCheck->get();
416 U8 obscure_media = self->mMediaUrlCheck->get();
417 U8 obscure_music = self->mMusicUrlCheck->get();
418 S32 media_width = (S32)self->mMediaWidthCtrl->get(); 384 S32 media_width = (S32)self->mMediaWidthCtrl->get();
419 S32 media_height = (S32)self->mMediaHeightCtrl->get(); 385 S32 media_height = (S32)self->mMediaHeightCtrl->get();
420 LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID(); 386 LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID();
@@ -441,8 +407,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
441 parcel->setMediaID(media_id); 407 parcel->setMediaID(media_id);
442 parcel->setMediaAutoScale ( media_auto_scale ); 408 parcel->setMediaAutoScale ( media_auto_scale );
443 parcel->setMediaLoop ( media_loop ); 409 parcel->setMediaLoop ( media_loop );
444 parcel->setObscureMedia( obscure_media );
445 parcel->setObscureMusic( obscure_music );
446 410
447 // Send current parcel data upstream to server 411 // Send current parcel data upstream to server
448 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); 412 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );