diff options
Diffstat (limited to 'linden/indra/newview/llpanellandmedia.cpp')
-rw-r--r-- | linden/indra/newview/llpanellandmedia.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp index 8a0be86..dba7883 100644 --- a/linden/indra/newview/llpanellandmedia.cpp +++ b/linden/indra/newview/llpanellandmedia.cpp | |||
@@ -65,12 +65,9 @@ LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel) | |||
65 | : LLPanel(std::string("land_media_panel")), | 65 | : LLPanel(std::string("land_media_panel")), |
66 | 66 | ||
67 | mParcel(parcel), | 67 | mParcel(parcel), |
68 | mCheckSoundLocal(NULL), | ||
69 | mSoundHelpButton(NULL), | ||
70 | mCheckEnableVoiceChat(NULL), | 68 | mCheckEnableVoiceChat(NULL), |
71 | mCheckEnableVoiceChatIsEstateDisabled(NULL), | 69 | mCheckEnableVoiceChatIsEstateDisabled(NULL), |
72 | mCheckEnableVoiceChatParcel(NULL), | 70 | mCheckEnableVoiceChatParcel(NULL), |
73 | mMusicURLEdit(NULL), | ||
74 | mMediaURLEdit(NULL), | 71 | mMediaURLEdit(NULL), |
75 | mMediaDescEdit(NULL), | 72 | mMediaDescEdit(NULL), |
76 | mMediaTypeCombo(NULL), | 73 | mMediaTypeCombo(NULL), |
@@ -92,21 +89,8 @@ LLPanelLandMedia::~LLPanelLandMedia() | |||
92 | } | 89 | } |
93 | 90 | ||
94 | 91 | ||
95 | // static | ||
96 | void LLPanelLandMedia::onClickSoundHelp(void*) | ||
97 | { | ||
98 | LLNotifications::instance().add("ClickSoundHelpLand"); | ||
99 | } | ||
100 | |||
101 | |||
102 | BOOL LLPanelLandMedia::postBuild() | 92 | BOOL LLPanelLandMedia::postBuild() |
103 | { | 93 | { |
104 | mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check sound local"); | ||
105 | childSetCommitCallback("check sound local", onCommitAny, this); | ||
106 | |||
107 | mSoundHelpButton = getChild<LLButton>("?"); | ||
108 | mSoundHelpButton->setClickedCallback(onClickSoundHelp, this); | ||
109 | |||
110 | mCheckEnableVoiceChat = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel"); | 94 | mCheckEnableVoiceChat = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel"); |
111 | childSetCommitCallback("parcel_enable_voice_channel", onCommitAny, this); | 95 | childSetCommitCallback("parcel_enable_voice_channel", onCommitAny, this); |
112 | mCheckEnableVoiceChatIsEstateDisabled = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_is_estate_disabled"); | 96 | mCheckEnableVoiceChatIsEstateDisabled = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_is_estate_disabled"); |
@@ -114,9 +98,6 @@ BOOL LLPanelLandMedia::postBuild() | |||
114 | mCheckEnableVoiceChatParcel = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_parcel"); | 98 | mCheckEnableVoiceChatParcel = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_parcel"); |
115 | childSetCommitCallback("parcel_enable_voice_channel_parcel", onCommitAny, this); | 99 | childSetCommitCallback("parcel_enable_voice_channel_parcel", onCommitAny, this); |
116 | 100 | ||
117 | mMusicURLEdit = getChild<LLLineEditor>("music_url"); | ||
118 | childSetCommitCallback("music_url", onCommitAny, this); | ||
119 | |||
120 | mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture"); | 101 | mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture"); |
121 | mMediaTextureCtrl->setCommitCallback( onCommitAny ); | 102 | mMediaTextureCtrl->setCommitCallback( onCommitAny ); |
122 | mMediaTextureCtrl->setCallbackUserData( this ); | 103 | mMediaTextureCtrl->setCallbackUserData( this ); |
@@ -169,9 +150,6 @@ void LLPanelLandMedia::refresh() | |||
169 | // Display options | 150 | // Display options |
170 | BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); | 151 | BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); |
171 | 152 | ||
172 | mCheckSoundLocal->set( parcel->getSoundLocal() ); | ||
173 | mCheckSoundLocal->setEnabled( can_change_media ); | ||
174 | |||
175 | LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); | 153 | LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); |
176 | if (!region) | 154 | if (!region) |
177 | { | 155 | { |
@@ -217,9 +195,6 @@ void LLPanelLandMedia::refresh() | |||
217 | 195 | ||
218 | mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel()); | 196 | mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel()); |
219 | 197 | ||
220 | mMusicURLEdit->setText(parcel->getMusicURL()); | ||
221 | mMusicURLEdit->setEnabled( can_change_media ); | ||
222 | |||
223 | mMediaURLEdit->setText(parcel->getMediaURL()); | 198 | mMediaURLEdit->setText(parcel->getMediaURL()); |
224 | mMediaURLEdit->setEnabled( FALSE ); | 199 | mMediaURLEdit->setEnabled( FALSE ); |
225 | 200 | ||
@@ -374,8 +349,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) | |||
374 | } | 349 | } |
375 | 350 | ||
376 | // Extract data from UI | 351 | // Extract data from UI |
377 | BOOL sound_local = self->mCheckSoundLocal->get(); | ||
378 | std::string music_url = self->mMusicURLEdit->getText(); | ||
379 | std::string media_url = self->mMediaURLEdit->getText(); | 352 | std::string media_url = self->mMediaURLEdit->getText(); |
380 | std::string media_desc = self->mMediaDescEdit->getText(); | 353 | std::string media_desc = self->mMediaDescEdit->getText(); |
381 | std::string mime_type = self->childGetText("mime_type"); | 354 | std::string mime_type = self->childGetText("mime_type"); |
@@ -391,14 +364,11 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) | |||
391 | self->childSetText("mime_type", mime_type); | 364 | self->childSetText("mime_type", mime_type); |
392 | 365 | ||
393 | // Remove leading/trailing whitespace (common when copying/pasting) | 366 | // Remove leading/trailing whitespace (common when copying/pasting) |
394 | LLStringUtil::trim(music_url); | ||
395 | LLStringUtil::trim(media_url); | 367 | LLStringUtil::trim(media_url); |
396 | 368 | ||
397 | // Push data into current parcel | 369 | // Push data into current parcel |
398 | parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); | 370 | parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); |
399 | parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); | 371 | parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); |
400 | parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); | ||
401 | parcel->setMusicURL(music_url); | ||
402 | parcel->setMediaURL(media_url); | 372 | parcel->setMediaURL(media_url); |
403 | parcel->setMediaType(mime_type); | 373 | parcel->setMediaType(mime_type); |
404 | parcel->setMediaDesc(media_desc); | 374 | parcel->setMediaDesc(media_desc); |