From f5f7f67bdd4df81b1c04ab29e98008bb4d9a6d2b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 25 Jun 2011 18:03:47 -0700 Subject: Removed some unused code from the media tab panel and fixed the '?' button in about land > audio --- linden/indra/newview/llpanellandaudio.cpp | 17 ++++++++++++++++- linden/indra/newview/llpanellandaudio.h | 3 ++- linden/indra/newview/llpanellandmedia.cpp | 30 ------------------------------ linden/indra/newview/llpanellandmedia.h | 4 ---- 4 files changed, 18 insertions(+), 36 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llpanellandaudio.cpp b/linden/indra/newview/llpanellandaudio.cpp index 8d902b6..c7543a0 100644 --- a/linden/indra/newview/llpanellandaudio.cpp +++ b/linden/indra/newview/llpanellandaudio.cpp @@ -69,7 +69,12 @@ enum //--------------------------------------------------------------------------- LLPanelLandAudio::LLPanelLandAudio(LLParcelSelectionHandle& parcel) -: LLPanel(std::string("land_media_panel")), mParcel(parcel) +: LLPanel(std::string("land_media_panel")), + mParcel(parcel), + mCheckSoundLocal(NULL), + mSoundHelpButton(NULL), + mRadioVoiceChat(NULL), + mMusicURLEdit(NULL) { } @@ -82,6 +87,9 @@ LLPanelLandAudio::~LLPanelLandAudio() BOOL LLPanelLandAudio::postBuild() { + mSoundHelpButton = getChild("?"); + mSoundHelpButton->setClickedCallback(onClickSoundHelp, this); + mCheckSoundLocal = getChild("check_sound_local"); childSetCommitCallback("check_sound_local", onCommitAny, this); @@ -185,3 +193,10 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) // Might have changed properties, so let's redraw! self->refresh(); } + + +// static +void LLPanelLandAudio::onClickSoundHelp(void*) +{ + LLNotifications::instance().add("ClickSoundHelpLand"); +} diff --git a/linden/indra/newview/llpanellandaudio.h b/linden/indra/newview/llpanellandaudio.h index 82e27f6..b443beb 100644 --- a/linden/indra/newview/llpanellandaudio.h +++ b/linden/indra/newview/llpanellandaudio.h @@ -50,11 +50,12 @@ public: private: static void onCommitAny(LLUICtrl* ctrl, void *userdata); + static void onClickSoundHelp(void*); -private: LLCheckBoxCtrl* mCheckSoundLocal; LLRadioGroup* mRadioVoiceChat; LLLineEditor* mMusicURLEdit; + LLButton* mSoundHelpButton; LLSafeHandle& mParcel; }; 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) : LLPanel(std::string("land_media_panel")), mParcel(parcel), - mCheckSoundLocal(NULL), - mSoundHelpButton(NULL), mCheckEnableVoiceChat(NULL), mCheckEnableVoiceChatIsEstateDisabled(NULL), mCheckEnableVoiceChatParcel(NULL), - mMusicURLEdit(NULL), mMediaURLEdit(NULL), mMediaDescEdit(NULL), mMediaTypeCombo(NULL), @@ -92,21 +89,8 @@ LLPanelLandMedia::~LLPanelLandMedia() } -// static -void LLPanelLandMedia::onClickSoundHelp(void*) -{ - LLNotifications::instance().add("ClickSoundHelpLand"); -} - - BOOL LLPanelLandMedia::postBuild() { - mCheckSoundLocal = getChild("check sound local"); - childSetCommitCallback("check sound local", onCommitAny, this); - - mSoundHelpButton = getChild("?"); - mSoundHelpButton->setClickedCallback(onClickSoundHelp, this); - mCheckEnableVoiceChat = getChild("parcel_enable_voice_channel"); childSetCommitCallback("parcel_enable_voice_channel", onCommitAny, this); mCheckEnableVoiceChatIsEstateDisabled = getChild("parcel_enable_voice_channel_is_estate_disabled"); @@ -114,9 +98,6 @@ BOOL LLPanelLandMedia::postBuild() mCheckEnableVoiceChatParcel = getChild("parcel_enable_voice_channel_parcel"); childSetCommitCallback("parcel_enable_voice_channel_parcel", onCommitAny, this); - mMusicURLEdit = getChild("music_url"); - childSetCommitCallback("music_url", onCommitAny, this); - mMediaTextureCtrl = getChild("media texture"); mMediaTextureCtrl->setCommitCallback( onCommitAny ); mMediaTextureCtrl->setCallbackUserData( this ); @@ -169,9 +150,6 @@ void LLPanelLandMedia::refresh() // Display options BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); - mCheckSoundLocal->set( parcel->getSoundLocal() ); - mCheckSoundLocal->setEnabled( can_change_media ); - LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); if (!region) { @@ -217,9 +195,6 @@ void LLPanelLandMedia::refresh() mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel()); - mMusicURLEdit->setText(parcel->getMusicURL()); - mMusicURLEdit->setEnabled( can_change_media ); - mMediaURLEdit->setText(parcel->getMediaURL()); mMediaURLEdit->setEnabled( FALSE ); @@ -374,8 +349,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) } // Extract data from UI - BOOL sound_local = self->mCheckSoundLocal->get(); - std::string music_url = self->mMusicURLEdit->getText(); std::string media_url = self->mMediaURLEdit->getText(); std::string media_desc = self->mMediaDescEdit->getText(); std::string mime_type = self->childGetText("mime_type"); @@ -391,14 +364,11 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) self->childSetText("mime_type", mime_type); // Remove leading/trailing whitespace (common when copying/pasting) - LLStringUtil::trim(music_url); LLStringUtil::trim(media_url); // Push data into current parcel parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); - parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); - parcel->setMusicURL(music_url); parcel->setMediaURL(media_url); parcel->setMediaType(mime_type); parcel->setMediaDesc(media_desc); diff --git a/linden/indra/newview/llpanellandmedia.h b/linden/indra/newview/llpanellandmedia.h index 845b953..fda99bd 100644 --- a/linden/indra/newview/llpanellandmedia.h +++ b/linden/indra/newview/llpanellandmedia.h @@ -56,15 +56,11 @@ private: static void onCommitAny(LLUICtrl* ctrl, void *userdata); static void onCommitType(LLUICtrl* ctrl, void *userdata); static void onSetBtn(void* userdata); - static void onClickSoundHelp(void*); private: - LLCheckBoxCtrl* mCheckSoundLocal; - LLButton* mSoundHelpButton; LLCheckBoxCtrl* mCheckEnableVoiceChat; LLCheckBoxCtrl* mCheckEnableVoiceChatIsEstateDisabled; LLCheckBoxCtrl* mCheckEnableVoiceChatParcel; - LLLineEditor* mMusicURLEdit; LLLineEditor* mMediaURLEdit; LLLineEditor* mMediaDescEdit; LLComboBox* mMediaTypeCombo; -- cgit v1.1